-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Upgrade NodeJS to 16.x #4028
Upgrade NodeJS to 16.x #4028
Conversation
I see that CI jobs fail because of the peer dependencies related to React 18 upgrade:
I will report back to the Gutenberg repository. I wonder whether it would help if we roll back all changes to the lock file and then run Interestingly enough, when I read about this npm flag, I quickly saw the following note (source: https://stackoverflow.com/posts/66620869/revisions):
|
Issue filed in Gutenberg: WordPress/gutenberg#48009. |
We now have a source-of-truth for upgrading Node and npm to the latest LTS in the Gutenberg repository: WordPress/gutenberg#48588. |
# Conflicts: # package-lock.json
# Conflicts: # package-lock.json
Just linking this context. Appears we'll need to only target 16.x for the time being due to a systems limitation: https://make.wordpress.org/systems/2023/02/09/upgrade-nodejs-npm-on-the-build-server/. |
Hi, @desrosj! Curious about the status of this PR. Is there anything blocking us from moving this forward? Node 14 is now EOL, and we're preparing to merge WordPress/gutenberg#48950 with this so that there's less disruption. |
# Conflicts: # package-lock.json
@kevin940726 👋🏼 I've updated the PR to reflect the fact that we need to target 16 instead of 18. There are some build process failures, though. We need to figure out what's going on there. Are there any changes in WordPress/gutenberg#48950 that need to be committed to WordPress itself along with these changes? We also should publish a post communicating the plan to contributors. I can start drafting that! |
# Conflicts: # package-lock.json
WordPress/gutenberg#53426 was just merged in Gutenberg to bump to Node 16 🎉 So let's make it happen 🚀 |
It's very likely that we will have to use the following config line here as well: https://github.com/WordPress/gutenberg/blob/4a24e8560cb5c277ea90631ad81e3453933bc27e/.npmrc#L3
|
# Conflicts: # package-lock.json # src/wp-includes/assets/script-loader-packages.min.php
Flagged for review from a few folks that showed interest in this. I've gone and merged in the latest One thing I'd like to confirm before merging this is why there are changes in the |
I'm guessing that the update of the package-lock.json also updated some packages and among these packages is probably browser-list which includes the browser usage which probably changed slightly making arrow functions a syntax that is supported in all the supported browsers so it's not transpiled anymore. I think that's fine. |
@swissspidy, what if you run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick check for the post editor and the site editor, and it seems to work as before after:
rm -rf node_modules
nvm use
npm i
npm run build:dev
npm run env:start
Resolving some of the vulnerabilities reported in this commit or with a follow-up would be great.
Agreed! I plan to do a follow-up commit that upgrades all other dependencies to their latest versions that were not specifically required to make this upgrade work. Thanks everyone! I'll get this committed shortly. |
Merged in Core-56378. Post also published. Thanks all! |
This updates the version of NodeJS used for WordPress Core to 16.x.
18.x is not currently an option because of system level adjustments that need to be made in order for the build server and other .org infrastructure to properly support 18.x. See this post for more context.
Trac ticket: https://core.trac.wordpress.org/ticket/56658
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.