From f3d1590cd4faf682e1826137775dfdb9a8154de5 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Thu, 18 Jan 2024 18:39:35 +0100 Subject: [PATCH] build: update react native dependencies (#5152) - Update @react-native-community dependencies to their @react-native upgrades because the former namespace is deprecated (React release 0.72) - Don't install @react-native/eslint-plugin directly because it's a dependency of @react-native/eslint-config --- dependencies/package-lock.json | 48 ++++++++++--------- dependencies/package.json | 3 +- .../super-linter/controls/super_linter.rb | 4 +- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/dependencies/package-lock.json b/dependencies/package-lock.json index 140fcd4c..2e3c1aea 100644 --- a/dependencies/package-lock.json +++ b/dependencies/package-lock.json @@ -10,8 +10,7 @@ "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", "@coffeelint/cli": "^5.2.11", - "@react-native-community/eslint-config": "^3.2.0", - "@react-native-community/eslint-plugin": "^1.3.0", + "@react-native/eslint-config": "^0.73.2", "@stoplight/spectral-cli": "^6.11.0", "@typescript-eslint/eslint-plugin": "^5.60.0", "@typescript-eslint/parser": "^5.61.0", @@ -4617,16 +4616,16 @@ "@babel/runtime-corejs3": "^7.14.9" } }, - "node_modules/@react-native-community/eslint-config": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/eslint-config/-/eslint-config-3.2.0.tgz", - "integrity": "sha512-ZjGvoeiBtCbd506hQqwjKmkWPgynGUoJspG8/MuV/EfKnkjCtBmeJvq2n+sWbWEvL9LWXDp2GJmPzmvU5RSvKQ==", + "node_modules/@react-native/eslint-config": { + "version": "0.73.2", + "resolved": "https://registry.npmjs.org/@react-native/eslint-config/-/eslint-config-0.73.2.tgz", + "integrity": "sha512-YzMfes19loTfbrkbYNAfHBDXX4oRBzc5wnvHs4h2GIHUj6YKs5ZK5lldqSrBJCdZAI3nuaO9Qj+t5JRwou571w==", "dependencies": { - "@babel/core": "^7.14.0", - "@babel/eslint-parser": "^7.18.2", - "@react-native-community/eslint-plugin": "^1.1.0", - "@typescript-eslint/eslint-plugin": "^5.30.5", - "@typescript-eslint/parser": "^5.30.5", + "@babel/core": "^7.20.0", + "@babel/eslint-parser": "^7.20.0", + "@react-native/eslint-plugin": "0.73.1", + "@typescript-eslint/eslint-plugin": "^5.57.1", + "@typescript-eslint/parser": "^5.57.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-ft-flow": "^2.0.1", @@ -4636,12 +4635,15 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0" }, + "engines": { + "node": ">=18" + }, "peerDependencies": { "eslint": ">=8", "prettier": ">=2" } }, - "node_modules/@react-native-community/eslint-config/node_modules/eslint-config-prettier": { + "node_modules/@react-native/eslint-config/node_modules/eslint-config-prettier": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", @@ -4652,7 +4654,7 @@ "eslint": ">=7.0.0" } }, - "node_modules/@react-native-community/eslint-config/node_modules/eslint-plugin-jest": { + "node_modules/@react-native/eslint-config/node_modules/eslint-plugin-jest": { "version": "26.9.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz", "integrity": "sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng==", @@ -4675,7 +4677,7 @@ } } }, - "node_modules/@react-native-community/eslint-config/node_modules/eslint-plugin-prettier": { + "node_modules/@react-native/eslint-config/node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", @@ -4695,10 +4697,13 @@ } } }, - "node_modules/@react-native-community/eslint-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@react-native-community/eslint-plugin/-/eslint-plugin-1.3.0.tgz", - "integrity": "sha512-+zDZ20NUnSWghj7Ku5aFphMzuM9JulqCW+aPXT6IfIXFbb8tzYTTOSeRFOtuekJ99ibW2fUCSsjuKNlwDIbHFg==" + "node_modules/@react-native/eslint-plugin": { + "version": "0.73.1", + "resolved": "https://registry.npmjs.org/@react-native/eslint-plugin/-/eslint-plugin-0.73.1.tgz", + "integrity": "sha512-8BNMFE8CAI7JLWLOs3u33wcwcJ821LYs5g53Xyx9GhSg0h8AygTwDrwmYb/pp04FkCNCPjKPBoaYRthQZmxgwA==", + "engines": { + "node": ">=18" + } }, "node_modules/@redis/bloom": { "version": "1.2.0", @@ -10797,11 +10802,10 @@ } }, "node_modules/eslint-plugin-react-native": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-native/-/eslint-plugin-react-native-4.0.0.tgz", - "integrity": "sha512-kMmdxrSY7A1WgdqaGC+rY/28rh7kBGNBRsk48ovqkQmdg5j4K+DaFmegENDzMrdLkoufKGRNkKX6bgSwQTCAxQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-native/-/eslint-plugin-react-native-4.1.0.tgz", + "integrity": "sha512-QLo7rzTBOl43FvVqDdq5Ql9IoElIuTdjrz9SKAXCvULvBoRZ44JGSkx9z4999ZusCsb4rK3gjS8gOGyeYqZv2Q==", "dependencies": { - "@babel/traverse": "^7.7.4", "eslint-plugin-react-native-globals": "^0.1.1" }, "peerDependencies": { diff --git a/dependencies/package.json b/dependencies/package.json index 6a742fd6..dfea3cba 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -5,8 +5,7 @@ "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", "@coffeelint/cli": "^5.2.11", - "@react-native-community/eslint-config": "^3.2.0", - "@react-native-community/eslint-plugin": "^1.3.0", + "@react-native/eslint-config": "^0.73.2", "@stoplight/spectral-cli": "^6.11.0", "@typescript-eslint/eslint-plugin": "^5.60.0", "@typescript-eslint/parser": "^5.61.0", diff --git a/test/inspec/super-linter/controls/super_linter.rb b/test/inspec/super-linter/controls/super_linter.rb index b06b4516..e299a54e 100644 --- a/test/inspec/super-linter/controls/super_linter.rb +++ b/test/inspec/super-linter/controls/super_linter.rb @@ -296,8 +296,8 @@ control "super-linter-installed-npm-packages" do "@babel/preset-react", "@babel/preset-typescript", "@coffeelint/cli", - "@react-native-community/eslint-config", - "@react-native-community/eslint-plugin", + "@react-native/eslint-config", + "@react-native/eslint-plugin", "@stoplight/spectral-cli", "@typescript-eslint/eslint-plugin", "@typescript-eslint/parser",