ci(release): pin release + publish jobs to Node 22#207
Conversation
The Release workflow failed after PR #206 merged. tree-sitter@0.21.x ships a linux-x64 prebuild whose ABI no longer matches Node 24, and its binding.gyp does not request the C++20 standard Node 24's V8 headers now require. Under Node 24.12 (what release.yaml was pinned to) npm install falls back to a from-source compile that fails, and because tree-sitter is now in optionalDependencies it gets silently dropped from node_modules. The ensure-tree-sitter.mjs postinstall heal logs "bindings still unavailable" and exits 0 (non-fatal by design); the following tsc step then fails with Cannot find module 'tree-sitter' or its corresponding type declarations. CI did not catch this because ci.yaml runs on Node 22, where the prebuild matches and the heal short-circuits cleanly. Aligning the release job (and the publish job that follows it) to the same Node version closes the immediate drift. package.json engines is ">=22.0.0", so this is within the supported range. Bundles produced by Node 22 stay forward-compatible with end-user Node 24 runtimes — only the build host needs the matching ABI. Detection gap separately: ci.yaml should grow a Node version matrix so this class of regression fails on the PR instead of on main. Follow-up PR. publish-smoke-test.yaml is also pinned to 24.12 but is workflow_dispatch only, so it does not affect the automatic release pipeline. Same follow-up will align it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request updates the GitHub Actions release workflow to pin Node.js version 22 for both the ChangesNode.js Version Pin Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage ReportNo Generated for commit b618557. |
Why
The
Releaseworkflow failed on the merge commit of #206 (run 26430516153). Main is intact (the failure was before the 2-commit release pair landed) but v0.7.55 was never tagged or published.Root cause
ci.yaml(passed)release.yaml(failed)tree-sitter(optional dep) dropped fromnode_modules→ tsc later fails withCannot find module 'tree-sitter'The
ensure-tree-sitter.mjspostinstall heal added by #206 printsWARNING: tree-sitter bindings still unavailableand exits 0 (non-fatal by design), so the failure surfaces downstream intscinstead of at install time.Fix
Pin
release.yaml'sreleasejob and itspublishjob tonode-version: 22, matchingci.yaml.package.jsonengines is>=22.0.0so this is within the supported range; bundles produced by Node 22 stay forward-compatible with end-user Node 24 runtimes.Follow-up (not in this PR)
publish-smoke-test.yamlis also pinned to24.12but isworkflow_dispatchonly, so it does not affect the automatic release pipeline. Will align as part of the next follow-up.ci.yamlshould grow a Node version matrix (e.g.[22, 24]) so this class of cross-Node-major install regression fails on the PR rather than on the post-merge Release run. Separate PR.ensure-tree-sitter.mjsshould exit non-zero when its heal fails ANDCI=true, turning the silent warning into a red light. Same follow-up PR.Test plan
Releaseworkflow runs on Node 22 → notree-sitterABI / build failurepublish-smoke-testdry-run can still be invoked manually (no auto-run change in this PR)Summary by CodeRabbit