Alex Hunt
fc5e33b582
Reorganise shared script utils ( #52473 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52473
Shared utils that were located in the root of `scripts/` are now colocated closer to their dependencies or moved to `scripts/shared/` — simplifying the root directory layout.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D77873875
fbshipit-source-id: e04dba41a1ef811d32793931033fdfa93afad0cd
2025-07-08 06:10:36 -07:00
Tim Yung
3e6423fe65
RN: Flowify packages/rn-tester ( #51788 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788
Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.
This also adds any necessary type annotations and fixes lint warnings.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75899307
fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
2025-06-04 12:03:52 -07:00
Tim Yung
cc9074884a
RN: Add @noflow to Node.js Scripts ( #51779 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51779
Adds `noflow` to a bunch of Node.js script files.
In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75883703
fbshipit-source-id: a8fed3aaa9c55ecda919a705940f8b34504cb07c
2025-06-04 12:03:52 -07:00
Alex Hunt
d6bf51cad9
Refactor remaining forEachPackage call sites ( #43112 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43112
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D53942028
fbshipit-source-id: 335bff3c3a31026bae7140fac1d1a6aae23a0f1e
2024-02-20 09:55:46 -08:00
Luna Wei
05ec058ac5
Add print-packages as a command ( #41959 )
...
Summary:
Working on releases, I'm often looking for the name of our monorepo packages (as sometimes the name doesn't align with the directory) and also getting a list of the versions of everything, as well as if its private/public -- which I've interpreted to mean that we publish it or we don't. I thought this might be convenient to add.
## Changelog:
[Internal] - Add `print-packages` as a command to print our monorepo packages (including react-native)
Pull Request resolved: https://github.com/facebook/react-native/pull/41959
Test Plan:
```
❯ yarn print-packages
yarn run v1.22.19
$ node ./scripts/monorepo/print
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┐
│ (index) │ Public? │ Name │ Version (main) │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┤
│ 0 │ '✅ ' │ 'react-native/assets-registry' │ '0.74.0' │
│ 1 │ '✅ ' │ 'react-native/babel-plugin-codegen' │ '0.74.0' │
│ 2 │ '✅ ' │ 'react-native/community-cli-plugin' │ '0.74.0' │
│ 3 │ '✅ ' │ 'react-native/debugger-frontend' │ '0.74.0' │
│ 4 │ '✅ ' │ 'react-native/dev-middleware' │ '0.74.0' │
│ 5 │ '✅ ' │ 'react-native/eslint-config' │ '0.74.0' │
│ 6 │ '✅ ' │ 'react-native/eslint-plugin' │ '0.74.0' │
│ 7 │ '✅ ' │ 'react-native/eslint-plugin-specs' │ '0.74.0' │
│ 8 │ '❌ ' │ 'react-native/hermes-inspector-msggen' │ '0.72.0' │
│ 9 │ '✅ ' │ 'react-native/metro-config' │ '0.74.0' │
│ 10 │ '✅ ' │ 'react-native/normalize-colors' │ '0.74.1' │
│ 11 │ '✅ ' │ 'react-native/js-polyfills' │ '0.74.0' │
│ 12 │ '✅ ' │ 'react-native' │ '1000.0.0' │
│ 13 │ '✅ ' │ 'react-native/babel-preset' │ '0.74.0' │
│ 14 │ '✅ ' │ 'react-native/metro-babel-transformer' │ '0.74.0' │
│ 15 │ '❌ ' │ 'react-native/bots' │ '0.0.0' │
│ 16 │ '✅ ' │ 'react-native/codegen' │ '0.74.0' │
│ 17 │ '❌ ' │ 'react-native/codegen-typescript-test' │ '0.0.1' │
│ 18 │ '✅ ' │ 'react-native/gradle-plugin' │ '0.74.0' │
│ 19 │ '❌ ' │ 'react-native/tester' │ '0.0.1' │
│ 20 │ '❌ ' │ 'react-native/tester-e2e' │ '0.0.1' │
│ 21 │ '✅ ' │ 'react-native/typescript-config' │ '0.74.0' │
│ 22 │ '✅ ' │ 'react-native/virtualized-lists' │ '0.74.0' │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┘
✨ Done in 0.55s.
```
Also added filter flag for private/public
```
❯ yarn print-packages --type private
yarn run v1.22.19
$ node ./scripts/monorepo/print --type private
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┐
│ (index) │ Public? │ Name │ Version (main) │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┤
│ 0 │ '❌ ' │ 'react-native/hermes-inspector-msggen' │ '0.72.0' │
│ 1 │ '❌ ' │ 'react-native/bots' │ '0.0.0' │
│ 2 │ '❌ ' │ 'react-native/codegen-typescript-test' │ '0.0.1' │
│ 3 │ '❌ ' │ 'react-native/tester' │ '0.0.1' │
│ 4 │ '❌ ' │ 'react-native/tester-e2e' │ '0.0.1' │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┘
✨ Done in 0.16s.
```
Also added a npm query where you can see the latest published version of a minor
```
❯ yarn print-packages --type public --minor 72
yarn run v1.22.19
$ node ./scripts/monorepo/print --type public --minor 72
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┬──────────────────────────────────────┐
│ (index) │ Public? │ Name │ Version (main) │ Version (72) │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┼──────────────────────────────────────┤
│ 0 │ '✅ ' │ 'react-native/assets-registry' │ '0.74.0' │ '0.72.0' │
│ 1 │ '✅ ' │ 'react-native/babel-plugin-codegen' │ '0.74.0' │ '0.72.3' │
│ 2 │ '✅ ' │ 'react-native/community-cli-plugin' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 3 │ '✅ ' │ 'react-native/debugger-frontend' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 4 │ '✅ ' │ 'react-native/dev-middleware' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 5 │ '✅ ' │ 'react-native/eslint-config' │ '0.74.0' │ '0.72.2' │
│ 6 │ '✅ ' │ 'react-native/eslint-plugin' │ '0.74.0' │ '0.72.0' │
│ 7 │ '✅ ' │ 'react-native/eslint-plugin-specs' │ '0.74.0' │ '0.72.4' │
│ 8 │ '✅ ' │ 'react-native/metro-config' │ '0.74.0' │ '0.72.11' │
│ 9 │ '✅ ' │ 'react-native/normalize-colors' │ '0.74.1' │ '0.72.0' │
│ 10 │ '✅ ' │ 'react-native/js-polyfills' │ '0.74.0' │ '0.72.1' │
│ 11 │ '✅ ' │ 'react-native' │ '1000.0.0' │ '0.72.8' │
│ 12 │ '✅ ' │ 'react-native/babel-preset' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 13 │ '✅ ' │ 'react-native/metro-babel-transformer' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 14 │ '✅ ' │ 'react-native/codegen' │ '0.74.0' │ '0.72.8' │
│ 15 │ '✅ ' │ 'react-native/gradle-plugin' │ '0.74.0' │ '0.72.11' │
│ 16 │ '✅ ' │ 'react-native/typescript-config' │ '0.74.0' │ 'No match found for version ^0.72.0' │
│ 17 │ '✅ ' │ 'react-native/virtualized-lists' │ '0.74.0' │ '0.72.8' │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┴──────────────────────────────────────┘
```
Reviewed By: cortinico
Differential Revision: D52347140
Pulled By: lunaleaps
fbshipit-source-id: 75811730e1afd5aae2d9fba4e437cd0d3d424a90
2024-01-02 11:46:03 -08:00