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

Fix monorepo package versions to version published with release #41958

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

lunaleaps
Copy link
Contributor

Summary:

As a step of releasing React Native, any picks that change monorepo packages will also be bumped and published.

We've been using patch ranges in react-native. The issue is that we don't currently support backwards compatibility, or it's not something we have process for. Given this, I'm inclined to remove the range dependency for all monorepo packages.

I wasn't sure if this would be an issue so creating a PR here first. Also not sure the extent of what packages should be affected. Creating this PR more as a discussion point

Changelog:

[GENERAL] [CHANGED] - Remove patch range dependencies for all our monorepo packages.

Test Plan:

n/a

@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. p: Facebook Partner: Facebook Partner labels Dec 15, 2023
Copy link

github-actions bot commented Dec 15, 2023

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.
⚠️ One hour and a half have passed and the E2E jobs haven't finished yet.

Generated by 🚫 dangerJS against fd1a34b

@kelset
Copy link
Contributor

kelset commented Dec 18, 2023

headsup, I don't think this will work by itself, the scripts that handle the monorepo packages bumping and alignment might be set to always add the ^, can't remember. @hoxyq do you remember what we did about this/if there was a reason we decided to leave the ^?

@lunaleaps
Copy link
Contributor Author

lunaleaps commented Dec 27, 2023

be set to always add the ^, can't remember.

They don't, I verified. Only if there is a ^ prefix

const updatedDependencyVersion = dependencyVersion.startsWith('^')
? `^${updatedPackageVersion}`
: updatedPackageVersion;

@lunaleaps lunaleaps marked this pull request as ready for review December 27, 2023 20:47
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,514,923 -8,063,042
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,753,224 -10,201,814
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: c75abef
Branch: main

facebook-github-bot pushed a commit that referenced this pull request Dec 28, 2023
Summary:
See #41929 for an issue on multiple monorepo packages being installed. The reason is that `*` resolves to whatever is tagged `latest` on npm.

We still need to fix the fact that our monorepo publish script will update the latest tag everytime we publish. For now, we should remove these from `main` and we will also update this in the 0.73 release branch.

I've left the two peer dependencies on `react-native` to keep at `*`.
```
virtualized-lists/package.json
30:    "react-native": "*"

rn-tester/package.json
32:    "react-native": "*"
```

As a peer-dependency this won't be a problem in terms of installing a second `react-native`. I thought about updating these to `nightly`, but that would install multiple nightly react-natives as the tag will be updated with each nightly release. I think for now this is fine and something we can revisit.

Things left to do
[ ] Fix monorepo publish script to not update `--latest`
[ ] Remove ^ dependencies on monorepo packages: #41958
[ ] Re-evaluate how we bump and align monorepo packages when we cut a release branch. I forget if we manually update this when we cut or if there is a script. We may want to change the script and have `main` dependencies point to some fake version like `1000.0.0` and only update these on nightly publishes. Regardless, this will need some discussion.

## Changelog:

[GENERAL] [CHANGED] - Be explicit about what monorepo versions we are using

Pull Request resolved: #42081

Test Plan: N/A

Reviewed By: cortinico, cipolleschi

Differential Revision: D52435234

Pulled By: lunaleaps

fbshipit-source-id: 67da029d2b637e3997c12c21fe2a9ab9bc344399
@lunaleaps lunaleaps merged commit 27eaa2f into 0.73-stable Dec 28, 2023
3 of 4 checks passed
@lunaleaps lunaleaps deleted the lunaleaps-remove-caret branch December 28, 2023 18:18
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
Summary:
See facebook#41929 for an issue on multiple monorepo packages being installed. The reason is that `*` resolves to whatever is tagged `latest` on npm.

We still need to fix the fact that our monorepo publish script will update the latest tag everytime we publish. For now, we should remove these from `main` and we will also update this in the 0.73 release branch.

I've left the two peer dependencies on `react-native` to keep at `*`.
```
virtualized-lists/package.json
30:    "react-native": "*"

rn-tester/package.json
32:    "react-native": "*"
```

As a peer-dependency this won't be a problem in terms of installing a second `react-native`. I thought about updating these to `nightly`, but that would install multiple nightly react-natives as the tag will be updated with each nightly release. I think for now this is fine and something we can revisit.

Things left to do
[ ] Fix monorepo publish script to not update `--latest`
[ ] Remove ^ dependencies on monorepo packages: facebook#41958
[ ] Re-evaluate how we bump and align monorepo packages when we cut a release branch. I forget if we manually update this when we cut or if there is a script. We may want to change the script and have `main` dependencies point to some fake version like `1000.0.0` and only update these on nightly publishes. Regardless, this will need some discussion.

## Changelog:

[GENERAL] [CHANGED] - Be explicit about what monorepo versions we are using

Pull Request resolved: facebook#42081

Test Plan: N/A

Reviewed By: cortinico, cipolleschi

Differential Revision: D52435234

Pulled By: lunaleaps

fbshipit-source-id: 67da029d2b637e3997c12c21fe2a9ab9bc344399
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. p: Facebook Partner: Facebook Partner Pick Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants