Skip to content

feat: run on Node 20.18, the Node the editors ship - #64

Merged
ewanharris merged 3 commits into
mainfrom
claude/node-20
Oct 12, 2026
Merged

ewanharris merged 3 commits into
mainfrom
claude/node-20

Conversation

@ewanharris

Copy link
Copy Markdown
Member

Refs #22
Refs #23

Extensions run the server on the Node their editor ships. VS Code 1.100 is Electron 34 and Pulsar is Electron 32, and both are Node 20.18. A floor of 22 meant every user of either editor installing a newer Node before the server would start. This lowers the floor to 20.18. Day to day development and the test matrix don't change.

What changed

  • Map.groupBy → a loop in core/tiapp.ts. It was the only Node 21+ API the server used.
  • Node 20's types. @tsconfig/node20 sets the library to ES2023, and @types/node is pinned to ~20.17 (there's no 20.18 release of it). A newer API is now a compile error in npm run build and in the lint job, rather than a crash in an editor.
  • engines is >=20.18.
  • A Node 20 compatibility CI job builds on Node 20.18, starts out/server.js, and checks it answers initialize. tsc checks the API surface; this checks that what tsc emitted loads and runs there. That is all it does. The suite runs the sources through type stripping, which Node 20 lacks, so tests stay on 22 and 24.
  • AGENTS.md says where the floor comes from and what holds it there.

Why 20.18 and not 20.11

20.11 is what import.meta.dirname needs, so I tried that first. Pinning the types to 20.11 found Dirent.parentPath in core/fs.ts, which only arrived in 20.12. Neither runtime check would have caught it, because nothing in the smoke test reads a directory. 20.18 is what both editors ship, so it's the floor that matters.

Checked

What Where Result
The CI step, run exactly as written in the YAML Node 20.18.0 answers initialize
The same step against a missing server Node 20.20.2 fails at once, exit 1
tsc with Map.groupBy put back Node 20 types TS2550
The whole compiled suite, as a one-off (not in CI) Node 20.18.0 1219/1219
npm test Node 22 1219/1219, above the coverage floor
npm run test:package Node 22 10/10
Lint — clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01AAKDFVwAZoxefLNvX45pE4


Generated by Claude Code

VS Code 1.100 and Pulsar both run extensions on Node 20.18, so a floor
of 22 meant their users installing a newer Node before the server would
start. The server used one newer API, Map.groupBy, which is now a loop.

The types are Node 20's: @tsconfig/node20 and @types/node pinned to
~20.17, so a newer API is a compile error. Pinning them found
Dirent.parentPath, which is 20.12, and set the floor at 20.18 rather
than 20.11.

A CI job starts the built server on Node 20.18 and has it answer
initialize. The suite and the development loop stay on 22 and 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AAKDFVwAZoxefLNvX45pE4
Copilot AI balanced review requested due to automatic review settings October 12, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The lockfile has an inconsistent engine floor, and module grouping introduces quadratic copying.

1 open finding
What changed in this PR

Lowers runtime support to Node 20.18 for editor compatibility while retaining newer development environments.

Changes:

  • Targets Node 20 APIs and replaces Map.groupBy.
  • Adds a Node 20.18 initialization smoke test.
  • Documents the runtime/development version split.
File Description
tsconfig.json Targets Node 20 configuration.
src/​core/​tiapp.ts Replaces unsupported grouping API.
package.json Lowers engine floor and pins Node 20 types.
package-lock.json Updates dependency resolutions.
AGENTS.md Documents Node compatibility constraints.
.github/​workflows/​ci.yml Adds Node 20.18 smoke testing.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/core/tiapp.ts Outdated
…te the lockfile

The lockfile's root engines still read >=20.11 from before the floor
moved to 20.18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AAKDFVwAZoxefLNvX45pE4
@ewanharris
ewanharris merged commit bf7bf06 into main Oct 12, 2026
24 checks passed
@ewanharris
ewanharris deleted the claude/node-20 branch October 15, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants