mise run --skip-deps test:temporal-polyfill fails on a fresh checkout in both TypeScript consumer checks:
error TS2688: Cannot find type definition file for 'node'.
Entry point of type library 'node' specified in compilerOptions
Cause
scripts/check_temporal_polyfill.ts generates a consumer project under tmp/ with types: ["node"] but only symlinks @fedify/* into its node_modules. TypeScript resolves types from node_modules/@types in the project directory and its ancestors, and no such directory exists: the root package.json has no dependencies, pnpm hoists privately into node_modules/.pnpm/node_modules, and deno.json sets nodeModulesDir: "none". The check therefore passes only where an ancestor directory happens to contain @types/node. The task is not run in CI, so this was never caught.
Related problems
@fedify/fedify declares @types/node@^24.2.1 while the pnpm catalog pins ^22.17.0. The locked 24.3.0 conflicts with TypeScript 6.0's lib.dom on URLPattern (TS2403 with skipLibCheck: false); 22.19.1 and 24.12.2 pass.
findTypeScriptCompiler() picks the first typescript@* entry in readDir order. The .deno store holds 5.9.3, 6.0.3, and 7.0.2; with 5.9.3 the esnext.temporal lib is missing and 806 errors follow.
Proposed fix
- Symlink the catalog
@types/node into the consumer project (or set typeRoots).
- Align the
@types/node range in @fedify/fedify with the catalog.
- Sort compiler candidates by version and require TypeScript 6.0 or later.
- Run
test:temporal-polyfill in CI.
Disclosure: drafted with Claude Code (Claude Fable 5.1), reviewed and edited by a human before submission.
mise run --skip-deps test:temporal-polyfillfails on a fresh checkout in both TypeScript consumer checks:Cause
scripts/check_temporal_polyfill.ts generates a consumer project under tmp/ with
types: ["node"]but only symlinks@fedify/*into its node_modules. TypeScript resolvestypesfrom node_modules/@types in the project directory and its ancestors, and no such directory exists: the root package.json has no dependencies, pnpm hoists privately into node_modules/.pnpm/node_modules, and deno.json setsnodeModulesDir: "none". The check therefore passes only where an ancestor directory happens to contain@types/node. The task is not run in CI, so this was never caught.Related problems
@fedify/fedifydeclares@types/node@^24.2.1while the pnpm catalog pins^22.17.0. The locked 24.3.0 conflicts with TypeScript 6.0'slib.domonURLPattern(TS2403 withskipLibCheck: false); 22.19.1 and 24.12.2 pass.findTypeScriptCompiler()picks the firsttypescript@*entry inreadDirorder. The .deno store holds 5.9.3, 6.0.3, and 7.0.2; with 5.9.3 theesnext.temporallib is missing and 806 errors follow.Proposed fix
@types/nodeinto the consumer project (or settypeRoots).@types/noderange in@fedify/fedifywith the catalog.test:temporal-polyfillin CI.Disclosure: drafted with Claude Code (Claude Fable 5.1), reviewed and edited by a human before submission.