You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace nx 19 with turborepo 2.9, eslint+prettier with biome 2.4,
@web/test-runner with vitest 4 (browser mode + Playwright provider),
and unify shadow-objects build into a single build.mjs (esbuild
transpile + tsc emit-only declarations + esbuild inline-worker
bundle). Introduce pnpm catalog: as version single-source-of-truth
across all workspace packages. Bump TypeScript to 6, esbuild to
0.28, Playwright to 1.59, happy-dom to 20. Bump shadow-objects
to 0.31.0-dev.
dist/ of @spearwolf/shadow-objects stays byte-compatible (file list
+ dist/package.json identical to prior release). Side-effect: the
./bundle.js export now actually contains the bundled worker and
element registrations — previous releases shipped a 790-byte stub
because src-side sideEffects markers no longer matched the new
entry path.
Verification snapshots and the design doc live under
docs/superpowers/specs/. Full clean+build+test cycle: ~7.6s cold,
~70ms warm (FULL TURBO).
See CHANGELOG.md (root) for build-system details and
packages/shadow-objects/CHANGELOG.md for the package-level
[Unreleased] entry.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,19 +77,22 @@ Uses Signals and Effects (via `@spearwolf/signalize`).
77
77
- Check `packages/shadow-objects-e2e/` for end-to-end tests.
78
78
- Public API changes must be tested in E2E if possible.
79
79
80
-
<!-- nx configuration start-->
81
-
<!-- Leave the start & end comments to automatically receive updates. -->
82
-
83
-
# General Guidelines for working with Nx
84
-
85
-
- When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through `nx` (i.e. `nx run`, `nx run-many`, `nx affected`) instead of using the underlying tooling directly
86
-
- You have access to the Nx MCP server and its tools, use them to help the user
87
-
- When answering questions about the repository, use the `nx_workspace` tool first to gain an understanding of the workspace architecture where applicable.
88
-
- When working in individual projects, use the `nx_project_details` mcp tool to analyze and understand the specific project structure and dependencies
89
-
- For questions around nx configuration, best practices or if you're unsure, use the `nx_docs` tool to get relevant, up-to-date docs. Always use this instead of assuming things about nx configuration
90
-
- If the user needs help with an Nx configuration or project graph error, use the `nx_workspace` tool to get any errors
| Dev server |`vite` (only `shae-offscreen-canvas` demo and `shadow-objects-e2e`) |
92
+
93
+
**Dependency versions:** never write a plain version range in a per-package `package.json`. Add the version to the `catalog:` block of `pnpm-workspace.yaml` and reference it from each package as `"<dep>": "catalog:"`.
94
+
95
+
**Run tasks via turbo (`pnpm build`, `pnpm test`, …) instead of invoking the underlying tools directly** — the cache and the cross-package dependency graph are defined there. See `CLAUDE.md` for the full command reference.
93
96
94
97
# General Context Information for the AI assistant
Copy file name to clipboardExpand all lines: Backlog.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,12 +87,12 @@ ComponentContext│ ─ Destroy
87
87
88
88
### 2.3 Verwendete Technologien
89
89
90
-
-**TypeScript** (strict, aber **`strictNullChecks: false`** — Achtung: das ist eine bewusste Lockerung, die Typen-Sicherheit signifikant einschränkt).
90
+
-**TypeScript 6** (strict, aber **`strictNullChecks: false`** — Achtung: das ist eine bewusste Lockerung, die Typen-Sicherheit signifikant einschränkt).
-**esbuild 0.27.3** — Bundling, mit `esbuild-plugin-inline-worker` für den Worker-Inline.
94
-
-**vitest 1.6.1** für Unit-Tests, **`@web/test-runner`** für browser-basierte Funktionstests,**Playwright** für E2E.
95
-
-**nx 19.8.14** als Monorepo-Orchestrator, **pnpm 9.1.2**, Node ≥ 24.13.0.
93
+
-**esbuild 0.28** — Bundling, mit `esbuild-plugin-inline-worker` für den Worker-Inline.
94
+
-**vitest 4** für Unit-Tests (happy-dom) und Integrationstests (browser-mode + Playwright-Provider).**Playwright** für E2E.
95
+
-**turborepo 2.9** als Monorepo-Orchestrator, **biome 2.4** für Lint/Format, **pnpm 9.15** mit `catalog:`-SSOT, Node ≥ 24.13.0.
96
96
97
97
### 2.4 Lebenszyklus einer Entity (vereinfacht)
98
98
@@ -262,38 +262,39 @@ Wenn ein `<shae-ent>`-Vater aus dem DOM entfernt wird, das Kind aber selbst noch
262
262
263
263
## 5. Build & Tooling
264
264
265
+
> **2026-05-09 — Build-System wurde grundlegend erneuert.** Details: [`CHANGELOG.md`](CHANGELOG.md) (Top-Level), Design-Doku: [`docs/superpowers/specs/2026-05-09-build-system-renewal-design.md`](docs/superpowers/specs/2026-05-09-build-system-renewal-design.md). Die folgenden Abschnitte spiegeln den neuen Stand und nur noch die offenen Punkte.
266
+
265
267
### 5.1 Pipeline (`packages/shadow-objects`)
266
268
267
-
Vier Stufen: `compile:lib` (TS → `dist/`) → `compile:bundle` (TS → `build/`, JS für esbuild) → `bundle.mjs` (Worker zuerst inline-bundeln, dann Hauptbundle mit `esbuild-plugin-inline-worker`) → `makePackageJson.mjs`(überschreibt Pfade, resolvt `workspace:*`, wendet `package.override.json` an).
Veröffentlicht wird `dist/` mit ESM-only, mehreren Subpath-Exports (`./elements.js`, `./shae-ent.js`, `./shae-prop.js`, `./shae-worker.js`, `./shadow-objects.js`, `./shadow-objects.worker.js`, `./bundle.js`).
270
272
271
-
**Auffälligkeiten:**
272
-
- Zwei parallele TS-Outputs (`dist/` und `build/`) für gleiche Quellen.
273
-
-`package.override.json` mit doppelter `sideEffects`-Liste — zwei Wahrheitsquellen, Wartungs-Stolperstein.
273
+
**Verbleibende Auffälligkeiten:**
274
+
-`package.override.json` und `package.json#sideEffects` enthalten noch tote `build/src/...`-Pfade aus der alten Pipeline. Folgenlos (doppelte Wahrheit), sollte aber konsolidiert werden.
274
275
-`exports`-Konditionen: Reihenfolge `import` vor `types`. Unter strikter Node-ESM-Resolution (`moduleResolution: node16/nodenext`) sollte `types` zuerst stehen. Aktuell unter `bundler` toleriert, aber latentes Risiko für Konsumenten.
275
276
276
277
### 5.2 Dependency-Hygiene
277
278
278
-
-`@spearwolf/eventize@4.3.1`, `@spearwolf/signalize@0.28.0` konsistent über alle Pakete. ✅
279
-
-**Drift bei Tooling:**`sinon` 17/18/19 nebeneinander, `@web/test-runner` 0.18 vs 0.20, `vite` 5 vs 6, Playwright 1.58.1 vs 1.58.2.
- Kern-Lib hat **keine `peerDependencies`** — `@spearwolf/eventize`/`signalize` sind harte Deps; bei Mehrfach-Resolutionen drohen Duplikate.
282
282
283
283
### 5.3 Lint / TS
284
284
285
285
-`strict: true`**mit `strictNullChecks: false`** — die größte Typensicherheits-Lücke.
286
-
-ESLint-Root deaktiviert global `no-explicit-any`, `ban-ts-comment`, `ban-types`, `no-non-null-assertion`. Bewusste Lockerung, aber in Kombination mit `strictNullChecks: false` riskant.
286
+
-Biome-Root deaktiviert (analog zur alten ESLint-Config) `noExplicitAny`, `noTsIgnore`, `noNonNullAssertion`, `noImplicitAnyLet`. Bewusste Lockerung, aber in Kombination mit `strictNullChecks: false` riskant.
- Biome meldet aktuell ~30 Warnings im Source (z. B. `useIterableCallbackReturn`, `noShadowRestrictedNames`, `useNodejsImportProtocol`). Schrittweise abarbeiten oder bewusst weiter unterdrücken.
288
289
289
290
### 5.4 CI-Gap
290
291
291
-
Die GitHub-Action ruft `pnpm run ci` = `build + lint + test:ci`. **`test:ci` schließt `shadow-objects-e2e` aus.** Damit wird der gesamte Worker-Roundtrip nicht von CI verifiziert. Da `RemoteWorkerEnv` ohnehin keine Unit-Tests hat, ist das ein doppelt-blinder Punkt.
292
+
Die GitHub-Action ruft `pnpm run ci` = `turbo run build typecheck test --filter=!shadow-objects-e2e && pnpm lint`. **`test:ci` schließt `shadow-objects-e2e` weiterhin aus.** Damit wird der gesamte Worker-Roundtrip nicht von CI verifiziert. Da `RemoteWorkerEnv` ohnehin keine Unit-Tests hat, ist das ein doppelt-blinder Punkt.
292
293
293
294
### 5.5 Sonstige Stolperfallen auf frischer Maschine
294
295
295
296
-`pnpm install` installiert keine Playwright-Browser — manuelles `pnpm exec playwright install chromium firefox` nötig (wird in CLAUDE.md erwähnt).
296
-
-`engines.node: ">=24.13.0"` blockiert Mitwirkende auf Node 22.x.
297
+
-`engines.node: ">=24.13.0"` blockiert Mitwirkende auf Node 22.x. Hinweis: Node 24+ ships eine inerte `localStorage`-Stub auf `globalThis`; für Tests gefixt durch `packages/shadow-objects/vitest.setup.ts`.
297
298
-`make:todo` ist Honor-System (kein Pre-Commit-Hook, kein CI-Check).
298
299
- Manuelles `CHANGELOG.md`-Pflegen ohne Changesets/release-please.
299
300
@@ -340,12 +341,12 @@ Ein reines JS-Paket (kein TS), `src/` wird ohne Bundle-Schritt veröffentlicht.
340
341
### 7.3 Mittelfristig
341
342
342
343
14.**`strictNullChecks: true`** schrittweise einschalten — größter Hebel für Typensicherheit.
343
-
15.**Tooling-Drift bereinigen:**vitest, ESLint, nx, sinon, vite auf einheitliche Major-Versionen ziehen.
344
-
16.**`exports`-Konditionen umsortieren** (`types` vor `import`) für strikte Node-ESM-Konsumenten.
345
-
17.**`peerDependencies` für `@spearwolf/eventize`/`signalize`** dokumentiert beschließen.
18.**Performance-Knopf:**`disableStructuredClone` als Default für `LocalShadowObjectEnv`; optionales RAF-Coalescing bei hoher Update-Frequenz.
348
+
19.**`sideEffects`-Listen konsolidieren:**`package.json` und `package.override.json` haben noch tote `build/src/...`-Einträge aus der alten Build-Pipeline — auf `dist/src/...` reduzieren.
349
+
20.**Biome-Warnings abarbeiten**(~30 Stück): `useIterableCallbackReturn`, `noShadowRestrictedNames` etc. — entweder fixen oder Regel bewusst abschalten.
Top-level changes that are not tied to a single published package — build system, monorepo orchestration, lint/format, dev workflow. Per-package runtime and API changes live in each package's own `CHANGELOG.md`.
4
+
5
+
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+
7
+
## 2026-05-09 — Build-system renewal
8
+
9
+
-**Monorepo orchestrator:** replaced `nx` 19 with `turborepo` 2.9. Removed `nx.json` and all per-package `project.json` files. Pipeline now in `turbo.json`.
10
+
-**Lint + format:** replaced `eslint` 8 + `prettier` 3 (and 9 plugins) with `biome` 2.4. Single config at `biome.json`. Removed `.eslintrc.json`, `.eslintignore`, `.prettierrc`, `.prettierignore`.
11
+
-**Dependency-version SSOT:** introduced pnpm `catalog:` (in `pnpm-workspace.yaml`). All workspace `package.json` files reference shared deps via `"<dep>": "catalog:"`. The `makePackageJson.mjs` publish helper resolves `catalog:` refs alongside `workspace:*`.
12
+
-**TypeScript:** bumped to 6.0. Dropped deprecated `baseUrl` and `downlevelIteration` from the root `tsconfig.json`.
13
+
-**Build:** unified `packages/shadow-objects` build into a single `build.mjs` (esbuild transpile + tsc emit-only declarations + esbuild inline-worker bundle + makePackageJson). Removed `tsconfig.bundle.json`, `tsconfig.tests.json`, `bundle.mjs`, the `run-s`/`rimraf` script chain, and the intermediate `build/` directory.
14
+
-**Test runners:** consolidated on `vitest` 4.
15
+
- Core lib (`shadow-objects`): vitest reads `*.spec.ts` directly (no precompile step). Removed the generated `tests/` tree.
16
+
- Integration (`shadow-objects-testing`): switched from `@web/test-runner` to `vitest` browser mode with the Playwright provider (real Chromium for accurate Custom Elements semantics). Chai assertion style preserved via `@esm-bundle/chai`.
17
+
- Canvas (`shae-offscreen-canvas`): switched from `@web/test-runner` to `vitest` + happy-dom.
18
+
- Shared `vitest.setup.ts` patches Node 24+'s inert `localStorage`/`sessionStorage` globals (which shadow happy-dom's working Storage) and shims mocha's `after`/`before` to vitest's `afterAll`/`beforeAll` for migrated specs.
-`dist/` of `@spearwolf/shadow-objects` is byte-compatible with the previous version (file list identical except for the removal of an accidentally-published `tsconfig.lib.tsbuildinfo`; `dist/package.json` byte-identical). Snapshots: `docs/superpowers/specs/dist-snapshot.txt`, `docs/superpowers/specs/dist-package.json.snapshot`.
25
+
- Cold full cycle (`pnpm cbt`): ~7.6 s for clean + build + test + e2e (7 turbo tasks, 191 unit/integration + 32 e2e). Warm cache: ~70 ms (FULL TURBO).
0 commit comments