ci: restore Node 24.x for publish, patch jsonschema URL resolution - #2838
Conversation
#2836 pinned the publish job to Node 22.x to dodge a `langium generate` crash on Node 24.20.0, but that broke publishing: the job uses npm trusted publishing (OIDC, no NODE_AUTH_TOKEN since #2680), which needs npm >= 11.5.1. Node 22 ships npm 10.9.8, so the registry PUT fell back to setup-node's placeholder token and failed with E404. Fix the root cause instead. jsonschema@1.5.0 resolves `$ref`s against the opaque base `thismessage::/`, which Node 24.20.0's stricter URL parser correctly rejects for path-absolute references. Patch the base to `thismessage:/` and restore Node 24.x. jsonschema@1.5.0 is the latest release and langium-cli@4.4.0 still depends on `~1.5.0`, so there is no upgrade path. Verified under Node 24.20.0: `pnpm --filter @zenstackhq/language build` succeeds with no change to generated sources, and invalid configs are still rejected by schema validation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe build-test and release workflows now use Node.js 24.x. The pnpm configuration applies a patch to jsonschema 1.5.0. The patch changes the fallback URL base for schema property pointer resolution. ChangesRelease and schema updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to CI and release workflows now use Node.js 24.x, with the jsonschema URL-resolution patch applied for compatibility. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Also bumps the Verified locally on Node 24.20.0 (the version that broke the publish runner):
Note |
Follow-up to #2836, which fixed the build but broke publishing.
What went wrong
#2836 pinned the publish job to Node 22.x to dodge a
langium generatecrash on Node 24.20.0. The build then passed, but the publish step failed:The job has no
NODE_AUTH_TOKEN— #2680 removed it when switching to npm trusted publishing (OIDC), and bumped Node 22.x → 24.x in the same commit, because trusted publishing requires npm ≥ 11.5.1:langium generate)Under Node 22, npm 10 ignores OIDC and falls back to the
.npmrcauthToken, which setup-node leaves as the literal placeholderXXXXX-XXXXX-XXXXX-XXXXX→ unauthenticated PUT → npm's usual E404. Provenance still signed, since that path uses the Actions OIDC token directly rather than registry auth.This PR
Restores
node-version: 24.xand fixes the actual defect instead.jsonschema@1.5.0resolves$refs withnew URL(ref, 'thismessage::/'). That base has an opaque path (note the double colon), so resolving a path-absolute reference against it is invalid per the URL spec. Node ≤ 24.18.0 accepted it; Node 24.20.0's updatedadacorrectly throwsERR_INVALID_URL, which surfaces as:The patch changes the base to
thismessage:/, restoring the pre-24.20.0 resolution result on every Node version.jsonschema@1.5.0is the latest release andlangium-cli@4.4.0still depends on~1.5.0, so there is no upgrade path.Verification
Under Node 24.20.0 (the version the failing runner used):
pnpm --filter @zenstackhq/language buildsucceeds, with no change to generated sources.langium-config.jsonyieldsinstance.languages[0].grammar is not of a type(s) string, which exercises the exact$refpath that used to throw.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Chores