Skip to content

Commit

Permalink
chore: bump react-native to 0.76 (#3409)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Jan 20, 2025
1 parent d5369a4 commit 7797436
Show file tree
Hide file tree
Showing 38 changed files with 1,165 additions and 1,406 deletions.
2 changes: 2 additions & 0 deletions .changeset/ninety-pugs-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 3 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packageRules": [
{
"groupName": "@react-native-community/cli",
"allowedVersions": "^14.0.0",
"allowedVersions": "^15.0.0"
"matchPackageNames": ["@react-native-community/cli{/,}**"]
},
{
Expand All @@ -28,7 +28,7 @@
},
{
"groupName": "Metro",
"allowedVersions": "^0.80.0",
"allowedVersions": "^0.81.0"
"matchSourceUrls": ["https://github.com/facebook/metro{/,}**"]
},
{
Expand Down Expand Up @@ -76,7 +76,7 @@
"react-native-macos",
"react-native-windows"
],
"allowedVersions": "^0.75.0"
"allowedVersions": "^0.76.0"
}
],
"postUpdateOptions": ["yarnDedupeHighest"],
Expand Down
9 changes: 6 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ packageExtensions:
babel-plugin-transform-flow-enums@*:
peerDependencies:
"@babel/core": ^7.20.0
metro-config@*:
react-native@*:
dependencies:
# `metro-config` fails to resolve `JsTransformerConfig` because it's in another package
metro-transform-worker: ^0.80.0
# https://github.com/facebook/react-native/pull/47304
"@react-native-community/cli": ^15.0.0
# https://github.com/facebook/react-native/pull/47308
"@react-native-community/cli-platform-android": ^15.0.0
"@react-native-community/cli-platform-ios": ^15.0.0
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-compat.cjs
spec: "@yarnpkg/plugin-compat"
Expand Down
4 changes: 2 additions & 2 deletions incubator/@react-native-webapis/battery-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-native": "^0.75.0",
"react": "18.3.1",
"react-native": "^0.76.0",
"typescript": "^5.0.0"
},
"engines": {
Expand Down
6 changes: 2 additions & 4 deletions incubator/@react-native-webapis/web-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@
"eslint": "^9.0.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-native": "^0.75.0",
"react-native-macos": "^0.75.0",
"react-native-windows": "^0.75.0",
"react": "18.3.1",
"react-native": "^0.76.0",
"typescript": "^5.0.0"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions incubator/polyfills/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/babel__template": "^7.0.0",
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"metro-config": "^0.80.3",
"metro-config": "^0.81.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
Expand All @@ -60,7 +60,7 @@
"alignDeps": {
"requirements": {
"development": [
"react-native@0.75"
"react-native@0.76"
],
"production": [
"react-native@>=0.72 <1.0"
Expand Down
2 changes: 1 addition & 1 deletion incubator/react-native-error-trace-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@rnx-kit/console": "^2.0.0",
"metro-symbolicate": "^0.80.0",
"metro-symbolicate": "^0.81.0",
"source-map": "^0.5.6",
"yargs": "^16.0.0"
},
Expand Down
46 changes: 22 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"knip": "^5.30.2",
"metro": "^0.80.3",
"metro": "^0.81.0",
"nx": "~19.8.0",
"prettier": "^3.0.0",
"prettier-plugin-organize-imports": "^4.0.0",
Expand All @@ -53,28 +53,28 @@
"resolutions": {
"@microsoft/eslint-plugin-sdl/eslint-plugin-react": "^7.35.2",
"@microsoft/eslint-plugin-sdl/eslint-plugin-security": "^1.4.0",
"@react-native-community/cli": "^14.0.0",
"@react-native-community/cli-platform-android": "^14.0.0",
"@react-native-community/cli-platform-apple": "^14.0.0",
"@react-native-community/cli-platform-ios": "^14.0.0",
"@react-native-community/cli-server-api": "^14.0.0",
"@react-native-community/cli-tools": "^14.0.0",
"@react-native-community/cli-types": "^14.0.0",
"@react-native-community/cli": "^15.0.0",
"@react-native-community/cli-platform-android": "^15.0.0",
"@react-native-community/cli-platform-apple": "^15.0.0",
"@react-native-community/cli-platform-ios": "^15.0.0",
"@react-native-community/cli-server-api": "^15.0.0",
"@react-native-community/cli-tools": "^15.0.0",
"@react-native-community/cli-types": "^15.0.0",
"@rnx-kit/react-native-host": "workspace:*",
"@vue/compiler-sfc": "link:./incubator/ignore",
"react-native-macos/@react-native/assets-registry": "^0.75.0",
"react-native-macos/@react-native/codegen": "^0.75.0",
"react-native-macos/@react-native/community-cli-plugin": "^0.75.0",
"react-native-macos/@react-native/gradle-plugin": "^0.75.0",
"react-native-macos/@react-native/js-polyfills": "^0.75.0",
"react-native-macos/@react-native/normalize-colors": "^0.75.0",
"react-native-windows/@react-native/assets-registry": "^0.75.0",
"react-native-windows/@react-native/codegen": "^0.75.0",
"react-native-windows/@react-native/community-cli-plugin": "^0.75.0",
"react-native-windows/@react-native/gradle-plugin": "^0.75.0",
"react-native-windows/@react-native/js-polyfills": "^0.75.0",
"react-native-windows/@react-native/normalize-colors": "^0.75.0",
"react-native-windows/@react-native/virtualized-lists": "^0.75.0"
"react-native-macos/@react-native/assets-registry": "^0.76.0",
"react-native-macos/@react-native/codegen": "^0.76.0",
"react-native-macos/@react-native/community-cli-plugin": "^0.76.0",
"react-native-macos/@react-native/gradle-plugin": "^0.76.0",
"react-native-macos/@react-native/js-polyfills": "^0.76.0",
"react-native-macos/@react-native/normalize-colors": "^0.76.0",
"react-native-windows/@react-native/assets-registry": "^0.76.0",
"react-native-windows/@react-native/codegen": "^0.76.0",
"react-native-windows/@react-native/community-cli-plugin": "^0.76.0",
"react-native-windows/@react-native/gradle-plugin": "^0.76.0",
"react-native-windows/@react-native/js-polyfills": "^0.76.0",
"react-native-windows/@react-native/normalize-colors": "^0.76.0",
"react-native-windows/@react-native/virtualized-lists": "^0.76.0"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -125,9 +125,7 @@
"incubator/@react-native-webapis/web-storage": {
"ignoreDependencies": [
"@babel/core",
"@babel/preset-env",
"react-native-macos",
"react-native-windows"
"@babel/preset-env"
]
},
"packages/babel-preset-metro-react-native": {
Expand Down
2 changes: 1 addition & 1 deletion packages/align-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"update-readme": "node scripts/update-readme.mjs"
},
"devDependencies": {
"@react-native-community/cli-types": "^14.0.0",
"@react-native-community/cli-types": "^15.0.0",
"@rnx-kit/config": "*",
"@rnx-kit/console": "*",
"@rnx-kit/eslint-config": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-metro-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@babel/core": "^7.20.0",
"@babel/plugin-transform-typescript": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "^0.75.0",
"@react-native/babel-preset": "^0.76.0",
"@rnx-kit/babel-plugin-import-path-remapper": "*",
"@rnx-kit/eslint-config": "*",
"@rnx-kit/scripts": "*",
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@react-native-community/cli-types": "^14.0.0",
"@react-native-community/cli-types": "^15.0.0",
"@rnx-kit/eslint-config": "*",
"@rnx-kit/jest-preset": "*",
"@rnx-kit/scripts": "*",
Expand All @@ -86,12 +86,12 @@
"eslint": "^9.0.0",
"jest": "^29.2.1",
"markdown-table": "^3.0.0",
"metro": "^0.80.3",
"metro-babel-transformer": "^0.80.0",
"metro-config": "^0.80.3",
"metro": "^0.81.0",
"metro-babel-transformer": "^0.81.0",
"metro-config": "^0.81.0",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-native": "^0.75.0",
"react": "18.3.1",
"react-native": "^0.76.0",
"tsx": "^4.15.0",
"type-fest": "^4.0.0",
"typescript": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/node": "^20.0.0",
"@types/semver": "^7.0.0",
"eslint": "^9.0.0",
"metro": "^0.80.3",
"metro": "^0.81.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/jest-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
"devDependencies": {
"@eslint/js": "^9.0.0",
"@jest/types": "^29.2.1",
"@react-native-community/cli-types": "^14.0.0",
"@react-native/babel-preset": "^0.75.0",
"@react-native-community/cli-types": "^15.0.0",
"@react-native/babel-preset": "^0.76.0",
"@rnx-kit/scripts": "*",
"@rnx-kit/tsconfig": "*",
"@types/jest": "^29.2.1",
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"jest": "^29.2.1",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-native": "^0.75.0",
"react": "18.3.1",
"react-native": "^0.76.0",
"typescript": "^5.0.0"
},
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"@types/babel__core": "^7.0.0",
"@types/connect": "^3.4.36",
"eslint": "^9.0.0",
"metro": "^0.80.3",
"metro-config": "^0.80.3",
"metro-resolver": "^0.80.3",
"metro": "^0.81.0",
"metro-config": "^0.81.0",
"metro-resolver": "^0.81.0",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-native": "^0.75.0",
"react": "18.3.1",
"react-native": "^0.76.0",
"type-fest": "^4.0.0",
"typescript": "^5.0.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/metro-config/src/assetPluginForMonorepos.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function assetPlugin(assetData) {
*/
function injectAssetPlugin(server) {
const config = server._config;
// @ts-expect-error Types broke in Metro 0.81
if (!config || !Array.isArray(config.transformer.assetPlugins)) {
console.warn(
"'@rnx-kit/metro-config' was unable to install the asset plugin for " +
Expand All @@ -51,6 +52,7 @@ function injectAssetPlugin(server) {
return;
}

// @ts-expect-error Types broke in Metro 0.81
config.transformer.assetPlugins.push(__filename);
}

Expand Down
1 change: 1 addition & 0 deletions packages/metro-config/src/expoConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function isExpoConfig(config) {
if (transformer) {
if (
"_expoRelativeProjectRoot" in transformer ||
// @ts-expect-error Types broke in Metro 0.81
transformer.babelTransformerPath?.includes("@expo")
) {
return true;
Expand Down
2 changes: 2 additions & 0 deletions packages/metro-config/test/expoConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe("isExpoConfig()", () => {
ok(!isExpoConfig({}));
ok(
!isExpoConfig({
// @ts-expect-error Types broke in Metro 0.81
transformer: { babelTransformerPath: "metro-babel-transformer" },
})
);
Expand All @@ -19,6 +20,7 @@ describe("isExpoConfig()", () => {
transformer: { _expoRelativeProjectRoot: null },
} as MetroConfig)
);
// @ts-expect-error Types broke in Metro 0.81
ok(isExpoConfig({ transformer: { babelTransformerPath: "@expo" } }));
ok(isExpoConfig({ transformerPath: "@expo" }));
});
Expand Down
2 changes: 2 additions & 0 deletions packages/metro-config/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ describe("makeMetroConfig", () => {
equal(config.resolver.blockList.source, blockList);

equal(config.server.enhanceMiddleware, enhanceMiddleware);
// @ts-expect-error Types broke in Metro 0.81
deepEqual(config.transformer.assetPlugins, []);

const opts = { dev: false, hot: false };
Expand Down Expand Up @@ -356,6 +357,7 @@ describe("makeMetroConfig", () => {
equal(config.resolver.blockList.source, blockList);

equal(config.server.enhanceMiddleware, enhanceMiddleware);
// @ts-expect-error Types broke in Metro 0.81
deepEqual(config.transformer.assetPlugins, []);

const opts = { dev: false, hot: false };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@rnx-kit/tsconfig": "*",
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"metro": "^0.80.3",
"metro": "^0.81.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/metro-plugin-duplicates-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"eslint": "^9.0.0",
"jest": "^29.2.1",
"memfs": "^4.0.0",
"metro": "^0.80.3",
"metro-source-map": "^0.80.0",
"metro": "^0.81.0",
"metro-source-map": "^0.81.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-plugin-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"jest": "^29.2.1",
"metro": "^0.80.3",
"metro": "^0.81.0",
"prettier": "^3.0.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-resolver-symlinks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/node": "^20.0.0",
"eslint": "^9.0.0",
"jest": "^29.2.1",
"metro-resolver": "^0.80.3",
"metro-resolver": "^0.81.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
Loading

0 comments on commit 7797436

Please sign in to comment.