Skip to content

chore: bump minimum required Node.js version from 18 to 22 - #915

Merged
grunch merged 3 commits into
lnp2pBot:mainfrom
Matobi98:chore/update-node-22
Aug 12, 2026
Merged

chore: bump minimum required Node.js version from 18 to 22#915
grunch merged 3 commits into
lnp2pBot:mainfrom
Matobi98:chore/update-node-22

Conversation

@Matobi98

@Matobi98 Matobi98 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bump the minimum required Node.js version from 18 to 22 across package.json (engines), the Dockerfile (both build and production stages), and the CI lint workflow.
  • Update @types/node from ^20.16.15 to ^22.10.5 to match the new Node engine version and get accurate type definitions for Node 22.

Why

Node 18 has reached end-of-life. This also unblocks upgrading the invoices library, whose latest release (6.0.0) requires Node >= 22.

Changes

  • package.json: engines.node >=18.0.0>=22.0.0; @types/node ^20.16.15^22.10.5
  • Dockerfile: node:20-alpinenode:22-alpine (builder and production stages)
  • .github/workflows/code-linter.yaml: node-version 18.x22.x

Testing

  • npm ci — installs cleanly on Node 22
  • npx tsc --noEmit — no type errors
  • npm run lint — no lint errors
  • Manually tested the /sell and /buy flows end-to-end running on Node 22
  • Reviewed the Node 18 → 22 changelog for breaking changes affecting this codebase (streams, crypto, TLS/OpenSSL, DNS, fetch/WebSocket, process.exit, URL parsing, V8/Intl, npm behavior, native module ABI for canvas, etc.) — no functional breakage found. @types/node was the only actionable gap, now fixed by this PR.

Summary by CodeRabbit

  • Chores
    • Updated the minimum required Node.js version to 22 or later.
    • Updated container builds and automated workflows to use Node.js 22.
    • Improved automated setup to support canvas installation during linting.
    • Refreshed Node.js compatibility definitions for the newer runtime.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b7b0ecaf-7337-4fe5-a5ca-27a1cd4312ce

📥 Commits

Reviewing files that changed from the base of the PR and between d4e2ae0 and 2b86d19.

📒 Files selected for processing (1)
  • .github/workflows/integrate.yaml

Walkthrough

The project now targets Node.js 22. Package requirements and Node.js type definitions were updated. Docker stages and CI workflows now use Node.js 22. The lint workflow also installs native canvas build dependencies.

Changes

Node.js 22 Upgrade

Layer / File(s) Summary
Node.js 22 package contract
package.json
The package requires Node.js 22 or newer and uses Node.js 22 type definitions.
Node.js 22 execution environments
Dockerfile, .github/workflows/code-linter.yaml, .github/workflows/integrate.yaml
Docker stages and CI workflows use Node.js 22. The lint workflow installs native canvas compilation dependencies.

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

Suggested reviewers: grunch, toryvand

Poem

A rabbit checks the Node.js trail,
Twenty-two hops without a fail.
Alpine builds and linting glow,
Canvas tools are set to go.
Nibble, build, and ship tonight!

🚥 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 summarizes the main change: raising the project's minimum required Node.js version to 22.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@ermeme ermeme Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found one blocking CI/runtime consistency issue.

This PR raises the declared/runtime target to Node 22 in package.json, the Dockerfile, and the lint workflow, but .github/workflows/integrate.yaml still runs the full ci_to_main job inside node:20-bookworm (including npm install, npx tsc, npm ci, and npm test). After this change, that job would still be validating Node 20 even though the package now declares engines.node >=22.0.0, so the main integration test path can miss Node-22-specific failures and no longer matches the supported runtime.

Please update the integration workflow container (and its comment) to Node 22 as well, so all CI/runtime paths agree on the new minimum.

Verification performed on the current head:

  • GitHub checks for d4e2ae0a14b6d9d7a0f72852f6985a3c84886679: CodeQL, Analyze, Lint, and ci_to_main are green.
  • Local Node: v22.22.2 / npm 10.9.7.
  • npm ci --ignore-scripts, npx tsc --noEmit, and npm run lint passed.
  • Full local npm ci / tests were blocked by missing system canvas build deps on this runner, so I relied on the GitHub CI result for full install/test coverage.

@grunch grunch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@grunch
grunch merged commit 37e2ff0 into lnp2pBot:main Aug 12, 2026
5 checks passed
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