Repository navigation
feat: run on Node 20.18, the Node the editors ship - #64
Merged
Merged
Conversation
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
There was a problem hiding this comment.
🟡 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.
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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 incore/tiapp.ts. It was the only Node 21+ API the server used.@tsconfig/node20sets the library to ES2023, and@types/nodeis pinned to~20.17(there's no 20.18 release of it). A newer API is now a compile error innpm run buildand in the lint job, rather than a crash in an editor.enginesis>=20.18.Node 20 compatibilityCI job builds on Node 20.18, startsout/server.js, and checks it answersinitialize. 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.mdsays where the floor comes from and what holds it there.Why 20.18 and not 20.11
20.11 is what
import.meta.dirnameneeds, so I tried that first. Pinning the types to 20.11 foundDirent.parentPathincore/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
initializetscwithMap.groupByput backTS2550npm testnpm run test:package🤖 Generated with Claude Code
https://claude.ai/code/session_01AAKDFVwAZoxefLNvX45pE4
Generated by Claude Code