From 78967b33c0562a07ff7b38c48056532cbf9321b4 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Thu, 25 Jan 2024 02:32:45 -0800 Subject: [PATCH] Bump CLI to 13.5.1 (#42183) Summary: Updates CLI to v13.5.1. ## Changelog: [GENERAL] [CHANGED] - Bump CLI to 13.5.1 Pull Request resolved: https://github.com/facebook/react-native/pull/42183 Test Plan: CI Reviewed By: christophpurrer Differential Revision: D52600707 Pulled By: huntie fbshipit-source-id: f314a405d8d7e9200595b42b62d354e61f0a2964 --- .circleci/configurations/jobs.yml | 2 + packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- scripts/template/initialize.js | 16 ++- yarn.lock | 143 +++++++++++---------- 5 files changed, 94 insertions(+), 77 deletions(-) diff --git a/.circleci/configurations/jobs.yml b/.circleci/configurations/jobs.yml index 4fc141b740d888..6083671dece7f0 100644 --- a/.circleci/configurations/jobs.yml +++ b/.circleci/configurations/jobs.yml @@ -349,6 +349,7 @@ jobs: enum: ["Hermes", "JSC"] environment: - PROJECT_NAME: "AndroidTemplateProject" + - YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - checkout_code_with_cache - run_yarn @@ -431,6 +432,7 @@ jobs: environment: - PROJECT_NAME: "iOSTemplateProject" - HERMES_WS_DIR: *hermes_workspace_root + - YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - checkout_code_with_cache - run_yarn diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 653f9f6ccf5624..b8f6c01a63525f 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native-community/cli-server-api": "13.0.0", - "@react-native-community/cli-tools": "13.0.0", + "@react-native-community/cli-server-api": "13.5.1", + "@react-native-community/cli-tools": "13.5.1", "@react-native/dev-middleware": "0.74.0", "@react-native/metro-babel-transformer": "0.74.0", "chalk": "^4.0.0", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 6a53fdb50881fe..51b2e8a35968c3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -96,9 +96,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "13.0.0", - "@react-native-community/cli-platform-android": "13.0.0", - "@react-native-community/cli-platform-ios": "13.0.0", + "@react-native-community/cli": "13.5.1", + "@react-native-community/cli-platform-android": "13.5.1", + "@react-native-community/cli-platform-ios": "13.5.1", "@react-native/assets-registry": "0.74.0", "@react-native/codegen": "0.74.0", "@react-native/community-cli-plugin": "0.74.0", diff --git a/scripts/template/initialize.js b/scripts/template/initialize.js index b5ed059f5775bc..b82915ac2407dc 100644 --- a/scripts/template/initialize.js +++ b/scripts/template/initialize.js @@ -43,6 +43,7 @@ const {reactNativeRootPath, templateName, templateConfigPath, directory} = argv; const REPO_ROOT = path.resolve(__dirname, '../..'); const VERDACCIO_CONFIG_PATH = `${reactNativeRootPath}/.circleci/verdaccio.yml`; +const NPM_REGISTRY_SERVER = 'http://localhost:4873'; async function install() { const VERDACCIO_PID = setupVerdaccio( @@ -66,7 +67,7 @@ async function install() { } execSync( - 'npm publish --registry http://localhost:4873 --access public', + `npm publish --registry ${NPM_REGISTRY_SERVER} --access public`, { cwd: packageAbsolutePath, stdio: [process.stdin, process.stdout, process.stderr], @@ -82,7 +83,7 @@ async function install() { process.stdout.write('Published every package \u2705\n'); execSync( - `node cli.js init ${templateName} --directory ${directory} --template ${templateConfigPath} --verbose --skip-install`, + `node cli.js init ${templateName} --directory ${directory} --template ${templateConfigPath} --verbose --skip-install --yarn-config-options npmRegistryServer="${NPM_REGISTRY_SERVER}"`, { cwd: `${reactNativeRootPath}/packages/react-native`, stdio: [process.stdin, process.stdout, process.stderr], @@ -95,6 +96,17 @@ async function install() { cwd: directory, stdio: [process.stdin, process.stdout, process.stderr], }; + + execSync( + `yarn config set npmRegistryServer "${NPM_REGISTRY_SERVER}"`, + options, + ); + + execSync( + 'yarn config set unsafeHttpWhitelist --json \'["localhost"]\'', + options, + ); + const success = await retry('yarn', options, 3, 500, ['install']); if (!success) { diff --git a/yarn.lock b/yarn.lock index 1195f86032bcaf..0a96c50a30549d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2384,43 +2384,45 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-13.0.0.tgz#5ac3b088f015965082bf3e286e2174c2595cc11a" - integrity sha512-ysOGB7Th2wuOnXuSdOZW/0eSlLCpyALHd7TpqKn11ykArfqrqzjwcjvO43MgiVG982DpYXbTMVt6ATEpLO65Ig== +"@react-native-community/cli-clean@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-13.5.1.tgz#383d02ed48379a6a21446d6fc28fc21617613e23" + integrity sha512-mfDSpQRSg6hw3QlWXRUcgHKueFwTB0nKamOBBNugPRF3DwCJ+vCS4NFTbjGnNCgkFCPDy42FmXC6nTkK8rtjvw== dependencies: - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" execa "^5.0.0" + glob "^7.1.3" -"@react-native-community/cli-config@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-13.0.0.tgz#36607d480d3efa4a6c351b681626fd0ef41d6c91" - integrity sha512-u81kuajfbSp2gnDuM/YzE3zcdYFvDzIyL+wr/4hOGueCvSCP6ZhS0LxXMAezBx8hwjwutG+pPJG13tb371V6sQ== +"@react-native-community/cli-config@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-13.5.1.tgz#45b5a0e3dccd029a9260fd99919eaf13957c9a67" + integrity sha512-kwnkrUdSh7skFoRMn4bzL/lVtFbcFxfc8i7PZQjudvLJkFs8BAOXDLFwZeNSNnW1STdRJWGL6kIxwoHOKUbJUw== dependencies: - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-13.0.0.tgz#dd362c957e8db9a94fda7317bf3385f1ce82b8b3" - integrity sha512-SsvVrLZBwvd8tRCWvsZwj8Kzaf1mQFQ+BUfZzt+oOztGZFXLFQ8eN13IPUZBHeyfFUtI62jteotse1X9BalRUQ== +"@react-native-community/cli-debugger-ui@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-13.5.1.tgz#804a2e31754aa23a26782f4c411e5d73ed5c9b03" + integrity sha512-VASW7KZsATtvQNHb26pDJ1JDMq+B5sGZTgMjUfg4sLDnjZFmHtyX8MIjmTTKfurZ0Kqi7fxeGTiHiRXCXKHXzQ== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-13.0.0.tgz#89da6fffc25c4b67c1e0d4753f2d69f2b510c8e1" - integrity sha512-IxYhuGIPcvCTiccVzjw3dgb3YPvdn3iKwCPY4YzL9TeR4DLB+S5f+bfcVqrAwJWgj9F9EAldLYsQGteR7RWBCA== +"@react-native-community/cli-doctor@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-13.5.1.tgz#4aef9ce3875fe1ce253ff69157ce89829db008f8" + integrity sha512-mTb1HwrMirV4RMjtk0B0+j3862Pz61/qjmL1FiR5QaDHD6KzNucwoY6DDQvltFmojmWpbEdiRf6x49sDz9VxmQ== dependencies: - "@react-native-community/cli-config" "13.0.0" - "@react-native-community/cli-platform-android" "13.0.0" - "@react-native-community/cli-platform-ios" "13.0.0" - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-config" "13.5.1" + "@react-native-community/cli-platform-android" "13.5.1" + "@react-native-community/cli-platform-apple" "13.5.1" + "@react-native-community/cli-platform-ios" "13.5.1" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2435,53 +2437,55 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-hermes@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-13.0.0.tgz#978e8304c95f4c0b2d31c9490b7f1d4e72e187e5" - integrity sha512-FN6Zs1fJ+CyR8war9QGxI+2dMeFbqmhR4W1n+XaBZA/QbNPR1kPD+zs87zalzSJuFlYoVyGaTHoVDJHGGpjKTQ== +"@react-native-community/cli-hermes@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-13.5.1.tgz#5bb94582009124874791297802389f7881d08cce" + integrity sha512-PE0UMJZx4OcsKXoRzeEkaSz+x9/GdZi/ezgJ5TCnuhoSpgUPO9g5UrkGcmWqDD41W+JWWwCE3N9eLryyXd0wmQ== dependencies: - "@react-native-community/cli-platform-android" "13.0.0" - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-platform-android" "13.5.1" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-13.0.0.tgz#9ea8d9cd959d58b1ff0404030b15a2068c6cfbad" - integrity sha512-qpd6eOTtzL4MnHOhwvU1pVSr+Q2d/gy27T77Fx0Cc98YWz2Uy/KqEQ4d2Zch+4gNhmSBmE6ewQa1XIF767vCPA== +"@react-native-community/cli-platform-android@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-13.5.1.tgz#2d2f55be5d85fc911ff0b24b1c50bf8ad22d1b86" + integrity sha512-U6TixH8X1LsheCr5Sd7/68OpH4DbLcNhbqROfnezIByimjNpLby2mQ85yPXTrV1MYck0Q78L99yvevqLZbJ53Q== dependencies: - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.2.4" glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-ios@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-13.0.0.tgz#250d823174a7f3e6e46d03fabaf40c6f3c301e0b" - integrity sha512-x3fMunOlXbcw0zlRxwnvwSQMdQVnANqHlLDrd0neiLzf/dG094PqtCbyJSFmw+65+iViemnzfwGDmocrVPuiOA== +"@react-native-community/cli-platform-apple@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-apple/-/cli-platform-apple-13.5.1.tgz#facd4a7c03f905fde1636ca1fbf21f4adf3ccdbb" + integrity sha512-vhS0RGR/q+XM0ycIcfsK2nWkcYLXifJj5thXRvZEhn800OorhRHf6qYaN/y6RV9ruZLkrevSg17/fBpXTibpdw== dependencies: - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-tools" "13.5.1" chalk "^4.1.2" execa "^5.0.0" fast-xml-parser "^4.0.12" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-13.0.0.tgz#4c3bfcd8f51a8c5212355c4110d5f81c9783c8ea" - integrity sha512-HcIF23/Af5ghqV5F1ksHVIwVjVtHFeKht4U14DbO85HWw19SwYJ8O+GdDafXy7wdpxE6s0H4ZZDFnNk3zoc/Hg== +"@react-native-community/cli-platform-ios@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-13.5.1.tgz#f4a5ee353bccf3a633ce6ea5e7af68e8ba26f252" + integrity sha512-AdTMgGF9W5KMYmI0iPViMKt3uzoahi9TBSilHoty8vZ5KLxmx1imB4Co54db8aIbwhpK0q5wBSJPjR1Ij99c1g== + dependencies: + "@react-native-community/cli-platform-apple" "13.5.1" -"@react-native-community/cli-server-api@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-13.0.0.tgz#e937503c6fb3fa42e8380e2b35cb18f19e168c6d" - integrity sha512-PHg/dc4BQhMgV0LzrZ0JFus1hrYIOl2yOOb5SsHklQALhtQebAozEtMOJMmQ5G/yjRxKcfaLwTm+MoydC0fPlw== +"@react-native-community/cli-server-api@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-13.5.1.tgz#bb29480a9f982706d51e9a79bbaef2eae8cc6896" + integrity sha512-Ke1wWHfEZHcruA3kOpKGO6i21uXIt3AzUi3eLVLZWDtYnyfRUzkWwYycbrcmSgDfboWrFc4uHMk9uHT4PHsnZA== dependencies: - "@react-native-community/cli-debugger-ui" "13.0.0" - "@react-native-community/cli-tools" "13.0.0" + "@react-native-community/cli-debugger-ui" "13.5.1" + "@react-native-community/cli-tools" "13.5.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" @@ -2490,10 +2494,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-13.0.0.tgz#c3136dc3648f763f3eb6068df56ca14f12ace155" - integrity sha512-3C/GiFpIJbbuWgH+4T63vmL7K1OjYIs62rbGJp+BW6BbCTZpgMMk3EMZz1fNctaNcj+95jqmnd01PYTE1s/sIA== +"@react-native-community/cli-tools@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-13.5.1.tgz#3e5b76e0083d106c5b0d06edf6fb5d6c9c456b23" + integrity sha512-IIC/xGjSJCKFnhedgP8FAL85IBYsEf80FNrPxmIcaHVTHxE4eXs5/Cc/d2NgL8BZGBT8QK3TV4XQuWbgDGBCoQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2506,27 +2510,26 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-13.0.0.tgz#319c40479cbaee256c032583674da2b0571ed81e" - integrity sha512-YkxUKej10MBwlgcFs1ltV5ofsKbsdPMjAluIhVzTfU+paIqATSdyvUVOw/7wCqujQnBdm0xJlLyjXQy9qzpJeQ== +"@react-native-community/cli-types@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-13.5.1.tgz#a8d68f61a8ba7e59add7f492daa0288ed0ad61ce" + integrity sha512-hvRqXZdCPc8kPnKtXxH9dVlEFiMZTPlaJ1p5tV2p3Y+rFkK1mf0Kb6CHG3mDgJhSt1Ssbg159nfNzD0ApC25lA== dependencies: joi "^17.2.1" -"@react-native-community/cli@13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-13.0.0.tgz#8c6b5337cc149b80c049b50ed3127862ff3357e7" - integrity sha512-keDK0pJDUhTqm0Wj7IibdeWecMmD/obUagf/eTC+pCmt5Pyqy/3S8mObKwvYUH1HZk6YHtFAgqF7qUMpBE05ww== - dependencies: - "@react-native-community/cli-clean" "13.0.0" - "@react-native-community/cli-config" "13.0.0" - "@react-native-community/cli-debugger-ui" "13.0.0" - "@react-native-community/cli-doctor" "13.0.0" - "@react-native-community/cli-hermes" "13.0.0" - "@react-native-community/cli-plugin-metro" "13.0.0" - "@react-native-community/cli-server-api" "13.0.0" - "@react-native-community/cli-tools" "13.0.0" - "@react-native-community/cli-types" "13.0.0" +"@react-native-community/cli@13.5.1": + version "13.5.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-13.5.1.tgz#f81936f79c4dc503d3e914fd214b56b42a57b771" + integrity sha512-k6Mk2cxCSvJ9bRWGvBtTdtcl+FPttrHPl91XezU0pjuXa9fwRRUInn0i5DcZWa31QDK/G5AGiNhdwIPADDkt3Q== + dependencies: + "@react-native-community/cli-clean" "13.5.1" + "@react-native-community/cli-config" "13.5.1" + "@react-native-community/cli-debugger-ui" "13.5.1" + "@react-native-community/cli-doctor" "13.5.1" + "@react-native-community/cli-hermes" "13.5.1" + "@react-native-community/cli-server-api" "13.5.1" + "@react-native-community/cli-tools" "13.5.1" + "@react-native-community/cli-types" "13.5.1" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0"