Skip to content

ci: pin publish-and-release job to Node 22.x - #2836

Merged
ymc9 merged 1 commit into
devfrom
fix/publish-node-22
Sep 10, 2026
Merged

ymc9 merged 1 commit into
devfrom
fix/publish-node-22

Conversation

@ymc9

@ymc9 ymc9 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Problem

The Publish and Release run for v3.9.4 failed in @zenstackhq/language#build:

> langium generate
Reading config from .../packages/language/langium-config.json
TypeError: Invalid URL
    at Validator.resolve (.../jsonschema@1.5.0/lib/validator.js:263:16)
  code: 'ERR_INVALID_URL',
  input: '/undefined#/$defs/languageItem',
  base: 'thismessage::/'

Root cause

langium-cli validates langium-config.json with jsonschema@1.5.0, which resolves $refs via new URL(ref, 'thismessage::/'). That base has an opaque path, so resolving a path-absolute reference against it is invalid per the URL spec. Older Node/ada accepted it; Node 24.20.0 correctly throws.

The publish job pinned node-version: 24.x and the runner resolved it to v24.20.0 (see node: v24.20.0 in the log). Nothing in v3.9.4 caused this — v3.9.3 published fine on Aug 31 with an older 24.x.

Reproduced locally with new URL('/undefined#/x', 'thismessage::/'):

Node Result
20.19.5 / 20.20.2 / 22.21.1 / 22.23.2 / 24.18.0 / 26.5.0 ok
24.20.0 ERR_INVALID_URL

Running the exact langium generate under 24.20.0 reproduces the CI stack trace; under 24.18.0 it succeeds.

Fix

jsonschema@1.5.0 is the latest release, so there is no upgrade to take. Pin the publish job to Node 22.x, which is what every build-test job already uses and passes on.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the release workflow to use Node.js 22.x.

Node 24.20.0 tightened WHATWG URL parsing, so resolving a path-absolute
$ref against jsonschema's opaque `thismessage::/` base now throws
ERR_INVALID_URL. That breaks `langium generate` (via jsonschema@1.5.0)
and fails the language package build in the publish workflow.

jsonschema@1.5.0 is the latest release, so pin the job to Node 22.x,
matching the rest of CI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 93e1a408-187c-4c07-8f34-931d973eb2c2

📥 Commits

Reviewing files that changed from the base of the PR and between b886207 and 42dae29.

📒 Files selected for processing (1)
  • .github/workflows/publish-release.yml

📝 Walkthrough

Walkthrough

The publish-and-release workflow now uses Node.js 22.x instead of Node.js 24.x. No other workflow behavior changed.

Changes

Release workflow

Layer / File(s) Summary
Update release runtime
.github/workflows/publish-release.yml
The publish-and-release job pins actions/setup-node to Node.js 22.x.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/publish-node-22

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ymc9
ymc9 merged commit eb8895f into dev Sep 10, 2026
1 of 7 checks passed
@ymc9
ymc9 deleted the fix/publish-node-22 branch September 10, 2026 05:24
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.

1 participant