Skip to content

Commit 35685fa

Browse files
Expect was-client/sync in the root runtime graph.
Signed-off-by: Dmitri Zagidulin <dzagidulin@gmail.com>
1 parent 3ab4ca3 commit 35685fa

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎AGENTS.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ Do not add test files to `tsconfig.json` — they would be emitted into `dist/`.
7575
builds first and runs under `vitest.packaging.config.ts`). It walks the
7676
emitted module and declaration graphs to hold the root entry free of `rxdb`
7777
(ARCHITECTURE.md invariant 14). It is not part of `test:node`, because it
78-
asserts over `dist/`.
78+
asserts over `dist/`. A change under `src/` is not verified until this suite
79+
is green too: it pins the exact set of modules the root entry reaches at
80+
runtime, so a new import in the root graph fails it even when `test:node`
81+
passes. Run `pnpm run test:packaging` alongside `test:node`, or `pnpm test`
82+
for the full sequence.
7983
- `test/browser/` — Playwright smoke test (`pnpm run test:browser`); loads the
8084
ROOT entry in real Chromium via a Vite dev server (`pnpm run dev`), which is
8185
the entry a consumer must be able to load with `rxdb` absent.

‎test/packaging/rxdbFreeRoot.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ describe('the root entry is free of rxdb', () => {
8080
it('reaches no rxdb module at runtime', async () => {
8181
const bare = await bareSpecifiersFrom('index.js')
8282
expect([...bare].filter(name => name.startsWith('rxdb'))).toEqual([])
83-
// The peer is reached for types only, so no was-client module is in the
84-
// runtime graph either; social-core and the two small utilities are.
83+
// The was-client peer is reached at runtime only through its `/sync`
84+
// subpath, for the `err.name` predicates the conflict handler classifies
85+
// with; the root package itself is types-only. social-core and the two
86+
// small utilities are the whole of the rest.
8587
expect([...bare].sort()).toEqual([
8688
'@interop/social-core',
89+
'@interop/was-client/sync',
8790
'json-canonicalize',
8891
'uuidv7'
8992
])

0 commit comments

Comments
 (0)