Skip to content

Bump CLI to 13.5.1 - #42183

Closed
szymonrybczak wants to merge 4 commits into
react:mainfrom
szymonrybczak:bump/cli-13.4.0
Closed

Bump CLI to 13.5.1#42183
szymonrybczak wants to merge 4 commits into
react:mainfrom
szymonrybczak:bump/cli-13.4.0

Conversation

@szymonrybczak

@szymonrybczakszymonrybczak commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

Summary:

Updates CLI to v13.5.1.

Changelog:

[GENERAL] [CHANGED] - Bump CLI to 13.5.1

Test Plan:

CI

@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 8, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot

analysis-bot commented Jan 8, 2024

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a16,951,051-767
androidhermesarmeabi-v7an/a--
androidhermesx86n/a--
androidhermesx86_64n/a--
androidjscarm64-v8a20,334,831-761
androidjscarmeabi-v7an/a--
androidjscx86n/a--
androidjscx86_64n/a--

Base commit: cbd818d
Branch: main

@szymonrybczakszymonrybczak changed the title Bump CLI to 13.4.0Bump CLI to 13.5.0Jan 15, 2024
@szymonrybczak

Copy link
Copy Markdown
ContributorAuthor

cc @huntie I've updated the PR with the newest version, mind looking again? 🙏

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@huntiehuntie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@szymonrybczak Looks like the Yarn v3 breaking change is impacting our test_<platform>_template scripts in CircleCI.

Can you look at the changes to our CI scripts needed to support this?

cc @lunaleaps@fortmarek@cortinico@cipolleschi This may impact the yarn test-e2e-local script.
cc @motiz88@robhogan For significant JS infra change.

@szymonrybczak

szymonrybczak commented Jan 22, 2024

Copy link
Copy Markdown
ContributorAuthor

One of the breaking changes of Yarn v3 was that immutable installs on CI were enabled by default, meaning when there's a new yarn.lock file generated or there's a change in yarn.lock file it throws an error. When generating new project in test_<platform>_template it needs to create a yarn.lock so to workaround this error we need to set a YARN_ENABLE_IMMUTABLE_INSTALLS=false environment variable.

CleanShot 2024-01-22 at 20 27 41

cc @lunaleaps@fortmarek@cortinico@cipolleschi This may impact the yarn test-e2e-local script.

This error only applies in CI environments.

@szymonrybczak

szymonrybczak commented Jan 23, 2024

Copy link
Copy Markdown
ContributorAuthor

I see that after adding YARN_ENABLE_IMMUTABLE_INSTALLS=false to relevant jobs, project is properly created. But Android and iOS is not successfully building. I'm not sure is this change related to this fail 🤔 cc: @cipolleschi@cortinico do you have maybe any ideas why builds are failing?

@cortinico

Copy link
Copy Markdown
Contributor

@szymonrybczak the Android CI is failing because Verdaccio is not working properly (not sure why, but needs investigation). Practically what is happening is that we're pulling @react-native/gradle-plugin@0.74.0 from NPM (this one https://www.npmjs.com/package/@react-native/gradle-plugin/v/0.74.0) rather than the one from Verdaccio.

If you SSH inside the worker you'll see this:

$ yarn why @react-native/gradle-plugin
├─ react-native@file:/root/react-native/build/react-native-1000.0.0-fbaad3dff.tgz::locator=AndroidTemplateProject%40workspace%3A.
│ └─ @react-native/gradle-plugin@npm:0.74.0 (via npm:0.74.0)
│
└─ react-native@file:/root/react-native/build/react-native-1000.0.0-fbaad3dff.tgz::locator=AndroidTemplateProject%40workspace%3A. [9bad8]
└─ @react-native/gradle-plugin@npm:0.74.0 (via npm:0.74.0)

So it seems like with this change we're not accounting for Verdaccio anymore causing the CI to fail

@szymonrybczak

Copy link
Copy Markdown
ContributorAuthor

@cortinico ah I see, thanks for checking this! So actually to make Yarn v3 working with local server, and to make it properly download packages from that server we need to pass the server destination in .yarnrc.yml file. I've created an option to pass custom config when initialising project with React Native Community CLI: react-native-community/cli#2273.

@szymonrybczakszymonrybczak changed the title Bump CLI to 13.5.0Bump CLI to 13.5.1Jan 23, 2024
@szymonrybczak

szymonrybczak commented Jan 23, 2024

Copy link
Copy Markdown
ContributorAuthor

After setting npmRegistryServer and unsafeHttpWhitelist before installing packages, all tests are passing!

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Jan 25, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@huntie merged this pull request in 78967b3.

@szymonrybczak
szymonrybczak deleted the bump/cli-13.4.0 branch January 25, 2024 11:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.p: CallstackPartner: CallstackPartnerShared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@szymonrybczak@facebook-github-bot@analysis-bot@cortinico@huntie