Why
Dependabot's TypeScript 7 bump (#122) fails CI, and the failure is not a lockfile problem — it exposes a fragile assumption in how this workspace resolves Node types.
Evidence
Run 31101319325 dies while building @opentag/discord:
src/gateway.ts(1,28): error TS2591: Cannot find name 'node:crypto'.
src/gateway.ts(94,43): error TS2591: Cannot find name 'Buffer'.
src/gateway.ts(397,30): error TS2591: Cannot find name 'process'.
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @opentag/discord@0.9.0 build
Root cause: @types/node is declared only in the root package.json, and no tsconfig sets types or typeRoots. Every workspace package therefore depends on TypeScript walking up from its own directory to the root node_modules/@types to find Node types. TypeScript 5.9 resolves it that way; TypeScript 7 does not in this pnpm workspace layout, so Node globals and node:* modules lose their types repo-wide.
@opentag/discord is simply the first package tsc -b reaches that imports a Node built-in, so any further TypeScript 7 breakage is still hidden behind this first failure.
Work
- Declare
@types/node as an explicit devDependency in every package and app that uses Node built-ins (or set typeRoots/types in tsconfig.base.json), then confirm the current TypeScript 5.9 build still passes. This is worth doing on its own merit — depending on the root-hoisted @types/node is fragile regardless of TypeScript 7.
- Re-attempt the TypeScript 7 bump on top of that and triage whatever surfaces once the build gets past
discord.
- Keep
@types/node on the major matching the lowest Node version we support (^22 today, see #123). Revisit only when engines moves.
Notes
- Dependabot now ignores semver-major updates for
typescript and @types/node, so these bumps will not reappear automatically until we act.
engines is currently inconsistent: >=22.14.0 for @opentag/cli, dispatcher, store, and local-runtime, but >=20 for the other 11 packages, while CI only runs Node 22. Worth reconciling as part of step 3, since it determines which @types/node major is correct.
Why
Dependabot's TypeScript 7 bump (#122) fails CI, and the failure is not a lockfile problem — it exposes a fragile assumption in how this workspace resolves Node types.
Evidence
Run 31101319325 dies while building
@opentag/discord:Root cause:
@types/nodeis declared only in the rootpackage.json, and no tsconfig setstypesortypeRoots. Every workspace package therefore depends on TypeScript walking up from its own directory to the rootnode_modules/@typesto find Node types. TypeScript 5.9 resolves it that way; TypeScript 7 does not in this pnpm workspace layout, so Node globals andnode:*modules lose their types repo-wide.@opentag/discordis simply the first packagetsc -breaches that imports a Node built-in, so any further TypeScript 7 breakage is still hidden behind this first failure.Work
@types/nodeas an explicit devDependency in every package and app that uses Node built-ins (or settypeRoots/typesintsconfig.base.json), then confirm the current TypeScript 5.9 build still passes. This is worth doing on its own merit — depending on the root-hoisted@types/nodeis fragile regardless of TypeScript 7.discord.@types/nodeon the major matching the lowest Node version we support (^22today, see #123). Revisit only whenenginesmoves.Notes
typescriptand@types/node, so these bumps will not reappear automatically until we act.enginesis currently inconsistent:>=22.14.0for@opentag/cli,dispatcher,store, andlocal-runtime, but>=20for the other 11 packages, while CI only runs Node 22. Worth reconciling as part of step 3, since it determines which@types/nodemajor is correct.