Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

fix(ci): include node types under TS6 + bump brace-expansion - #8

Merged
mcp-tool-shop merged 1 commit into
mainfrom
fix/ts6-node-types
May 19, 2026
Merged

fix(ci): include node types under TS6 + bump brace-expansion#8
mcp-tool-shop merged 1 commit into
mainfrom
fix/ts6-node-types

Conversation

@mcp-tool-shop

Copy link
Copy Markdown
Member

Summary

  • CI has been broken since 2026-04-25 due to TS 6.0.2 + @types/node 25.5.0 + module: Node16 no longer auto-including node type definitions. Every import { X } from "node:fs" failed with TS2591 "Cannot find name 'node:fs'" across the codebase.
  • Adding "types": ["node"] to tsconfig.json compilerOptions explicitly tells TS to include @types/node. Minimal, one-line tsconfig change — no other @types/* devDependencies exist so this doesn't narrow anything that was previously included.
  • Also runs npm audit fix for a transitive moderate-severity brace-expansion issue (GHSA-f886-m6hf-6m8v / GHSA-jxxr-4gwj-5jf2) so the next CI gate after build doesn't immediately fail too.

Test plan

Local verification on Node 22 (CI matrix is Node 20 + 22 — fix is at compile + tsconfig layer so behavior is identical on both):

  • npm run build — clean (was failing with ~50 TS2591 errors)
  • npm test — 93/93 pass
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • npm pack --dry-run — 57 files, 823.5 kB

Expected CI green after merge.

Why the regression happened

@types/node 25.x changed how its declarations interact with TypeScript 6 and module: Node16. Under that combination, TS no longer silently picks up the node package from node_modules/@types/. The fix is to either pin older deps (TS 5.9 + @types/node 22) or explicitly opt into the typings via compilerOptions.types. This PR takes the second path — strictly additive, no version pins changed.

🤖 Generated with Claude Code

TypeScript 6 with module: Node16 and @types/node@25 no longer auto-includes
node type definitions. `import { readFileSync } from "node:fs"` failed across
the codebase with TS2591 "Cannot find name 'node:fs'", breaking CI on every
push since 2026-04-25.

Adding `"types": ["node"]` to tsconfig.json compilerOptions explicitly tells
TS to include @types/node. Minimal, surgical change — no other @types/*
devDependencies exist, so this doesn't exclude anything.

Also picks up `npm audit fix` for brace-expansion (transitive, moderate
severity GHSA-f886-m6hf-6m8v / GHSA-jxxr-4gwj-5jf2) so the audit gate
passes once the build step is unblocked.

Local verification (Node 22):
- npm run build: clean
- npm test: 93/93 pass
- npm audit --audit-level=moderate: 0 vulnerabilities
- npm pack --dry-run: 57 files, 823.5 kB

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mcp-tool-shop
mcp-tool-shop merged commit 1f9cbbf into main May 19, 2026
2 checks passed
@mcp-tool-shop
mcp-tool-shop deleted the fix/ts6-node-types branch May 19, 2026 00:19
mcp-tool-shop added a commit that referenced this pull request May 19, 2026
v1.4.3 was authored 2026-03-25 (validate CLI + loadIndex error) but never
published; npm registry still has v1.4.2. This commit adds the 2026-05-18 CI
fix (PR #8) and the audit fix to the same in-flight v1.4.3 entry so they
ship together when v1.4.3 is eventually published.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mcp-tool-shop added a commit that referenced this pull request May 19, 2026
Pre-publish translation refresh via TranslateGemma 12B (concurrency=1, cold
cache). All 7 languages succeeded on first pass:

- ja:  ~88s (cold load)
- zh:  cache-hit
- es, fr, hi, it, pt-BR: 46-87s each

Nav bar verified — all 7 entries present. README.md content byte-identical
(only line-ending normalization). Translations now reflect:

- v1.4.0 agent runtime contract (planLoad/recordLoad/manualLookup)
- v1.4.1 hyphen-splitting tokenizer fix
- v1.4.2 README overhaul documenting full API surface
- v1.4.3 validate CLI command + loadIndex structured error

Ships v1.4.3 to npm with the PR #8 CI fix and brace-expansion audit bump
already committed (bec6cd1).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant