Skip to content
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

[rush] Add support for Node.js 18.x LTS #3940

Closed
wants to merge 5 commits into from
Closed

Conversation

octogonz
Copy link
Collaborator

Summary

@xuewan-seven pointed out that our repo doesn't support Node.js 18 in microsoft/rush-example#17

Node.js 18.x is now LTS as of 2022-10-25.

Node.js 14.x will reach end of line on 2023-04-30.

Details

  • Upgrade CI pipelines
  • Upgrade rush init template
  • Update logic in NodeJsCompatibility.ts
  • I replaced the confusing UPCOMING_NODE_LTS_VERSION constant with LATEST_NODE_LTS_VERSION

How it was tested

Tested locally. I also tested reportAncientIncompatibleVersion() by installing Node.js 8.9.0 and trying to build our repo. Rush crashed due to an unsupported RegExp, so I bumped the ancient version to 10.x

Fixes microsoft/rush-example#17

Copy link
Contributor

@dmichon-msft dmichon-msft left a comment

Choose a reason for hiding this comment

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

LGTM

@iclanton
Copy link
Member

iclanton commented Feb 1, 2023

@TheLarkInn tried doing this last year (#3571) and we found that Webpack 4 isn't compatible with Node 18. We could try to patch that, though. IIRC, it's some change to crypto.

You also need to add 18 to this line: https://github.com/microsoft/rushstack/blob/main/.github/workflows/ci.yml#L15

@@ -42,7 +42,7 @@
* LTS schedule: https://nodejs.org/en/about/releases/
* LTS versions: https://nodejs.org/en/download/releases/
*/
"nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0",
"nodeSupportedVersionRange": ">=16.13.0 <17.0.0 || >=18.12.1 <19.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you intentionally dropping support for Node 14? It's supported until 4/30/23.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mikeharder This is just for the rush init template that's used when people create new Git repositories. We could wait until the last day to adjust it, but I worried that it might take us months to remember to do that. 😆 You can of course put whatever range you like in your own rush.json.

If you think it's important for some reason let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I would err on the side of allowing older Node versions beyond EOL, rather than dropping support for active Node versions. But I agree customers can change this after rush init if they want, so it's not too important.

@octogonz
Copy link
Collaborator Author

Superseded by #4278

@octogonz octogonz closed this Aug 22, 2023
@octogonz octogonz deleted the octogonz/nodejs-lts-18 branch July 23, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

ERROR: running in node 18.12 environment
5 participants