mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary:
While `readline` is referenced in `packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js`, this references the `node:readline` module by default. The extra package seems to have been installed and included accidentally, as the `attachKeyHandlers` file uses an export from `node:readline` that's never been present in `npm:readline`.
Since the name matches but Node.js will always prefer built-in/code modules, this dependency is dangling and can never be reached, since it's name is shadowed (as also stated in their readme). This can be reproduced by comparing `require('readline')` and `require('../../node_modules/readline')` in `packages/community-cli-plugin`. The flow types also confirm this.
This overall seems highly safe to drop.
## Changelog:
[INTERNAL] [CHANGED] - Remove shadowed and unused readline npm package from community-cli-plugin
Pull Request resolved: https://github.com/facebook/react-native/pull/49557
Test Plan:
Prior to changes applied:
```sh
$ node -e 'console.log(require("readline") === require("node:readline"))'
true
```
Reviewed By: cipolleschi
Differential Revision: D69925999
Pulled By: huntie
fbshipit-source-id: 802fdaa396630b44d5aacefeb9c2473fb53d167e
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"name": "@react-native/community-cli-plugin",
|
|
"version": "0.79.0-main",
|
|
"description": "Core CLI commands for React Native",
|
|
"keywords": [
|
|
"react-native",
|
|
"tools"
|
|
],
|
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/community-cli-plugin#readme",
|
|
"bugs": "https://github.com/facebook/react-native/issues",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/facebook/react-native.git",
|
|
"directory": "packages/community-cli-plugin"
|
|
},
|
|
"license": "MIT",
|
|
"exports": {
|
|
".": "./src/index.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"dependencies": {
|
|
"@react-native/dev-middleware": "0.79.0-main",
|
|
"@react-native/metro-babel-transformer": "0.79.0-main",
|
|
"chalk": "^4.0.0",
|
|
"debug": "^2.2.0",
|
|
"invariant": "^2.2.4",
|
|
"metro": "^0.81.0",
|
|
"metro-config": "^0.81.0",
|
|
"metro-core": "^0.81.0",
|
|
"semver": "^7.1.3"
|
|
},
|
|
"devDependencies": {
|
|
"metro-resolver": "^0.81.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@react-native-community/cli": "*"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@react-native-community/cli": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|