From 9c68ef23da44db969087567f5f5635ea24854b20 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:38:51 +0100 Subject: [PATCH 1/2] chore: fix phantom dependencies --- .changeset/seven-spoons-bow.md | 2 ++ .../battery-status/package.json | 1 + incubator/commitlint-lite/package.json | 1 + .../esbuild-bundle-analyzer/package.json | 2 ++ incubator/polyfills/package.json | 4 +++ .../package.json | 2 ++ incubator/rn-changelog-generator/package.json | 1 + nx.json | 2 +- .../package.json | 1 + .../package.json | 2 ++ packages/bundle-diff/package.json | 1 + .../package.json | 1 + packages/eslint-plugin/package.json | 2 ++ packages/jest-preset/package.json | 1 + packages/metro-serializer/package.json | 1 + packages/third-party-notices/package.json | 1 + packages/tools-workspaces/package.json | 1 + scripts/package.json | 4 ++- scripts/tsconfig-esm.json | 2 +- scripts/tsconfig.json | 2 +- yarn.lock | 34 ++++++++++++++++--- 21 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 .changeset/seven-spoons-bow.md diff --git a/.changeset/seven-spoons-bow.md b/.changeset/seven-spoons-bow.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/seven-spoons-bow.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/incubator/@react-native-webapis/battery-status/package.json b/incubator/@react-native-webapis/battery-status/package.json index b78b34bf1..6ee65f7ee 100644 --- a/incubator/@react-native-webapis/battery-status/package.json +++ b/incubator/@react-native-webapis/battery-status/package.json @@ -42,6 +42,7 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/incubator/commitlint-lite/package.json b/incubator/commitlint-lite/package.json index cd9d8720a..7de56adfa 100644 --- a/incubator/commitlint-lite/package.json +++ b/incubator/commitlint-lite/package.json @@ -33,6 +33,7 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/incubator/esbuild-bundle-analyzer/package.json b/incubator/esbuild-bundle-analyzer/package.json index ff022fb60..fec9a8e9c 100644 --- a/incubator/esbuild-bundle-analyzer/package.json +++ b/incubator/esbuild-bundle-analyzer/package.json @@ -42,6 +42,8 @@ "devDependencies": { "@rnx-kit/scripts": "*", "@rnx-kit/tools-node": "^2.0.0", + "@types/node": "^18.0.0", + "@types/yargs": "^16.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/incubator/polyfills/package.json b/incubator/polyfills/package.json index 4686cc630..319dae3d8 100644 --- a/incubator/polyfills/package.json +++ b/incubator/polyfills/package.json @@ -44,6 +44,10 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/babel__core": "^7.0.0", + "@types/babel__helper-plugin-utils": "^7.0.0", + "@types/babel__template": "^7.0.0", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "metro-config": "^0.76.5", diff --git a/incubator/react-native-error-trace-decorator/package.json b/incubator/react-native-error-trace-decorator/package.json index 662ac60f5..61b66e9cd 100644 --- a/incubator/react-native-error-trace-decorator/package.json +++ b/incubator/react-native-error-trace-decorator/package.json @@ -37,6 +37,8 @@ }, "dependencies": { "@rnx-kit/console": "^1.0.11", + "@types/node": "^18.0.0", + "@types/yargs": "^16.0.0", "metro-symbolicate": "^0.76.0", "source-map": "^0.5.6", "yargs": "^16.0.0" diff --git a/incubator/rn-changelog-generator/package.json b/incubator/rn-changelog-generator/package.json index cf1918cc0..6afd56163 100644 --- a/incubator/rn-changelog-generator/package.json +++ b/incubator/rn-changelog-generator/package.json @@ -31,6 +31,7 @@ "devDependencies": { "@rnx-kit/scripts": "*", "@types/fast-levenshtein": "0.0.3", + "@types/node": "^18.0.0", "chalk": "^4.1.0", "deepmerge": "^4.2.2", "eslint": "^8.0.0", diff --git a/nx.json b/nx.json index 90ea30a1e..046301706 100644 --- a/nx.json +++ b/nx.json @@ -46,7 +46,7 @@ }, "tasksRunnerOptions": { "default": { - "runner": "@rnx-kit/scripts/nx-tasks-runner", + "runner": "./scripts/nx-tasks-runner", "options": { "parallel": 0 } diff --git a/packages/babel-plugin-import-path-remapper/package.json b/packages/babel-plugin-import-path-remapper/package.json index d19eb3a94..97fa201be 100644 --- a/packages/babel-plugin-import-path-remapper/package.json +++ b/packages/babel-plugin-import-path-remapper/package.json @@ -29,6 +29,7 @@ "@types/babel__core": "^7.0.0", "@types/babel__helper-plugin-utils": "^7.0.0", "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/packages/babel-preset-metro-react-native/package.json b/packages/babel-preset-metro-react-native/package.json index 1f4f57621..e16ef5252 100644 --- a/packages/babel-preset-metro-react-native/package.json +++ b/packages/babel-preset-metro-react-native/package.json @@ -41,10 +41,12 @@ }, "devDependencies": { "@babel/core": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.0.0", "@rnx-kit/babel-plugin-import-path-remapper": "*", "@rnx-kit/scripts": "*", "@types/babel__core": "^7.0.0", "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/packages/bundle-diff/package.json b/packages/bundle-diff/package.json index bb0576070..5af9eb312 100644 --- a/packages/bundle-diff/package.json +++ b/packages/bundle-diff/package.json @@ -26,6 +26,7 @@ "devDependencies": { "@rnx-kit/scripts": "*", "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/packages/esbuild-plugin-import-path-remapper/package.json b/packages/esbuild-plugin-import-path-remapper/package.json index 0bbf95a9c..eae7233ac 100644 --- a/packages/esbuild-plugin-import-path-remapper/package.json +++ b/packages/esbuild-plugin-import-path-remapper/package.json @@ -22,6 +22,7 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "esbuild": "^0.19.0", "eslint": "^8.0.0", "jest": "^29.2.1", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 69f32b13b..1e1b5e650 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -39,7 +39,9 @@ "devDependencies": { "@rnx-kit/scripts": "*", "@types/eslint": "^8.0.0", + "@types/estree": "*", "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", "@typescript-eslint/types": "^6.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", diff --git a/packages/jest-preset/package.json b/packages/jest-preset/package.json index 2b36096d5..bc5ee5d7a 100644 --- a/packages/jest-preset/package.json +++ b/packages/jest-preset/package.json @@ -37,6 +37,7 @@ }, "devDependencies": { "@jest/types": "^29.2.1", + "@react-native-community/cli-types": "^11.0.0", "@rnx-kit/eslint-config": "*", "@rnx-kit/scripts": "*", "@types/node": "^18.0.0", diff --git a/packages/metro-serializer/package.json b/packages/metro-serializer/package.json index 8a5a5bc92..63bd82cfe 100644 --- a/packages/metro-serializer/package.json +++ b/packages/metro-serializer/package.json @@ -26,6 +26,7 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "@types/semver": "^7.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", diff --git a/packages/third-party-notices/package.json b/packages/third-party-notices/package.json index e39676095..20fc3ba14 100644 --- a/packages/third-party-notices/package.json +++ b/packages/third-party-notices/package.json @@ -35,6 +35,7 @@ "@rnx-kit/metro-serializer": "*", "@rnx-kit/scripts": "*", "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", "@types/yargs": "^16.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", diff --git a/packages/tools-workspaces/package.json b/packages/tools-workspaces/package.json index acb5d390e..e0fb75aa4 100644 --- a/packages/tools-workspaces/package.json +++ b/packages/tools-workspaces/package.json @@ -42,6 +42,7 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/scripts/package.json b/scripts/package.json index c50177fc5..51767496f 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -24,7 +24,9 @@ "yargs": "^16.0.0" }, "devDependencies": { - "@types/jest": "^29.2.1" + "@types/jest": "^29.2.1", + "@types/node": "^18.0.0", + "@types/yargs": "^16.0.0" }, "depcheck": { "ignoreMatches": [ diff --git a/scripts/tsconfig-esm.json b/scripts/tsconfig-esm.json index e61dabd6c..f681605f3 100644 --- a/scripts/tsconfig-esm.json +++ b/scripts/tsconfig-esm.json @@ -1,5 +1,5 @@ { - "extends": "@rnx-kit/scripts/tsconfig-shared.json", + "extends": "./tsconfig-shared.json", "compilerOptions": { "target": "ES2020", "module": "Node16", diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index cf0808dd8..6c50a1d41 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@rnx-kit/scripts/tsconfig-esm.json", + "extends": "./tsconfig-esm.json", "compilerOptions": { "noEmit": true }, diff --git a/yarn.lock b/yarn.lock index 2eb8fb701..8053bb9ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1435,7 +1435,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.22.15, @babel/plugin-transform-typescript@npm:^7.5.0": +"@babel/plugin-transform-typescript@npm:^7.0.0, @babel/plugin-transform-typescript@npm:^7.22.15, @babel/plugin-transform-typescript@npm:^7.5.0": version: 7.22.15 resolution: "@babel/plugin-transform-typescript@npm:7.22.15" dependencies: @@ -3161,6 +3161,7 @@ __metadata: resolution: "@react-native-webapis/battery-status@workspace:incubator/@react-native-webapis/battery-status" dependencies: "@rnx-kit/scripts": "*" + "@types/node": ^18.0.0 eslint: ^8.0.0 jest: ^29.2.1 prettier: ^3.0.0 @@ -3388,6 +3389,7 @@ __metadata: "@types/babel__core": ^7.0.0 "@types/babel__helper-plugin-utils": ^7.0.0 "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 eslint: ^8.0.0 jest: ^29.2.1 prettier: ^3.0.0 @@ -3400,10 +3402,12 @@ __metadata: resolution: "@rnx-kit/babel-preset-metro-react-native@workspace:packages/babel-preset-metro-react-native" dependencies: "@babel/core": ^7.0.0 + "@babel/plugin-transform-typescript": ^7.0.0 "@rnx-kit/babel-plugin-import-path-remapper": "*" "@rnx-kit/scripts": "*" "@types/babel__core": ^7.0.0 "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 babel-plugin-const-enum: ^1.0.0 eslint: ^8.0.0 jest: ^29.2.1 @@ -3472,6 +3476,7 @@ __metadata: dependencies: "@rnx-kit/scripts": "*" "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 eslint: ^8.0.0 jest: ^29.2.1 prettier: ^3.0.0 @@ -3535,6 +3540,7 @@ __metadata: resolution: "@rnx-kit/commitlint-lite@workspace:incubator/commitlint-lite" dependencies: "@rnx-kit/scripts": "*" + "@types/node": ^18.0.0 eslint: ^8.0.0 jest: ^29.2.1 prettier: ^3.0.0 @@ -3590,6 +3596,8 @@ __metadata: "@rnx-kit/metro-plugin-duplicates-checker": ^2.1.2 "@rnx-kit/scripts": "*" "@rnx-kit/tools-node": ^2.0.0 + "@types/node": ^18.0.0 + "@types/yargs": ^16.0.0 chalk: ^4.1.0 eslint: ^8.0.0 jest: ^29.2.1 @@ -3607,6 +3615,7 @@ __metadata: resolution: "@rnx-kit/esbuild-plugin-import-path-remapper@workspace:packages/esbuild-plugin-import-path-remapper" dependencies: "@rnx-kit/scripts": "*" + "@types/node": ^18.0.0 esbuild: ^0.19.0 eslint: ^8.0.0 jest: ^29.2.1 @@ -3635,7 +3644,9 @@ __metadata: dependencies: "@rnx-kit/scripts": "*" "@types/eslint": ^8.0.0 + "@types/estree": "*" "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 "@typescript-eslint/eslint-plugin": ^6.0.0 "@typescript-eslint/parser": ^6.0.0 "@typescript-eslint/types": ^6.0.0 @@ -3664,6 +3675,7 @@ __metadata: "@babel/preset-env": ^7.0.0 "@babel/preset-typescript": ^7.0.0 "@jest/types": ^29.2.1 + "@react-native-community/cli-types": ^11.0.0 "@rnx-kit/eslint-config": "*" "@rnx-kit/scripts": "*" "@rnx-kit/tools-node": ^2.1.0 @@ -3834,6 +3846,7 @@ __metadata: dependencies: "@rnx-kit/scripts": "*" "@rnx-kit/tools-react-native": ^1.3.4 + "@types/node": ^18.0.0 "@types/semver": ^7.0.0 eslint: ^8.0.0 jest: ^29.2.1 @@ -3914,6 +3927,10 @@ __metadata: "@rnx-kit/console": ^1.0.0 "@rnx-kit/scripts": "*" "@rnx-kit/tools-node": ^2.0.0 + "@types/babel__core": ^7.0.0 + "@types/babel__helper-plugin-utils": ^7.0.0 + "@types/babel__template": ^7.0.0 + "@types/node": ^18.0.0 eslint: ^8.0.0 jest: ^29.2.1 metro-config: ^0.76.5 @@ -3952,6 +3969,8 @@ __metadata: dependencies: "@rnx-kit/console": ^1.0.11 "@rnx-kit/scripts": "*" + "@types/node": ^18.0.0 + "@types/yargs": ^16.0.0 eslint: ^8.0.0 jest: ^29.2.1 metro-symbolicate: ^0.76.0 @@ -4011,6 +4030,7 @@ __metadata: dependencies: "@rnx-kit/scripts": "*" "@types/fast-levenshtein": 0.0.3 + "@types/node": ^18.0.0 chalk: ^4.1.0 deepmerge: ^4.2.2 eslint: ^8.0.0 @@ -4030,6 +4050,8 @@ __metadata: resolution: "@rnx-kit/scripts@workspace:scripts" dependencies: "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 + "@types/yargs": ^16.0.0 depcheck: ^1.0.0 esbuild: ^0.19.0 eslint: ^8.0.0 @@ -4105,6 +4127,7 @@ __metadata: "@rnx-kit/scripts": "*" "@rnx-kit/tools-node": ^2.0.0 "@types/jest": ^29.2.1 + "@types/node": ^18.0.0 "@types/yargs": ^16.0.0 eslint: ^8.0.0 jest: ^29.2.1 @@ -4167,6 +4190,7 @@ __metadata: resolution: "@rnx-kit/tools-workspaces@workspace:packages/tools-workspaces" dependencies: "@rnx-kit/scripts": "*" + "@types/node": ^18.0.0 eslint: ^8.0.0 fast-glob: ^3.2.7 find-up: ^5.0.0 @@ -4297,13 +4321,13 @@ __metadata: languageName: node linkType: hard -"@types/babel__template@npm:*": - version: 7.4.1 - resolution: "@types/babel__template@npm:7.4.1" +"@types/babel__template@npm:*, @types/babel__template@npm:^7.0.0": + version: 7.4.3 + resolution: "@types/babel__template@npm:7.4.3" dependencies: "@babel/parser": ^7.1.0 "@babel/types": ^7.0.0 - checksum: 649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee + checksum: 55deb814c94d1bfb78c4d1de1de1b73eb17c79374602f3bd8aa14e356a77fca64d01646cebe25ec9b307f53a047acc6d53ad6e931019d0726422f5f911e945aa languageName: node linkType: hard From 23146d7f008fdf95e39e1ba08fc05ce2676de744 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:56:32 +0100 Subject: [PATCH 2/2] fixup! chore: fix phantom dependencies --- incubator/build/package.json | 1 + packages/cli/package.json | 2 ++ packages/metro-plugin-typescript/package.json | 2 ++ packages/metro-serializer-esbuild/package.json | 1 + yarn.lock | 8 +++++++- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/incubator/build/package.json b/incubator/build/package.json index 38491fc2f..5fec48755 100644 --- a/incubator/build/package.json +++ b/incubator/build/package.json @@ -55,6 +55,7 @@ "devDependencies": { "@rnx-kit/scripts": "*", "@types/qrcode": "^1.4.2", + "@types/yargs": "^16.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "prettier": "^3.0.0", diff --git a/packages/cli/package.json b/packages/cli/package.json index e4c1b3c6a..b76059dc1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -61,9 +61,11 @@ } }, "devDependencies": { + "@react-native-community/cli-clean": "^11.0.0", "@react-native-community/cli-types": "^11.0.0", "@rnx-kit/scripts": "*", "@types/connect": "^3.4.36", + "@types/fs-extra": "^9.0.0", "@types/node-fetch": "^2.6.5", "@types/qrcode": "^1.4.2", "eslint": "^8.0.0", diff --git a/packages/metro-plugin-typescript/package.json b/packages/metro-plugin-typescript/package.json index 39afc4fec..15f50ddea 100644 --- a/packages/metro-plugin-typescript/package.json +++ b/packages/metro-plugin-typescript/package.json @@ -38,6 +38,8 @@ }, "devDependencies": { "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", + "@types/semver": "^7.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", "metro": "^0.76.5", diff --git a/packages/metro-serializer-esbuild/package.json b/packages/metro-serializer-esbuild/package.json index c295e6bcf..820a05d70 100644 --- a/packages/metro-serializer-esbuild/package.json +++ b/packages/metro-serializer-esbuild/package.json @@ -39,6 +39,7 @@ "@rnx-kit/metro-serializer": "*", "@rnx-kit/metro-service": "*", "@rnx-kit/scripts": "*", + "@types/node": "^18.0.0", "@types/semver": "^7.0.0", "eslint": "^8.0.0", "jest": "^29.2.1", diff --git a/yarn.lock b/yarn.lock index 8053bb9ad..5633e2263 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2954,7 +2954,7 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-clean@npm:11.3.9": +"@react-native-community/cli-clean@npm:11.3.9, @react-native-community/cli-clean@npm:^11.0.0": version: 11.3.9 resolution: "@react-native-community/cli-clean@npm:11.3.9" dependencies: @@ -3452,6 +3452,7 @@ __metadata: "@rnx-kit/config": ^0.6.0 "@rnx-kit/scripts": "*" "@types/qrcode": ^1.4.2 + "@types/yargs": ^16.0.0 env-paths: ^3.0.0 eslint: ^8.0.0 fast-xml-parser: ^4.0.0 @@ -3490,6 +3491,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rnx-kit/cli@workspace:packages/cli" dependencies: + "@react-native-community/cli-clean": ^11.0.0 "@react-native-community/cli-types": ^11.0.0 "@rnx-kit/align-deps": ^2.2.2 "@rnx-kit/config": ^0.6.6 @@ -3506,6 +3508,7 @@ __metadata: "@rnx-kit/tools-node": ^2.1.0 "@rnx-kit/tools-react-native": ^1.3.4 "@types/connect": ^3.4.36 + "@types/fs-extra": ^9.0.0 "@types/node-fetch": ^2.6.5 "@types/qrcode": ^1.4.2 chalk: ^4.1.0 @@ -3777,6 +3780,8 @@ __metadata: "@rnx-kit/tools-node": ^2.0.0 "@rnx-kit/tools-react-native": ^1.3.2 "@rnx-kit/typescript-service": ^1.5.7 + "@types/node": ^18.0.0 + "@types/semver": ^7.0.0 eslint: ^8.0.0 jest: ^29.2.1 metro: ^0.76.5 @@ -3821,6 +3826,7 @@ __metadata: "@rnx-kit/scripts": "*" "@rnx-kit/tools-node": ^2.0.0 "@rnx-kit/tools-react-native": ^1.3.4 + "@types/node": ^18.0.0 "@types/semver": ^7.0.0 esbuild: ^0.19.0 esbuild-plugin-lodash: ^1.2.0