Commit 0d2c505
committed
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.
[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: 75811730e1afd5aae2d9fba4e437cd0d3d424a901 parent f56bf1f commit 0d2c505
File tree
4 files changed
+190
-12
lines changed- scripts
- __tests__
- monorepo/print
4 files changed
+190
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
107 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 75 | | |
88 | 76 | | |
89 | 77 | | |
| |||
147 | 135 | | |
148 | 136 | | |
149 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
150 | 200 | | |
151 | 201 | | |
152 | 202 | | |
153 | 203 | | |
| 204 | + | |
154 | 205 | | |
155 | 206 | | |
156 | 207 | | |
| |||
0 commit comments