Skip to content

Commit

Permalink
Remove * dependencies on @react-native (#42081)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lunaleaps authored and facebook-github-bot committed Dec 28, 2023
1 parent e2fb88e commit b5e08e8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"index.js"
],
"dependencies": {
"@react-native/codegen": "*"
"@react-native/codegen": "0.74.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/eslint-parser": "^7.20.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@react-native/codegen": "*",
"@react-native/codegen": "0.74.0",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@babel/plugin-transform-typescript": "^7.5.0",
"@babel/plugin-transform-unicode-regex": "^7.0.0",
"@babel/template": "^7.0.0",
"@react-native/babel-plugin-codegen": "*",
"@react-native/babel-plugin-codegen": "0.74.0",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-babel-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "*",
"@react-native/babel-preset": "0.74.0",
"hermes-parser": "0.18.2",
"nullthrows": "^1.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen-typescript-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "*"
"@react-native/codegen": "0.74.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down

0 comments on commit b5e08e8

Please sign in to comment.