Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: warn about upcoming Node.js v22 minimum for build plugins#7053

Merged
cshio merged 13 commits into
mainfrom
cshio/warn-upcoming-node-22
Jun 10, 2026
Merged

feat: warn about upcoming Node.js v22 minimum for build plugins#7053
cshio merged 13 commits into
mainfrom
cshio/warn-upcoming-node-22

Conversation

@cshio

@cshio cshio commented May 11, 2026

Copy link
Copy Markdown
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

Related to FRB-2069

Based on #5461 (warn about upcoming Node.js v18 minimum for build plugins)

When a build plugin would run on a Node.js version below the upcoming minimum (>=22.12.0), we now surface a deprecation warning during the build so plugin authors and users have advance notice before the breaking change lands.

Deploy id: 6a21c57c0e44ddcccde465c3
deploy_warning


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@cshio cshio self-assigned this May 11, 2026
@coderabbitai

coderabbitai Bot commented May 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72fe81ab-0a6e-4e51-9066-c01c8949b00d

📥 Commits

Reviewing files that changed from the base of the PR and between 3096a8b and fa1d3f3.

📒 Files selected for processing (1)
  • packages/build/tests/plugins/tests.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/build/tests/plugins/tests.js

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added detection and proactive warnings for upcoming Node.js 22.12.0 minimum version requirement, enabled via feature flag.
    • Plugin compatibility checks now validate Node 22.12.0 support with targeted warnings for unsupported plugins.
  • Improvements

    • Updated documentation links in Node version requirement warnings to reference current Node.js announcements.

Walkthrough

This PR adds an upcoming system Node.js minimum version (22.12.0) detector behind a feature flag to the plugin node version handler. When enabled and the user's Node version doesn't meet the upcoming minimum, the handler logs a targeted warning and inspects each plugin's package.json to report whether its declared engines.node range supports Node 22.12.0. The function signature of addPluginsNodeVersion expands to accept featureFlags and systemLog, warning links are updated, and tests/fixtures were extended to validate system log output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • 43081j
  • pieh
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a deprecation warning for an upcoming Node.js v22 minimum requirement for build plugins.
Description check ✅ Passed The description provides the issue reference (FRB-2069), context from a prior PR, motivation for the change, a deploy link with screenshot, and includes all checklist items, though none are marked completed.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cshio/warn-upcoming-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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

cshio and others added 5 commits June 3, 2026 13:31
Restore the targeted warning from the v20 cycle (#5461): when a plugin's
package.json engines.node range explicitly excludes Node.js 22, surface an
actionable logWarning telling the author to upgrade, in addition to the
general advance-notice warning. Also restore defensive optional chaining on
pluginPackageJson.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cshio cshio marked this pull request as ready for review June 4, 2026 15:14
@cshio cshio requested a review from a team as a code owner June 4, 2026 15:14

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 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/build/tests/plugins/tests.js`:
- Around line 114-137: The test creates a temp systemLog and asserts
platform-specific output but doesn't guard Windows or guarantee cleanup; wrap
the assertions and use of systemLog inside a platform check (e.g., if
(process.platform !== 'win32') around the Fixture run/expectations) to mirror
other tests, and ensure systemLog.cleanup() is executed in a finally block after
reading systemLog.path so the temp file is removed even if assertions fail;
locate the systemLog variable and the block that calls new
Fixture(...).runWithBuild() and move the cleanup into a finally surrounding that
work.
🪄 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: ff9ec24e-c5e1-452a-862a-9c21239514a9

📥 Commits

Reviewing files that changed from the base of the PR and between dc4e6c7 and 10ecbba.

⛔ Files ignored due to path filters (3)
  • deno.lock is excluded by !**/*.lock
  • packages/build/tests/core/snapshots/tests.js.snap is excluded by !**/*.snap
  • packages/build/tests/plugins/snapshots/tests.js.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • packages/build/src/plugins/node_version.ts
  • packages/build/src/plugins/resolve.js
  • packages/build/tests/core/snapshots/tests.js.md
  • packages/build/tests/plugins/snapshots/tests.js.md
  • packages/build/tests/plugins/tests.js

Comment thread packages/build/tests/plugins/tests.js Outdated
Comment thread deno.lock Outdated
@cshio cshio requested a review from serhalp June 4, 2026 22:28
@cshio cshio requested a review from hrishikesh-k June 9, 2026 17:50
@cshio cshio merged commit 66acbee into main Jun 10, 2026
31 checks passed
@cshio cshio deleted the cshio/warn-upcoming-node-22 branch June 10, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants