Skip to content

feat: add yjs dependency and update import path in sync-replicas test - #733

Merged
pikann merged 1 commit into
masterfrom
fix/fix-yjs-error-in-e2e-testings
Nov 13, 2026
Merged

pikann merged 1 commit into
masterfrom
fix/fix-yjs-error-in-e2e-testings

Conversation

@pikann

@pikann pikann commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the failing E2E job (run 43388264777), where Playwright (firefox and webkit) aborted before running any test:

Error: Cannot find module '../../../web/node_modules/yjs'
  at apps/e2e/tests/realtime/sync-replicas.spec.ts:12

Cause

sync-replicas.spec.ts imported yjs through a relative path into apps/web/node_modules. The e2e CI job installs only apps/e2e (it has its own bun.lock, no shared workspace), so that directory does not exist there.

Changes

  • apps/e2e/tests/realtime/sync-replicas.spec.ts: import yjs by package name instead of the relative web/node_modules path.
  • apps/e2e/package.json and apps/e2e/bun.lock: add yjs@^13.6.30 as a devDependency (same range as apps/web).

Testing

  • Not yet verified in CI. The e2e workflow on this PR should confirm that the Playwright run now gets past module resolution.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

  • yjs imported by package name — sync-replicas.spec.ts now does import * as Y from "yjs" instead of reaching into apps/web/node_modules, which does not exist in the isolated apps/e2e install. No other spec in apps/e2e imports through a relative node_modules path.
  • yjs added as an e2e devDependency — apps/e2e/package.json gains yjs@^13.6.30 (same range as apps/web) and apps/e2e/bun.lock records [email protected] with its lib0 and isomorphic.js dependencies.

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.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 234d399 into master Nov 13, 2026
2 checks passed
@pikann
pikann deleted the fix/fix-yjs-error-in-e2e-testings branch November 13, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant