chore: clean up root dependencies (#2809)

This commit is contained in:
Tommy Nguyen 2023-11-09 17:08:07 +01:00 коммит произвёл GitHub
Родитель b7a3e8235c
Коммит 9ce04eea7c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 57 добавлений и 37 удалений

Просмотреть файл

@ -0,0 +1,2 @@
---
---

Просмотреть файл

@ -30,10 +30,19 @@ packageExtensions:
optional: true
tslib:
optional: true
metro-config@*:
dependencies:
# `metro-config` fails to resolve `JsTransformerConfig` because it's in another package
metro-transform-worker: "^0.76.5"
metro-transform-worker@*:
dependencies:
"metro-minify-terser": "0.76.8"
# `metro` has this dependency, but it's being resolved from `metro-transform-worker`
metro-minify-terser: "^0.76.5"
react-native-macos@*:
dependencies:
# These two are required by `react-native-macos/local-cli/runMacOS/runMacOS.js`
"@react-native-community/cli-tools": "^11.3.6"
chalk: "^4.1.0"
peerDependencies:
"@babel/preset-env": ^7.1.6
react-native: "*"
@ -42,6 +51,7 @@ packageExtensions:
"@babel/preset-env": ^7.1.6
react-native@*:
dependencies:
# Implicit dependency introduced by Babel
"@babel/runtime": "^7.20.0"
peerDependencies:
"@babel/preset-env": ^7.1.6

Просмотреть файл

@ -41,6 +41,8 @@
"react-native": ">=0.71.0-0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@rnx-kit/eslint-config": "*",
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
@ -48,6 +50,8 @@
"eslint": "^8.0.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.0",
"typescript": "^5.0.0"
},
"jest": {

Просмотреть файл

@ -34,27 +34,14 @@
"version:changesets": "changeset version && yarn install --mode update-lockfile"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@changesets/cli": "^2.22.0",
"@types/jest": "^29.2.1",
"@types/node": "^18.0.0",
"eslint": "^8.0.0",
"jest-cli": "^29.2.1",
"metro": "^0.76.5",
"metro-config": "^0.76.5",
"metro-core": "^0.76.5",
"metro-react-native-babel-preset": "^0.76.5",
"metro-react-native-babel-transformer": "^0.76.5",
"metro-resolver": "^0.76.5",
"metro-runtime": "^0.76.5",
"metro-transform-worker": "^0.76.5",
"nx": "~17.0.2",
"prettier": "^3.0.0",
"prettier-plugin-organize-imports": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.0",
"react-native-test-app": "^2.5.5",
"typescript": "^5.0.0"
},
"engines": {

Просмотреть файл

@ -61,6 +61,8 @@
}
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@react-native-community/cli-clean": "^11.0.0",
"@react-native-community/cli-types": "^11.0.0",
"@rnx-kit/eslint-config": "*",
@ -79,6 +81,8 @@
"metro-babel-transformer": "^0.76.8",
"metro-config": "^0.76.5",
"prettier": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.0",
"type-fest": "^4.0.0",
"typescript": "^5.0.0"
},

Просмотреть файл

@ -48,7 +48,9 @@
"jest": "^29.2.1",
"metro": "^0.76.5",
"metro-config": "^0.76.5",
"metro-resolver": "^0.76.5",
"prettier": "^3.0.0",
"react": "18.2.0",
"react-native": "^0.72.0",
"type-fest": "^4.0.0",
"typescript": "^5.0.0"
@ -57,7 +59,7 @@
"ignoreMatches": [
"@babel/core",
"@babel/preset-env",
"@rnx-kit/babel-preset-metro-react-native",
"metro-resolver",
"type-fest"
]
},

Просмотреть файл

