-
Notifications
You must be signed in to change notification settings - Fork 433
[v4] Upgrade Node.js runtime from v20 to v24 #3169
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
Changes from 8 commits
7434149
30445af
d7ada03
1804381
d4bbcb7
d4b5380
3adb1ff
d899b2e
54ae8ba
dddf033
b2e2232
b66db86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/bin/bash | ||
| set -eu | ||
|
|
||
| # Change @types/node to v20 temporarily to check that the generated JS files are correct. | ||
| contents=$(jq '.devDependencies."@types/node" = "^20.0.0"' package.json) | ||
| echo "${contents}" > package.json | ||
|
|
||
| npm install | ||
|
|
||
| if [ ! -z "$(git status --porcelain)" ]; then | ||
| git config --global user.email "[email protected]" | ||
| git config --global user.name "github-actions[bot]" | ||
| # The period in `git add --all .` ensures that we stage deleted files too. | ||
| git add --all . | ||
| git commit -m "Use @types/node v20" | ||
| fi | ||
|
|
||
| # Wipe the lib directory in case there are extra unnecessary files in there | ||
| rm -rf lib | ||
|
|
||
| # Generate the JavaScript files | ||
| npm run-script build | ||
|
|
||
| # Check that repo is still clean. | ||
| # The downgrade of @types/node means that we expect certain changes to the generated JS files. | ||
| # Therefore, we should ignore these changes to @types/node and check for outstanding changes. | ||
| if [[ $(git diff | grep --perl-regexp '^-(?!--)' | grep --count --invert-match --perl-regexp '"@types/node": "\^24') -gt 0 || \ | ||
| $(git diff | grep --perl-regexp '^\+(?!\+\+)' | grep --count --invert-match --perl-regexp '"@types/node": "\^20') -gt 0 ]] | ||
| then | ||
| >&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update" | ||
| git diff | ||
| exit 1 | ||
| fi | ||
| echo "Success: JavaScript files are up to date" | ||
|
|
||
| # Clean up changes to package.json, package-lock.json, and lib/*.js. | ||
| git reset --hard HEAD~1 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.