fix(deps): declare @types/node, which CI proved was never really there
The first CI run on this branch failed `npm run check` with 18 errors — "Cannot find name 'node:fs'" — including in `tests/unit/styles/contrast.test.ts`, which this branch never touched. So it was not the new test: the package has always used Node types without declaring them. Two things hid it. WXT 0.20 supplied `@types/node` transitively and 0.21 does not, and this worktree sits under the parent checkout, so TypeScript walked up to `E:\bookmarkmagic\node_modules\@types\node` and resolved them anyway — even after a correct `npm ci` in the worktree itself. A green local type-check in a worktree is therefore weaker evidence than it looks, which is now written down in CLAUDE.md next to the existing worktree gotcha. Types only: erased at build, nothing ships, so hard rule 2 — zero *runtime* dependencies — is untouched, and the built manifest and bundle are unchanged. docs/01 §2 records it with the reason, since that table is the pinned-version spec rather than a summary of it. This is the failure the tag run would otherwise have hit, and the reason a red CI is worth reading before merging rather than after tagging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
4 files changed
+29
-2
No files matched your search
@@ -141,6 +141,13 @@ the tag and performs the store update per docs/13 §1b.
|
||||
things appear to work, but knip reports every devDependency unused and
|
||||
`verify` fails; `tsconfig.json` extends `./.wxt/tsconfig.json`, which
|
||||
`wxt prepare` generates.
|
||||
**Type resolution walks up too, and it does so even after a correct `npm ci`.**
|
||||
A worktree under `E:\bookmarkmagic\.claude\worktrees\` inherits
|
||||
`E:\bookmarkmagic\node_modules\@types\*`, so `npm run check` can pass locally
|
||||
on types the package does not declare and CI does not have. That is exactly
|
||||
how a missing `@types/node` survived a green local `verify` and failed CI on
|
||||
the first push. A green local type-check in a worktree is weaker evidence than
|
||||
it looks.
|
||||
- When a browser fixture contradicts the format spec: add the fixture, make
|
||||
the parser tolerant, note the quirk in code + docs/04 §1.2, then continue.
|
||||
- Do not invent features not in docs; park ideas as `docs/15` roadmap PRs.
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
| @wxt-dev/module-svelte | latest at scaffold | WXT ↔ Svelte integration. |
|
||||
| **Biome** | **2.5.2 (pinned exact)** | Lint + format (replaces ESLint + Prettier). Install with `npm i -D -E @biomejs/biome` per Biome guidance. |
|
||||
| svelte-check | ^4.7.4 | Type/template authority for `.svelte` files. |
|
||||
| **@types/node** | **^24** (matches the Node major) | Types for `node:fs`, `node:path`, `node:child_process` and `process`, which the test suite and `scripts/*.mjs` genuinely use. **Declared explicitly since 2026-08-03** — it used to arrive transitively, and WXT 0.21 stopped providing it. Types only: erased at build, so hard rule 2 (zero *runtime* dependencies) is untouched. |
|
||||
| jsdom | **^30** (was ^29 through v1.0.0) | Test DOM. Not interchangeable — `02 §3` picks jsdom over happy-dom because the Netscape walk depends on parse5's implied-end-tag behaviour. A major bump runs `tests/unit/dom-environment.test.ts` first; if that canary fails, pin rather than loosen the test. |
|
||||
| **Knip** | **^6** (6.29.0 latest as of 2026-07) | Dead code: unused files, exports, dependencies. Requires Node ≥ 20.19. v6 swapped the TypeScript backend for oxc-parser — confirm `compilers.svelte` is still the supported `.svelte` hook before scaffold (`10 §4`). |
|
||||
| **Vitest** | latest stable at scaffold | Unit tests for `src/lib/core`. |
|
||||
|
||||
Generated
+20
-2
@@ -1,17 +1,18 @@
|
||||
{
|
||||
"name": "bookmarkmagic",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bookmarkmagic",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.5.5",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
||||
"@types/node": "^24.13.3",
|
||||
"@vitest/coverage-v8": "^4.1.10",
|
||||
"@wxt-dev/module-svelte": "^2.0.5",
|
||||
"jsdom": "^30.0.1",
|
||||
@@ -1776,6 +1777,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.13.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz",
|
||||
"integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~7.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/trusted-types": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
|
||||
@@ -4404,6 +4415,13 @@
|
||||
"node": ">=22.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/unimport": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/unimport/-/unimport-6.3.1.tgz",
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.5.5",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
||||
"@types/node": "^24.13.3",
|
||||
"@vitest/coverage-v8": "^4.1.10",
|
||||
"@wxt-dev/module-svelte": "^2.0.5",
|
||||
"jsdom": "^30.0.1",
|
||||
|
||||
Reference in new issue
Block a user