From 2dc28966c76829056be3e6e5f36d835ba153c60e Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Mon, 21 Sep 2026 14:40:47 +0200 Subject: [PATCH] T01.i: bring examples/notebook into the pnpm workspace, fix its type error pnpm-workspace.yaml listed only packages/*, so pnpm never installed examples/notebook's dependencies even though root package.json's workspaces field named examples/* too; the example ran on a stray node_modules a manual bun install had left behind (symlinks into node_modules/.bun, including a dangling @ng-eventually/sdk link to a package that no longer exists). Added examples/* to pnpm-workspace.yaml and reinstalled; examples/notebook now resolves @ng-org/orm and @ng-org/web to the exact same pnpm store instances packages/polyfill uses (verified via the symlinks and node_modules/.pnpm listing) - no package ended up duplicated. That alone did not fix the example's TS2345: NoteShape's object literal had its dataTypes[].valType widened from the "iri"/"string" literals to plain string (no satisfies clause), which the existing test suite already guards against elsewhere (satisfies ShapeType). Applied the same pattern here, importing the already re-exported ShapeType/BaseType from @ng-eventually/polyfill - no new dependency needed, no compiler option touched. --- .project/concepts/app-contract/_debt.md | 1 + examples/notebook/app.ts | 4 +++- pnpm-lock.yaml | 12 ++++++++++++ pnpm-workspace.yaml | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.project/concepts/app-contract/_debt.md b/.project/concepts/app-contract/_debt.md index dc656d6..a4ccdc2 100644 --- a/.project/concepts/app-contract/_debt.md +++ b/.project/concepts/app-contract/_debt.md @@ -8,3 +8,4 @@ - TOUCHED packages/polyfill/src/index.ts @2026-09-21 (session f93872b5-293a-4916-a353-181409a96d42) - TOUCHED packages/polyfill/src/surface/orm.ts @2026-09-21 (session f93872b5-293a-4916-a353-181409a96d42) - TOUCHED packages/polyfill/src/surface/read-document.ts @2026-09-21 (session f93872b5-293a-4916-a353-181409a96d42) +- TOUCHED examples/notebook/app.ts @2026-09-21 (session f93872b5-293a-4916-a353-181409a96d42) diff --git a/examples/notebook/app.ts b/examples/notebook/app.ts index 752c82d..6480378 100644 --- a/examples/notebook/app.ts +++ b/examples/notebook/app.ts @@ -40,6 +40,8 @@ import { useShapeQuery, type Nuri, type ShapeObservable, + type ShapeType, + type BaseType, // Polyfill-era — ONE call, and it is the whole of what goes away. configure, } from "@ng-eventually/polyfill"; @@ -115,7 +117,7 @@ const NoteShape = { ], }, }, -}; +} satisfies ShapeType; // --- bootstrap: ONE polyfill-era call -------------------------------------- // diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a45fda2..30486f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,18 @@ importers: specifier: ^5.6.0 version: 5.9.3 + examples/notebook: + dependencies: + '@ng-eventually/polyfill': + specifier: workspace:* + version: link:../../packages/polyfill + '@ng-org/orm': + specifier: 0.1.2-alpha.21 + version: 0.1.2-alpha.21 + '@ng-org/web': + specifier: 0.1.2-alpha.14 + version: 0.1.2-alpha.14 + packages/ng-e2e-helpers: devDependencies: '@ng-org/web': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index dee51e9..89723f9 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - "packages/*" + - "examples/*"