Files
react-native/package.json
T
Luna Wei 0d2c50568f 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: 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-02-04 12:54:18 -08:00

113 lines
4.1 KiB
JSON

{
"name": "@react-native/monorepo",
"private": true,
"version": "1000.0.0",
"description": "A framework for building native apps using React",
"license": "MIT",
"repository": "github:facebook/react-native",
"types": "types",
"jest-junit": {
"outputDirectory": "reports/junit",
"outputName": "js-test-results.xml"
},
"scripts": {
"android": "cd packages/rn-tester && npm run android",
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",
"build": "node ./scripts/build/build.js",
"bump-all-updated-packages": "node ./scripts/monorepo/bump-all-updated-packages",
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
"clean": "node ./scripts/build/clean.js",
"flow-check": "flow check",
"flow": "flow",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"format": "npm run prettier && npm run clang-format",
"lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck",
"lint-java": "node ./scripts/lint-java.js",
"lint": "eslint .",
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
"print-packages": "node ./scripts/monorepo/print",
"shellcheck": "./scripts/circleci/analyze_scripts.sh",
"start": "cd packages/rn-tester && npm run start",
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
"test-e2e-local-clean": "node ./scripts/test-e2e-local-clean.js",
"test-e2e-local": "node ./scripts/test-e2e-local.js",
"test-ios": "./scripts/objc-test.sh test",
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
"test-typescript": "dtslint packages/react-native/types",
"test": "jest",
"trigger-react-native-release": "node ./scripts/trigger-react-native-release.js",
"update-lock": "npx yarn-deduplicate"
},
"workspaces": [
"packages/*",
"tools/*"
],
"peerDependencies": {
"react": "18.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@babel/generator": "^7.20.0",
"@babel/plugin-transform-regenerator": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "0.73.14",
"@react-native/metro-config": "0.73.4",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.57.1",
"ansi-styles": "^4.2.1",
"async": "^3.2.2",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-transform-define": "^2.1.2",
"babel-plugin-transform-flow-enums": "^0.0.2",
"babel-preset-fbjs": "^3.4.0",
"chalk": "^4.0.0",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jest": "^26.5.3",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-lint": "^1.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-api-translator": "0.15.0",
"flow-bin": "^0.217.0",
"glob": "^7.1.1",
"hermes-eslint": "0.15.0",
"inquirer": "^7.1.0",
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "^0.80.0",
"metro-memory-fs": "^0.80.0",
"micromatch": "^4.0.4",
"mkdirp": "^0.5.1",
"mock-fs": "^5.1.4",
"nullthrows": "^1.1.1",
"prettier": "2.8.8",
"prettier-plugin-hermes-parser": "0.14.0",
"react": "18.2.0",
"react-test-renderer": "18.2.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"supports-color": "^7.1.0",
"typescript": "5.0.4",
"ws": "^6.2.2"
}
}