@ -232,6 +232,7 @@ describe("@rnx-kit/metro-config", () => {
});
describe("makeMetroConfig", () => {
const projectRoot = path.resolve("../test-app");
const consoleWarnSpy = jest.spyOn(require("@rnx-kit/console"), "warn");
afterEach(() => {
@ -239,7 +240,6 @@ describe("makeMetroConfig", () => {
});
test("returns a default Metro config", async () => {
const projectRoot = path.resolve("../test-app");
const config = makeMetroConfig({ projectRoot });
expect(Object.keys(config).sort()).toEqual([
@ -310,24 +310,30 @@ describe("makeMetroConfig", () => {
test("merges Metro configs", async () => {
const config = makeMetroConfig({
projectRoot: __dirname,
projectRoot,
resetCache: true,
});
expect(Object.keys(config).sort()).toEqual([
"cacheStores",
"cacheVersion",
"maxWorkers",
"projectRoot",
"reporter",
"resetCache",
"resolver",
"serializer",
"server",
"stickyWorkers",
"symbolicator",
"transformer",
"transformerPath",
"unstable_perfLoggerFactory",
"watchFolders",
"watcher",
]);
expect(config.projectRoot).toBe(__dirname);
expect(config.projectRoot).toBe(projectRoot);
expect(config.resetCache).toBeTruthy();
if (!config.resolver) {
@ -356,12 +362,12 @@ describe("makeMetroConfig", () => {
"@babel/runtime",
]);
const blockList = exclusionList().source;
const blockList = exclusionList([], projectRoot).source;
expect(config.resolver.blacklistRE.source).toBe(blockList);
expect(config.resolver.blockList.source).toBe(blockList);
expect(config.server.enhanceMiddleware).toBe(enhanceMiddleware);
expect(config.transformer.assetPlugins).toBeUndefined();
expect(config.transformer.assetPlugins).toEqual([]);
const opts = { dev: false, hot: false };
const transformerOptions = await config.transformer.getTransformOptions(
@ -379,7 +385,7 @@ describe("makeMetroConfig", () => {
test("merges `extraNodeModules`", () => {
const config = makeMetroConfig({
projectRoot: __dirname,
projectRoot,
resolver: {
extraNodeModules: {
"my-awesome-package": "/skynet",

Просмотреть файл

@ -54,6 +54,10 @@
"@types/node": "^18.0.0",
"eslint": "^8.0.0",
"jest": "^29.2.1",
"metro": "^0.76.5",
"metro-config": "^0.76.5",
"metro-core": "^0.76.5",
"metro-resolver": "^0.76.5",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},

Просмотреть файл

@ -3091,7 +3091,7 @@ __metadata:
languageName: node
linkType: hard
"@react-native-community/cli-tools@npm:11.3.9":
"@react-native-community/cli-tools@npm:11.3.9, @react-native-community/cli-tools@npm:^11.3.6":
version: 11.3.9
resolution: "@react-native-community/cli-tools@npm:11.3.9"
dependencies:
@ -3160,6 +3160,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@react-native-webapis/battery-status@workspace:incubator/@react-native-webapis/battery-status"
dependencies:
"@babel/core": ^7.20.0
"@babel/preset-env": ^7.20.0
"@rnx-kit/eslint-config": "*"
"@rnx-kit/jest-preset": "*"
"@rnx-kit/scripts": "*"
@ -3167,6 +3169,8 @@ __metadata:
eslint: ^8.0.0
jest: ^29.2.1
prettier: ^3.0.0
react: 18.2.0
react-native: ^0.72.0
typescript: ^5.0.0
peerDependencies:
react: ">=18.2.0"
@ -3531,6 +3535,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@rnx-kit/cli@workspace:packages/cli"
dependencies:
"@babel/core": ^7.20.0
"@babel/preset-env": ^7.20.0
"@react-native-community/cli-clean": ^11.0.0
"@react-native-community/cli-types": ^11.0.0
"@rnx-kit/align-deps": ^2.2.2
@ -3568,6 +3574,8 @@ __metadata:
ora: ^5.4.1
prettier: ^3.0.0
qrcode: ^1.5.0
react: 18.2.0
react-native: ^0.72.0
readline: ^1.3.0
type-fest: ^4.0.0
typescript: ^5.0.0
@ -3782,7 +3790,9 @@ __metadata:
jest: ^29.2.1
metro: ^0.76.5
metro-config: ^0.76.5
metro-resolver: ^0.76.5
prettier: ^3.0.0
react: 18.2.0
react-native: ^0.72.0
type-fest: ^4.0.0
typescript: ^5.0.0
@ -4293,6 +4303,10 @@ __metadata:
"@types/node": ^18.0.0
eslint: ^8.0.0
jest: ^29.2.1
metro: ^0.76.5
metro-config: ^0.76.5
metro-core: ^0.76.5
metro-resolver: ^0.76.5
prettier: ^3.0.0
typescript: ^5.0.0
languageName: unknown
@ -9181,7 +9195,7 @@ __metadata:
languageName: node
linkType: hard
"jest-cli@npm:^29.2.1, jest-cli@npm:^29.7.0":
"jest-cli@npm:^29.7.0":
version: 29.7.0
resolution: "jest-cli@npm:29.7.0"
dependencies:
@ -10417,7 +10431,7 @@ __metadata:
languageName: node
linkType: hard
"metro-minify-terser@npm:0.76.8":
"metro-minify-terser@npm:0.76.8, metro-minify-terser@npm:^0.76.5":
version: 0.76.8
resolution: "metro-minify-terser@npm:0.76.8"
dependencies:
@ -12781,27 +12795,14 @@ __metadata:
version: 0.0.0-use.local
resolution: "rnx-kit@workspace:."
dependencies:
"@babel/core": ^7.0.0
"@babel/preset-env": ^7.0.0
"@changesets/cli": ^2.22.0
"@types/jest": ^29.2.1
"@types/node": ^18.0.0
eslint: ^8.0.0
jest-cli: ^29.2.1
metro: ^0.76.5
metro-config: ^0.76.5
metro-core: ^0.76.5
metro-react-native-babel-preset: ^0.76.5
metro-react-native-babel-transformer: ^0.76.5
metro-resolver: ^0.76.5
metro-runtime: ^0.76.5
metro-transform-worker: ^0.76.5
nx: ~17.0.2
prettier: ^3.0.0
prettier-plugin-organize-imports: ^3.0.0
react: 18.2.0
react-native: ^0.72.0
react-native-test-app: ^2.5.5
typescript: ^5.0.0
languageName: unknown
linkType: soft