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

chore: bump node to 20 #2151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
[
require.resolve('@babel/preset-env'),
{
targets: {node: '18'},
targets: {node: '20'},
Copy link
Member

Choose a reason for hiding this comment

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

Will RN 0.74 drop node 18? 0.73 targets node 18 as minimum so we need to keep this as 18, otherwise it’s a breaking change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, please look at the PR description.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the build step targets Node 20, running on Node 18 would be unsafe (even though it might work), so this looks like a breaking change to me?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, make sense 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, looks like babel.config.js only used for local development, and tsc (targeting ES2017) is used for npm builds? If that's the case this particular change isn't user facing.

But the bump of @types/node would allow the use of runtime features that aren't supported by Node 18. What's the motivation?

Copy link
Collaborator Author

@szymonrybczak szymonrybczak Dec 22, 2023

Choose a reason for hiding this comment

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

The initial purpose of this PR was to address a CI failures on Node v20, but we've resolved it by upgrading some dependencies so we don't need to bump Node now.

useBuiltIns: 'entry',
corejs: '2.x',
},
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"@react-native-community/eslint-config": "^3.2.0",
"@types/glob": "^7.1.1",
"@types/jest": "^26.0.15",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.3.7",
"@types/node": "^20.8.10",
"@types/node-fetch": "^2.6.8",
"@types/readable-stream": "^4.0.4",
"babel-jest": "^26.6.2",
"babel-plugin-module-resolver": "^3.2.0",
"chalk": "^4.1.2",
Expand All @@ -59,7 +60,7 @@
"typescript": "^5.2.0"
},
"resolutions": {
"@types/node": "^18.0.0"
"@types/node": "^20.8.10"
},
"lint-staged": {
"./packages/**/*.ts": [
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@react-native-community/cli-types": "13.1.0",
"@types/lodash": "^4.14.149",
"@types/mime": "^2.0.1",
"@types/node": "^18.0.0",
"@types/node-fetch": "^2.5.5",
"@types/node": "^20.8.10",
"@types/node-fetch": "^2.6.8",
"@types/shell-quote": "^1.7.1"
},
"files": [
Expand Down
42 changes: 24 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2341,18 +2341,20 @@
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=

"@types/node-fetch@^2.3.7", "@types/node-fetch@^2.5.5":
version "2.5.5"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.5.tgz#cd264e20a81f4600a6c52864d38e7fef72485e92"
integrity sha512-IWwjsyYjGw+em3xTvWVQi5MgYKbRs0du57klfTaZkv/B24AEQ/p/IopNeqIYNy3EsfHOpg8ieQSDomPcsYMHpA==
"@types/node-fetch@^2.6.8":
version "2.6.8"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.8.tgz#9a2993583975849c2e1f360b6ca2f11755b2c504"
integrity sha512-nnH5lV9QCMPsbEVdTb5Y+F3GQxLSw1xQgIydrb2gSfEavRPs50FnMr+KUaa+LoPSqibm2N+ZZxH7lavZlAT4GA==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
form-data "^4.0.0"

"@types/node@*", "@types/node@^18.0.0":
version "18.17.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.4.tgz#bf8ae9875528929cc9930dc3f066cd0481fe1231"
integrity sha512-ATL4WLgr7/W40+Sp1WnNTSKbgVn6Pvhc/2RHAdt8fl6NsQyp4oPCi2eKcGOvA494bwf1K/W6nGgZ9TwDqvpjdw==
"@types/node@*", "@types/node@^20.8.10":
version "20.8.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e"
integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==
dependencies:
undici-types "~5.26.4"

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down Expand Up @@ -2392,6 +2394,14 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==

"@types/readable-stream@^4.0.4":
version "4.0.4"
resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.4.tgz#21645a86e5214dc0b5c872b506653aa2512c1e33"
integrity sha512-NSAiePj3Iq3kBArfpUWRNX/mRw8DibYD6YhNCIJDfUP/iIOQYsNJgtHyjpbuZlcbL7TxILS8qYjY/nXXvtcFQg==
dependencies:
"@types/node" "*"
safe-buffer "~5.1.1"

"@types/semver@^6.0.2":
version "6.2.1"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.1.tgz#a236185670a7860f1597cf73bea2e16d001461ba"
Expand Down Expand Up @@ -5808,15 +5818,6 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=

form-data@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682"
integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
Expand Down Expand Up @@ -12555,6 +12556,11 @@ uncss@^0.17.2:
postcss-selector-parser "6.0.2"
request "^2.88.0"

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
Expand Down