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

[LOCAL] fix(cli,metro,babel): bump cli and metro and babel to fix Windows+Metro issue #35786

Merged
merged 5 commits into from
Jan 17, 2023

Conversation

kelset
Copy link
Contributor

@kelset kelset commented Jan 6, 2023

Summary

Local 71 PR to bump necessary packages to address an issue we found on Windows with Metro.

Basically, the issue is as follows (from @robhogan's great report)

Git Bash users on Windows who don't have Watchman installed will experience "Unable to resolve" red boxes, because Metro silently doesn't discover any files. This will affect both new and existing projects with default settings.

This has been addressed via patch release of Metro 0.73.7, which requires a bump of CLI too. So this PR was made react-native-community/cli#1787 that led to this CLI release: https://github.com/react-native-community/cli/releases/tag/v10.1.0

Problem is that if we only bump Metro and CLI to these new versions in 0.71 branch, yarn install gets thrown into an infinite loop that errors out with a OOM error.

The root cause seems to be related to the fact that between 0.73.5 and 0.73.7, babel was bumped to 7.20, as you can see here facebook/metro@v0.73.5...v0.73.7#files_bucket

By doing the minimal amount of babel bumps (we need a more well done babel-deps alignment in main branch), this is addressed and yarn install works correctly. This PR is it.

Opening as a PR and not a straight commit because I want to make sure we can discuss if we want to merge this before 0.71.0 or since it's more work than expected, it'd be better to wait for 0.71.1 when we can test things more carefully.

Changelog

[GENERAL] [CHANGED] - Bump CLI to 10.1.0, Metro to 0.73.7, Babel to ^7.20.0

Test Plan

CI is green.

@kelset kelset requested a review from mhorowitz as a code owner January 6, 2023 10:53
@facebook-github-bot facebook-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. Contributor A React Native contributor. p: Microsoft Partner: Microsoft Partner labels Jan 6, 2023
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.
⚠️

scripts/run-ci-e2e-tests.js#L22 - scripts/run-ci-e2e-tests.js line 22 – 'rm' is assigned a value but never used. (no-unused-vars)

Generated by 🚫 dangerJS against 24d4e22

@kelset kelset changed the base branch from main to 0.71-stable January 6, 2023 10:54
Copy link
Member

@huntie huntie left a comment

Choose a reason for hiding this comment

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

Thanks! As this PR does not target main, we're good to merge directly here without the facebook-github-bot workflow I believe.

@robhogan
Copy link
Contributor

robhogan commented Jan 6, 2023

As a bit of context on the Babel updates, there is some value there - the update fixes a @babel/parser bug that some people were running into on upgrading RN in an existing project: #34719 (comment)

Problem is that if we only bump Metro and CLI to these new versions in 0.71 branch, yarn install gets thrown into an infinite loop that errors out with a OOM error.

👀!

@robhogan
Copy link
Contributor

robhogan commented Jan 9, 2023

@cortinico / @cipolleschi I guess the 0.71.0 release is imminent, are we targeting this fix for 0.71.1?

@kelset
Copy link
Contributor Author

kelset commented Jan 9, 2023

@cortinico / @cipolleschi I guess the 0.71.0 release is imminent, are we targeting this fix for 0.71.1?

yeah that's the plan at the moment, since this PR bumps babel too so it needed to be a bit more looked into

@motiz88
Copy link
Contributor

motiz88 commented Jan 9, 2023

The test_js failure here looks like mostly snapshot changes (due to benign changes in the formatting of Babel's output) plus some issue I don't immediately understand with resolving @babel/preset-flow in a test.

@kelset
Copy link
Contributor Author

kelset commented Jan 10, 2023

The test_js failure here looks like mostly snapshot changes (due to benign changes in the formatting of Babel's output) plus some issue I don't immediately understand with resolving @babel/preset-flow in a test.

remember that this PR is on the 0.71-stable branch, so the fact that CI gets funky is most likely (also) related to that

@kelset kelset force-pushed the kelset/71-bump-cli-and-metro-and-babel branch from c0a758c to ec1c1d2 Compare January 17, 2023 11:22
@kelset kelset merged commit df7c92f into 0.71-stable Jan 17, 2023
@kelset kelset deleted the kelset/71-bump-cli-and-metro-and-babel branch January 17, 2023 13:52
hoxyq pushed a commit to hoxyq/metro that referenced this pull request May 18, 2023
Summary:
While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

X-link: facebook/react-native#35787

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 668de2623494b56867c68e9911a276239554411e
hoxyq pushed a commit to hoxyq/metro that referenced this pull request May 18, 2023
Summary:
Pull Request resolved: facebook#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

X-link: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 73bbe08817f89143ca3bad17e37f8922372797ee
hoxyq pushed a commit to hoxyq/metro that referenced this pull request May 18, 2023
Summary:
Pull Request resolved: facebook#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

X-link: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 7bf82121a6cf76c4f65a3680b32bdd8a06538902
hoxyq pushed a commit to hoxyq/metro that referenced this pull request May 18, 2023
Summary:
Pull Request resolved: facebook#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

X-link: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: c3aa02e1f29133b51dd138ec926ef0c73b78cf84
facebook-github-bot pushed a commit to facebook/metro that referenced this pull request May 18, 2023
Summary:
Pull Request resolved: #987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

X-link: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d
facebook-github-bot pushed a commit that referenced this pull request May 18, 2023
Summary:
X-link: facebook/metro#987

While working on #35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: #35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d
hoxyq pushed a commit to hoxyq/react-native that referenced this pull request May 19, 2023
Summary:
X-link: facebook/metro#987

While working on facebook#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: facebook#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d
@cipolleschi cipolleschi mentioned this pull request Oct 11, 2023
blakef pushed a commit to blakef/template that referenced this pull request Feb 28, 2024
Summary:
X-link: facebook/metro#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d

Original: facebook/react-native@f10dd3f
blakef pushed a commit to react-native-community/template that referenced this pull request Feb 29, 2024
Summary:
X-link: facebook/metro#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d

Original-Commit: facebook/react-native@f10dd3f
blakef pushed a commit to react-native-community/template that referenced this pull request Feb 29, 2024
Summary:
X-link: facebook/metro#987

While working on facebook/react-native#35786 I noticed some inconsistencies in the versioning for Babel and Flow across the monorepo. So in this PR I wanted to address that so that for 0.72 we'll have the codebase in a more consistent shape.

Happy to split in multiple PRs if needed.

## Changelog
[GENERAL] [CHANGED] - Bump Babel packages to ^7.20.0 (or closest latest release), bump flow parser to 0.206.0 in a few places that were left out from latest bump

Pull Request resolved: facebook/react-native#35787

Test Plan: CI is green.

Reviewed By: cipolleschi

Differential Revision: D42384881

Pulled By: hoxyq

fbshipit-source-id: 21fd43391d12722cf707c3cdbbb36f49c036359d

Original-Commit: facebook/react-native@f10dd3f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. p: Microsoft Partner: Microsoft Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants