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

Bump the minimum required version of Node.js to 20.x #5515

Closed
wants to merge 21 commits into from

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Oct 17, 2023

Trac ticket: https://core.trac.wordpress.org/ticket/59663


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.

@desrosj
Copy link
Contributor Author

desrosj commented Nov 27, 2023

I've made a request to the systems team to install 20.x on the build server. It's possible we can skip 18.x all together, though I'd advise we proceed as though we'll only have 18.x available for this current cycle (WP 6.5). We can always bump a second time should something change.

@desrosj desrosj marked this pull request as ready for review November 27, 2023 16:42
@desrosj
Copy link
Contributor Author

desrosj commented Dec 5, 2023

@swissspidy It seems that this change will cause the comparison between the previous branch and this one to fail because of the differing versions of Node.js/npm between them. Any idea around the best way to resolve this?

I do plan to backport this update to the 6.4 branch because that is currently the only other one that uses 16.x (all previous ones use 14.x).

Will that then cause the workflow to fail in the 6.4 branch when comparing the 6.3 branch? I'd expect it to be failing currently since the 6.3 branch uses 14.x and not 16.x. 🤔

@joemcgill
Copy link
Member

joemcgill commented Dec 5, 2023

@desrosj I think the old ones aren't failing because this will only happen when the workflow is run when comparing the current commit to the previous commit when the previous commit uses a different node version. Perhaps adding an nvm use or similar command before running npm ci when comparing against the previous commit will suffice? At any rate, I would expect the very next commit to resolve the issue.

@desrosj desrosj changed the title Bump the minimum required version of Node.js to 18.x Bump the minimum required version of Node.js to 20.x Dec 6, 2023
@swissspidy
Copy link
Member

What Joe says :) nvm install after "Check out target commit" and then again after "Reset to original commit" should do the trick. Should be safe to add, even if it theoretically only happens once when doing the version bump. For future commits it's a no-op because the Node version doesn't change between commits. So a reasonable addition 👍

@desrosj
Copy link
Contributor Author

desrosj commented Dec 20, 2023

@desrosj desrosj closed this Dec 20, 2023
@desrosj desrosj deleted the update/nodejs-20 branch December 20, 2023 18:57
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.

3 participants