Skip to content

Commit

Permalink
fix(react-native-codegen): upgrade jscodeshift@17.0.0 to resolve ou…
Browse files Browse the repository at this point in the history
…tdated dependencies (#46724)

Summary:
This upgrades `jscodeshift` from `0.14.0` to `17.0.0`, to resolve unsupported babel dependencies when installing React Native. See expo/expo#31613

## Changelog:

[GENERAL] [FIXED] - Upgrade Codegen dependency `jscodeshift@17.0.0` to resolve outdated dependencies

Pull Request resolved: #46724

Test Plan:
To test it out yourself:

- `npx create-expo@latest ./test-codegen`
- `cd ./test-codegen`
- `npm why babel/plugin-proposal-nullish-coalescing-operator@7.18.6 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-nullish-coalescing-operator/v/7.18.6)
- `npm why babel/plugin-proposal-class-properties@7.18.6 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-class-properties/v/7.18.6)
- `npm why rimraf@2.6.3 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/rimraf/v/2.6.3)
- `npm why babel/plugin-proposal-optional-chaining@7.21.0 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/babel/plugin-proposal-optional-chaining/v/7.21.0)

> [!IMPORTANT]
> There are other dependencies that require an update, unfortunately there are no flow typings available (yet).
> - `npm why glob@7.2.3 | grep codegen` - [npm deprecation](https://www.npmjs.com/package/glob/v/7.2.3)

Reviewed By: cortinico

Differential Revision: D63629133

Pulled By: huntie

fbshipit-source-id: 3799e49677b8e5fd64841e6c7f855bde10e15072
  • Loading branch information
byCedric authored and facebook-github-bot committed Oct 1, 2024
1 parent 290258f commit 39c98fb
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"glob": "^7.1.1",
"hermes-parser": "0.23.1",
"invariant": "^2.2.4",
"jscodeshift": "^0.14.0",
"jscodeshift": "^17.0.0",
"nullthrows": "^1.1.1",
"yargs": "^17.6.2"
},
Expand Down
77 changes: 70 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb"
integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==

"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.20.0", "@babel/core@^7.23.9", "@babel/core@^7.25.2":
"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.20.0", "@babel/core@^7.23.9", "@babel/core@^7.24.7", "@babel/core@^7.25.2":
version "7.25.2"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77"
integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==
Expand Down Expand Up @@ -252,7 +252,7 @@
js-tokens "^4.0.0"
picocolors "^1.0.0"

"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.3", "@babel/parser@^7.25.6":
"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7", "@babel/parser@^7.25.0", "@babel/parser@^7.25.3", "@babel/parser@^7.25.6":
version "7.25.6"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f"
integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==
Expand Down Expand Up @@ -546,7 +546,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.24.8"

"@babel/plugin-transform-class-properties@^7.25.4":
"@babel/plugin-transform-class-properties@^7.24.7", "@babel/plugin-transform-class-properties@^7.25.4":
version "7.25.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz#bae7dbfcdcc2e8667355cd1fb5eda298f05189fd"
integrity sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==
Expand Down Expand Up @@ -1069,7 +1069,7 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"

"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.18.0":
"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.18.0", "@babel/preset-typescript@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz#66cd86ea8f8c014855671d5ea9a737139cbbfef1"
integrity sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==
Expand All @@ -1080,7 +1080,7 @@
"@babel/plugin-transform-modules-commonjs" "^7.24.7"
"@babel/plugin-transform-typescript" "^7.24.7"

"@babel/register@^7.0.0", "@babel/register@^7.13.16":
"@babel/register@^7.0.0", "@babel/register@^7.13.16", "@babel/register@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.24.6.tgz#59e21dcc79e1d04eed5377633b0f88029a6bef9e"
integrity sha512-WSuFCc2wCqMeXkz/i3yfAAsxwWflEgbVkZzivgAmXl/MxrXeoYFZOOPllbC8R8WTF7u61wSRQtDVZ1879cdu6w==
Expand Down Expand Up @@ -2634,6 +2634,13 @@ ast-types@0.15.2:
dependencies:
tslib "^2.0.1"

ast-types@^0.16.1:
version "0.16.1"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2"
integrity sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==
dependencies:
tslib "^2.0.1"

astral-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
Expand Down Expand Up @@ -5904,6 +5911,30 @@ jscodeshift@^0.14.0:
temp "^0.8.4"
write-file-atomic "^2.3.0"

jscodeshift@^17.0.0:
version "17.0.0"
resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-17.0.0.tgz#a5a255b87cf9aab226133ddc02471e2ff7a88bd9"
integrity sha512-Af+MFsNwLSVO+t4kKjJdJKh6iNbNHfDfFGdyltJ2wUFN3furgbvHguJmB85iou+fY7wbHgI8eiEKpp6doGgtKg==
dependencies:
"@babel/core" "^7.24.7"
"@babel/parser" "^7.24.7"
"@babel/plugin-transform-class-properties" "^7.24.7"
"@babel/plugin-transform-modules-commonjs" "^7.24.7"
"@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7"
"@babel/plugin-transform-optional-chaining" "^7.24.7"
"@babel/plugin-transform-private-methods" "^7.24.7"
"@babel/preset-flow" "^7.24.7"
"@babel/preset-typescript" "^7.24.7"
"@babel/register" "^7.24.6"
flow-parser "0.*"
graceful-fs "^4.2.4"
micromatch "^4.0.7"
neo-async "^2.5.0"
picocolors "^1.0.1"
recast "^0.23.9"
temp "^0.9.4"
write-file-atomic "^5.0.1"

jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
Expand Down Expand Up @@ -6565,7 +6596,7 @@ metro@0.81.0-alpha.0, metro@^0.81.0-alpha.0:
ws "^7.5.10"
yargs "^17.6.2"

micromatch@^4.0.4:
micromatch@^4.0.4, micromatch@^4.0.7:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
Expand Down Expand Up @@ -7422,6 +7453,17 @@ recast@^0.21.0:
source-map "~0.6.1"
tslib "^2.0.1"

recast@^0.23.9:
version "0.23.9"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.9.tgz#587c5d3a77c2cfcb0c18ccce6da4361528c2587b"
integrity sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==
dependencies:
ast-types "^0.16.1"
esprima "~4.0.0"
source-map "~0.6.1"
tiny-invariant "^1.3.3"
tslib "^2.0.1"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
Expand Down Expand Up @@ -7852,7 +7894,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==

signal-exit@^4.1.0:
signal-exit@^4.0.1, signal-exit@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
Expand Down Expand Up @@ -8282,6 +8324,14 @@ temp@^0.8.4:
dependencies:
rimraf "~2.6.2"

temp@^0.9.4:
version "0.9.4"
resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.4.tgz#cd20a8580cb63635d0e4e9d4bd989d44286e7620"
integrity sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==
dependencies:
mkdirp "^0.5.1"
rimraf "~2.6.2"

terser@^5.15.0:
version "5.31.6"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1"
Expand Down Expand Up @@ -8324,6 +8374,11 @@ through@^2.3.6:
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==

tiny-invariant@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127"
integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==

tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
Expand Down Expand Up @@ -8820,6 +8875,14 @@ write-file-atomic@^4.0.2:
imurmurhash "^0.1.4"
signal-exit "^3.0.7"

write-file-atomic@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7"
integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==
dependencies:
imurmurhash "^0.1.4"
signal-exit "^4.0.1"

ws@^6.2.3:
version "6.2.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.3.tgz#ccc96e4add5fd6fedbc491903075c85c5a11d9ee"
Expand Down

0 comments on commit 39c98fb

Please sign in to comment.