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

Add print-packages as a command #41959

Closed
wants to merge 4 commits into from
Closed

Conversation

lunaleaps
Copy link
Contributor

@lunaleaps lunaleaps commented Dec 16, 2023

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)

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'               │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┴──────────────────────────────────────┘

@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 16, 2023
Copy link

github-actions bot commented Dec 16, 2023

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

Generated by 🚫 dangerJS against d2950ce

@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Dec 29, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 16,582,053 +7
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 19,955,037 -1
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: b5e08e8
Branch: main

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@lunaleaps merged this pull request in 05ec058.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 2, 2024
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
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: facebook#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
@lunaleaps lunaleaps deleted the lunaleaps-print-packages branch January 29, 2024 19:51
lunaleaps added a commit that referenced this pull request Feb 4, 2024
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.

[Internal] - Add `print-packages` as a command to print our monorepo packages (including react-native)

Pull Request resolved: #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
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. Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants