Repository navigation
feat: add yjs dependency and update import path in sync-replicas test - #733
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the single commit 4b77384, which fixes the Cannot find module '../../../web/node_modules/yjs' failure that aborted the Playwright run before any test started.
yjsimported by package name —sync-replicas.spec.tsnow doesimport * as Y from "yjs"instead of reaching intoapps/web/node_modules, which does not exist in the isolatedapps/e2einstall. No other spec inapps/e2eimports through a relativenode_modulespath.yjsadded as an e2e devDependency —apps/e2e/package.jsongainsyjs@^13.6.30(same range asapps/web) andapps/e2e/bun.lockrecords[email protected]with itslib0andisomorphic.jsdependencies.
Checks run against the branch: bun install --frozen-lockfile (bun 1.2.23, the version CI pins) accepts the lockfile and installs [email protected]; the recorded integrity hashes match the npm registry and match what services/realtime/bun.lock already pins; and bunx playwright test --list tests/realtime/sync-replicas.spec.ts resolves the module for all five projects.
ℹ️ Playwright does not run on this PR
e2e-ci.yml fires on apps/e2e/** changes but only runs bun run lint; the Playwright matrix lives in e2e-tests.yml, which is workflow_dispatch-only. Merging therefore won't prove the module fix — the failure needs to be closed out by dispatching e2e-tests.yml on firefox and webkit (the two projects that failed) with specs=tests/realtime/sync-replicas.spec.ts.
Technical details
# Confirm the module-resolution fix with a dispatched e2e-tests.yml run
## Affected sites
- `.github/workflows/e2e-ci.yml:47` — the only step triggered by `apps/e2e/**` changes is `bun run lint`
- `.github/workflows/e2e-tests.yml:3` — the Playwright matrix is `workflow_dispatch` only
## Required outcome
- A dispatched `e2e-tests.yml` run reaches the spec's own assertions instead of failing during module resolution, at minimum on firefox and webkit.
## Notes
- `bunx tsc --noEmit` in `apps/e2e` reports `TS1479` on the new `yjs` import (yjs is `"type": "module"`, while `apps/e2e/tsconfig.json` uses `module: node16` in a package without `"type": "module"`). Not blocking: `tsc` is not part of any e2e workflow and the previous relative path did not type-resolve at all. Runtime `require("yjs")` resolves `dist/yjs.cjs` through the package's `exports.require`, which Bun and Node both handle.deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Summary
Fixes the failing E2E job (run 43388264777), where Playwright (firefox and webkit) aborted before running any test:
Cause
sync-replicas.spec.tsimportedyjsthrough a relative path intoapps/web/node_modules. The e2e CI job installs onlyapps/e2e(it has its ownbun.lock, no shared workspace), so that directory does not exist there.Changes
apps/e2e/tests/realtime/sync-replicas.spec.ts: importyjsby package name instead of the relativeweb/node_modulespath.apps/e2e/package.jsonandapps/e2e/bun.lock: addyjs@^13.6.30as a devDependency (same range asapps/web).Testing