ci: build and publish on Node 22 LTS - #123
Merged
Merged
Conversation
Node 20 reached end of life, and all five workflow steps still pinned it —
including the one that publishes @neuledge/context to npm.
Node 22 rather than the newest LTS, because I tested both against the real
suite:
Node 24.19.0 install ok, build ok, TESTS FAIL
prebuild-install finds no binary for target=24.19.0, falls
back to node-gyp, and package-builder.test.ts then hangs
until the vitest worker is killed: 187/221 tests, exit 1.
Node 22.23.2 install ok, build ok, 221/221 and 41/41, exit 0, and a real
prebuilt binary so nothing compiles from source.
better-sqlite3 11.10.0 simply has no Node 24 prebuild. Reaching Node 24 means
first moving better-sqlite3 to 13.x, which itself declares engines
node >= 22 — so this bump is the prerequisite for that upgrade, not a
detour around it.
Leaves the published package's own constraints alone: no `engines` field is
added here, since that would newly restrict installs for users still on
Node 20 and belongs in its own change with a changeset.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBQQpA86yYzwJUiVz8ph2R
|
moshest
marked this pull request as ready for review
August 25, 2026 23:38
moshest
added a commit
that referenced
this pull request
Aug 31, 2026
node22.log and node24.log were local verification output from testing the Node bump, committed by mistake in #123. That diff was reviewed with `git diff --stat` before `git add -A`, and `git diff` only reports tracked modifications — so two untracked log files were invisible at review time and then swept in. Adds *.log to .gitignore so the same slip cannot repeat.
5 tasks
moshest
added a commit
that referenced
this pull request
Aug 31, 2026
better-sqlite3 11.10.0 does not work on Node 24: it builds, then
package-builder.test.ts hangs until the vitest worker is killed. 13.0.3 is
fine there.
13.x also drops prebuild-install and ships prebuilt binaries inside the
package (gypfile: false, no install script), while our root pnpm
onlyBuiltDependencies still listed better-sqlite3 and forced a build anyway.
Removing that entry lets the shipped binaries be used, so installs get faster
rather than slower.
Measured on clean installs, reproduced independently after the first worktree
was lost: Node 22.22.2 and Node 24.20.0 both 221/221 + 41/41 with zero source
compiles. The nightly publish path was validated separately by dispatching
registry-update.yml from this branch with {"since": "2"} — run #195, success.
This corrects the explanation in #123, which blamed the missing Node 24
prebuild. That was not the cause: 13.x compiles from source on Node 24 too
when forced, and passes. The 11.x code itself is what does not work there.
better-sqlite3 stays an optionalDependency and the sql.js fallback is
unchanged, so a failed native load still degrades rather than breaks.
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.
Summary
Node 20 is end-of-life, and all five workflow steps still pinned it — including the one that publishes
@neuledge/contextto npm. This moves them to Node 22 LTS.Why 22 and not 24
I tested both against the real suite rather than picking by recency:
Node 24 fails on the native dependency:
better-sqlite3@11.10.0ships no Node 24 binary, so it falls back tonode-gyp rebuild. The compile succeeds, butpackage-builder.test.ts— the file that leans hardest on SQLite — then hangs until vitest kills the worker:Node 22 uses a real prebuilt binary, so nothing compiles from source, and the whole suite is green.
This is the same class of failure behind the "40 pre-existing failures" reported on #117, which turned out to be Node v26 against this same
better-sqlite3.Path to Node 24
Not a dead end, just a different change.
better-sqlite3@13.0.3declaresengines: { node: ">=22" }— so this bump is the prerequisite for that upgrade, not a detour around it. Sequence:better-sqlite311 → 13 (two majors; needs its own review and a changeset)Deliberately not included
No
enginesfield on the published package. Adding one would newly restrict installs for users still on Node 20 — a user-facing change that needs its own PR and a changeset, not a silent rider on a CI bump.Test plan
ci.ymlexercised by this PR's own checksregistry-update.yml— will dispatch from this branch with{"since": "2"}before merge, as with ci: update actions off the deprecated Node 20 runtime #122Generated by Claude Code