-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
chore: drop support for Node 18, that reached End-of-Life #11408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+60
−43
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
Size Change: +288 B (0%) Total Size: 11.7 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: +278 B (0%) Total Size: 12.1 MB ℹ️ View Unchanged
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
Signed Facebook CLA
pr: maintenance
This PR does not produce any behavior differences to end users when upgrading.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Node 18 reached end-of-life, is not maintained anymore, and won't receive security patches anymore: https://nodejs.org/en/blog/announcements/node-18-eol-support
It is highly recommended to upgrade the Node version to at least 20.0.
Older versions of libraries supporting Node 18 are also often not receiving maintenance and security patches anymore.
This positions us in a difficult position where if any library we use has security, and the newer maintained version does not support Node 18, we usually can't upgrade the library without upgrading Node.
This is notably the case for
webpack-dev-server
v4. It has a vulnerability (not critical for Docusaurus, but still annoying), but v4 is not really maintained anymore. A security backport could eventually land in v4, but the simpler option would be to upgrade to v5, which is maintained and already patched. But v5 requires a newer version of Node, so we can't upgrade without requiring a newer version of Node.This is one case that happened, but is likely to happen for other libs in the future. For that reason, we are going to upgrade to Node 20, and consider that from now on, we'll always drop support for end-of-life Node versions in minor releases.
Breaking change?
We are NOT going to consider it a semver-major breaking change.
Although it can technically force you to upgrade Node, it's something you should have already done.
This practice is common in the ecosystem. See, for example:
We want to keep Docusaurus v3 secure until Docusaurus v4 is out. And the only reasonable way to do this is to require a maintained Node version that our dependencies still support.
Note: since Rspack 1.5 now requires Node 18.12, and Docusaurus v3 initially supports 18.0, we also have a case where one of our transitive dependencies forces users to upgrade their Node version.
Test Plan
CI
Test links
We also take the opportunity to document our Node version policy:
https://deploy-preview-11408--docusaurus-2.netlify.app/community/release-process/#nodejs-support
Related issues/PRs
See also