Skip to content

chore: adopt Node.js 24 development baseline and Node >=22.13.0 (#317) - #326

Open
thedavidweng wants to merge 4 commits into
1weiho:mainfrom
thedavidweng:node-24-runtime-baseline-21be
Open

chore: adopt Node.js 24 development baseline and Node >=22.13.0 (#317)#326
thedavidweng wants to merge 4 commits into
1weiho:mainfrom
thedavidweng:node-24-runtime-baseline-21be

Conversation

@thedavidweng

@thedavidweng thedavidweng commented Jul 16, 2026

Copy link
Copy Markdown

Issue reference

Closes / implements #317 (roadmap #318).

Base commit: 61839b78969edc1173657b7f53d53f6bff939f39

Exact scope

Runtime / package-manager / CI / release baseline only:

  • published engines.node>=22.13.0
  • development / release Node → 24 (.nvmrc, .node-version, release workflow)
  • CI matrix → Node 22.13.x and Node 24
  • packageManagerpnpm@11.13.1 via Corepack
  • pnpm 11 allowBuilds for required install scripts (esbuild, sharp, msw, protobufjs, core-js, rolldown)
  • docs + changeset

Out of scope (unchanged): React, Vite, lint tooling, TypeScript, Vitest, tsdown, Turbo, application dependencies.

Versions before and after

Item Before After
packages/core engines.node >=18 >=22.13.0
packages/cli engines.node >=18 >=22.13.0
CLI template engines.node (none) >=22.13.0
Root engines.node (none) >=22.13.0
packageManager pnpm@10.17.0 pnpm@11.13.1
Dev / release Node undocumented / CI Node 22 Node 24 (.nvmrc / .node-version)
CI Node single 22 matrix 22.13.x, 24
CI package manager setup pnpm/action-setup@v4 Corepack (corepack enable) + pnpm store cache
CI build job absent added (matrix)

Why the old state was a problem

  • Published packages claimed node >=18 while Node 18 and Node 20 are end-of-life — an untruthful support contract.
  • No checked-in Node version baseline (.nvmrc / .node-version), so local and release environments drifted.
  • Root pinned pnpm 10 while current stable pnpm 11.13.1 requires node >=22.13, matching the intended support floor.
  • CI only exercised a single Node 22 line and did not run pnpm build.

This is framed as unsupported/EOL runtime claims and compatibility baseline, not as a confirmed vulnerability in Node 18/pnpm 10 themselves.

Why these versions and tools were chosen

Breaking changes reviewed

  • Major engines bump for @open-slide/core and @open-slide/cli: Node 18 and Node 20 are no longer supported for install/runtime of published packages.
  • Consumers must use Node >=22.13.0.
  • Contributors should use Node 24 locally (corepack enable && pnpm install).
  • No public JS API surface changes.

Source changes required

  • package.json, packages/core/package.json, packages/cli/package.json, packages/cli/template/package.json
  • .nvmrc, .node-version
  • pnpm-workspace.yaml (allowBuilds)
  • .github/workflows/ci.yml, .github/workflows/release.yml
  • CONTRIBUTING.md, README.md, bug report template placeholder
  • .changeset/node-engines-22-13.md (major for core + cli)

Tests added or changed

None. Existing suite re-run on both Node lines (305 tests passed).

Benchmark results

This PR does not claim performance improvements. Install/size observations on the same machine (Node 24, pnpm 11.13.1 after):

Metric Before (Node 22.22.2 / pnpm 10.17.0) After (Node 24.18.0 / pnpm 11.13.1) Change
node_modules size (du -sh) 1.3G 1004M smaller install footprint under pnpm 11
packed @open-slide/core 272.9 kB / 145 files 272.9 kB / 145 files none
packed @open-slide/cli 53.1 kB / 26 files 53.1 kB / 26 files none (unpacked +0.1 kB from template engines)
lockfile package graph unchanged resolutions unchanged (pnpm install reported lockfile up to date) n/a

No percentage runtime improvement is claimed.

Security audit results

pnpm audit / pnpm audit --prod currently fail on this registry with HTTP 410 (npm legacy audit endpoint retired). Used OSV Scanner against pnpm-lock.yaml before and after.

Advisory Package/path Severity Production reachable Before After Resolution
GHSA-267c-6grr-h53f / GHSA-26hh-7cqf-hhc6 / GHSA-36qx-fr4f-26g5 / GHSA-492v-c6pp-mqqv / GHSA-8h8q-6873-q5fj / GHSA-c4j6-fc7j-m34r / GHSA-ffhc-5mcf-pf4q / GHSA-gx5p-jg67-6x7h / GHSA-h64f-5h5j-jqjh / GHSA-mg66-mrh9-m8jx / GHSA-vfv6-92ff-j949 / GHSA-wfc6-r584-vfw7 / GHSA-3g8h-86w9-wvmq next@16.2.4 (apps/web) mixed (up to 8.6) website runtime present present out of scope for #317; tracked for #323
GHSA-4w7w-66w2-5vf9 / GHSA-fx2h-pf6j-xcff / GHSA-v6wh-96g9-6wx3 vite@5.4.21 5.5–8.2 core/demo build+dev tooling present present deferred to #320 (Vite 8)
GHSA-5xrq-8626-4rwp vitest@2.1.9 9.8 development-only present present deferred to #322
GHSA-4x5r-pxfx-6jf8 @babel/core@7.29.0 3.2 transitive present present deferred to #323
GHSA-67mh-4wv8-2f99 / GHSA-g7r4-m6w7-qqqr esbuild 0.21.5 / 0.28.0 5.3 / 2.5 build tooling present present deferred to Vite/tooling PRs
other OSV hits (dompurify, protobufjs, postcss, valibot, diff, js-yaml, @opentelemetry/core) transitive mixed mostly website/dev present present unchanged by this PR; #323

Total OSV findings: 37 before → 37 after (lockfile resolutions intentionally unchanged).

This PR does not claim to resolve those advisories; it only changes the Node/pnpm contract.

Package and bundle-size changes

See table above. Published tarball sizes unchanged aside from the CLI template engines field (+0.1 kB unpacked).

Manual validation results

Same machine; Corepack-enabled pnpm 11.13.1.

Node 24.18.0

  • pnpm install --frozen-lockfile
  • pnpm format:check
  • pnpm lint ✅ (1 pre-existing Biome warning in request-guard.ts)
  • pnpm typecheck
  • pnpm test ✅ 305 tests
  • pnpm build ✅ (core, cli, demo, web)

Node 22.13.0

  • pnpm install --frozen-lockfile
  • pnpm format:check
  • pnpm lint
  • pnpm typecheck
  • pnpm test ✅ 305 tests
  • pnpm --filter @open-slide/core build
  • pnpm --filter @open-slide/cli build
  • pnpm --filter demo build

Known limitations

  1. Issue chore: adopt Node.js 24 for development and support maintained LTS runtimes #317 body on GitHub appears truncated; implementation followed chore: modernize the runtime and frontend toolchain in reviewable stages #318 + the task’s chore: adopt Node.js 24 for development and support maintained LTS runtimes #317 requirements.
  2. pnpm audit is currently unusable against registry.npmjs.org (410). OSV Scanner used instead.
  3. Existing lockfile advisories are intentionally left for later roadmap PRs (chore(core): migrate Vite 5 to Vite 8 and remove deprecated esbuild compatibility paths #320chore(deps): upgrade remaining runtime and application dependencies with evidence-based compatibility checks #323).
  4. pnpm 11 requires explicit allowBuilds entries; listed packages are only those that already needed install scripts under pnpm 10’s ignored-build warning.

Prohibited workarounds — confirmation

Not used:

  • --force
  • --legacy-peer-deps
  • dependency overrides / Yarn resolutions / npm aliases
  • patch-package / vendored forks
  • blanket TypeScript or lint suppressions
  • prerelease / canary packages
  • unrelated feature or UI changes
  • mass formatting unrelated to this PR

Summary by CodeRabbit

  • Compatibility

    • Published packages now require Node.js 22.13.0 or newer.
    • Recommended development environment updated to Node.js 24 with pnpm 11.13.1.
  • Documentation

    • Updated local setup and contributing guidance to use Corepack and align with the new Node/pnpm requirements.
  • Chores

    • Improved CI and release workflows to test against a wider Node.js matrix and use Corepack with explicit pnpm caching.
    • Enabled required dependency builds for more reliable workspace installs.

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@cursoragent is attempting to deploy a commit to the open-slide Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82389237-cbfd-4677-9479-92208811148a

📥 Commits

Reviewing files that changed from the base of the PR and between 816b3fa and e13af6f.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Walkthrough

The project now targets Node.js 24 for development and CI while published packages require Node.js >=22.13.0. pnpm 11.13.1 is configured through Corepack, CI and release caching are updated, and package build permissions are explicitly listed.

Changes

Node.js and pnpm toolchain

Layer / File(s) Summary
Runtime and package contracts
.changeset/..., .node-version, .nvmrc, package.json, packages/*/package.json
Package metadata requires Node.js >=22.13.0, the project uses pnpm 11.13.1, Node.js 24 version files are defined, and major package bumps are recorded.
CI and release toolchain
.github/workflows/*, pnpm-workspace.yaml
CI covers Node.js 22.13.x and 24 with Corepack and explicit pnpm store caching; release setup follows .nvmrc; approved package build permissions are listed.
Setup and issue-reporting guidance
CONTRIBUTING.md, README.md, .github/ISSUE_TEMPLATE/bug_report.yml
Development prerequisites, setup commands, published-package compatibility, and bug-report examples describe the updated runtime and pnpm versions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit hops on Node twenty-four,
With Corepack keys beside the door.
pnpm caches neatly rest,
CI checks each furry quest.
New engines guard the package store!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adopting Node.js 24 as the development baseline and raising the minimum supported Node version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

20-21: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Disable credential persistence in checkout.

By default, actions/checkout persists the GitHub token in the local git configuration. Since these CI jobs execute untrusted code (e.g., during pnpm install, test, and build), this exposes the token to potential exfiltration. Consider setting persist-credentials: false across all CI checkout steps to improve the workflow's security posture.

  • .github/workflows/ci.yml#L20-L21: add with: persist-credentials: false under this step.
  • .github/workflows/ci.yml#L68-L69: add with: persist-credentials: false under this step.
  • .github/workflows/ci.yml#L113-L114: add with: persist-credentials: false under this step.
  • .github/workflows/ci.yml#L158-L159: add with: persist-credentials: false under this step.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 20 - 21, Disable Git credential
persistence for every actions/checkout@v4 step by adding persist-credentials:
false under with at .github/workflows/ci.yml lines 20-21, 68-69, 113-114, and
158-159.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/template/package.json`:
- Around line 6-8: Remove the Node.js engines constraint from the template
package.json, reverting the change while leaving the rest of the template
unchanged.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 20-21: Disable Git credential persistence for every
actions/checkout@v4 step by adding persist-credentials: false under with at
.github/workflows/ci.yml lines 20-21, 68-69, 113-114, and 158-159.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b023a742-10bd-4aea-8a28-0f050ac30b69

📥 Commits

Reviewing files that changed from the base of the PR and between 61839b7 and 9e92bd1.

📒 Files selected for processing (13)
  • .changeset/node-engines-22-13.md
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .node-version
  • .nvmrc
  • CONTRIBUTING.md
  • README.md
  • package.json
  • packages/cli/package.json
  • packages/cli/template/package.json
  • packages/core/package.json
  • pnpm-workspace.yaml

Comment thread packages/cli/template/package.json Outdated
Comment on lines +6 to +8
"engines": {
"node": ">=22.13.0"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Revert changes to this template file.

As per path instructions, packages/cli/template/**/{package.json,open-slide.config.ts}: Do not touch package.json, open-slide.config.ts, or other slides. Please remove this engines constraint to comply with the guidelines.

🐛 Proposed fix to revert changes
-  "engines": {
-    "node": ">=22.13.0"
-  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"engines": {
"node": ">=22.13.0"
},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/template/package.json` around lines 6 - 8, Remove the Node.js
engines constraint from the template package.json, reverting the change while
leaving the rest of the template unchanged.

Source: Path instructions

cursoragent and others added 3 commits July 25, 2026 23:01
Raise published package engines from node >=18 to >=22.13.0, pin pnpm
11.13.1 via Corepack, add .nvmrc/.node-version, and matrix CI across
Node 22.13.x and 24. Configure pnpm 11 allowBuilds for required
install scripts.

Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
Node 22.13 ships an outdated Corepack that fails pnpm signature verification
("Cannot find matching keyid"), leaving STORE_PATH empty and breaking cache.
Also run pull_request CI for stacked branches, not only PRs targeting main.

Co-authored-by: Davy <thedavidweng@users.noreply.github.com>
@thedavidweng
thedavidweng force-pushed the node-24-runtime-baseline-21be branch from 45e9c6f to 816b3fa Compare July 26, 2026 06:04
@thedavidweng

Copy link
Copy Markdown
Author

Rebased onto current main and addressed both CodeRabbit findings:

  • Reverted the engines addition to packages/cli/template/package.json (per the template's Do not touch package.json rule).
  • Added persist-credentials: false to every actions/checkout@v4 step in .github/workflows/ci.yml.
  • Resolved conflicts in .github/workflows/ci.yml (kept the new matrix+Corepack+build jobs and preserved the upstream e2e job that landed in test(core): add Playwright e2e suite for the framework runtime #354) and pnpm-workspace.yaml (kept both the e2e fixture package and the pnpm 11 allowBuilds list).

Local validation on Node 24.18.0 with pnpm 11.13.1: pnpm format:check, pnpm lint, pnpm typecheck, pnpm test (305 passed), and pnpm build all green.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 15-18: Add a top-level permissions block to the workflow with
contents read access, before the jobs or strategy definitions. Review all jobs
for required token scopes and add only demonstrably necessary permissions; leave
unspecified scopes disabled.

In @.github/workflows/release.yml:
- Around line 29-33: Update the “Enable Corepack” step to avoid the mutable
corepack@latest dependency by using the Node 22.13.0-bundled Corepack or pinning
the global installation to corepack@0.30.0; preserve the subsequent Corepack
enable and prepare actions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d4f8012e-89f2-4424-9c9d-ab9465517f4e

📥 Commits

Reviewing files that changed from the base of the PR and between 45e9c6f and 816b3fa.

📒 Files selected for processing (12)
  • .changeset/node-engines-22-13.md
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .node-version
  • .nvmrc
  • CONTRIBUTING.md
  • README.md
  • package.json
  • packages/cli/package.json
  • packages/core/package.json
  • pnpm-workspace.yaml
🚧 Files skipped from review as they are similar to previous changes (9)
  • .nvmrc
  • pnpm-workspace.yaml
  • packages/core/package.json
  • .changeset/node-engines-22-13.md
  • package.json
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • README.md
  • CONTRIBUTING.md
  • packages/cli/package.json

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/release.yml
@thedavidweng

Copy link
Copy Markdown
Author

Addressed the latest CodeRabbit review (post-rebase):

Fixed:

  • Added a top-level permissions: contents: read block to ci.yml.
  • Pinned corepack@0.30.0 in release.yml instead of corepack@latest.

The persist-credentials: false on all checkout steps was already in place from the previous review pass.

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.

2 participants