diff --git a/package.json b/package.json index 89be7ae713..1fffa8a92b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "web": "expo start --web", "use-build-number": "./scripts/useBuildNumberEnv.sh", "use-build-number-with-bump": "./scripts/useBuildNumberEnvWithBump.sh", - "build-web": "expo export --platform web --source-maps && node ./scripts/post-web-build.js", + "build-web": "EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH=1 EXPO_UNSTABLE_TREE_SHAKING=1 expo export --platform web --source-maps && node ./scripts/post-web-build.js", "build-all": "pnpm intl:build && pnpm use-build-number-with-bump eas build --platform all", "build-ios": "pnpm use-build-number-with-bump eas build -p ios", "build-android": "pnpm use-build-number-with-bump eas build -p android", @@ -213,7 +213,7 @@ "psl": "1.9.0", "radix-ui": "^1.4.3", "react": "19.1.0", - "react-compiler-runtime": "19.1.0-rc.3", + "react-compiler-runtime": "^1.0.0", "react-dom": "19.1.0", "react-hotkeys-hook": "5.2.4", "react-image-crop": "^11.0.7", @@ -273,7 +273,7 @@ "@typescript/native-preview": "^7.0.0-dev.20260428.1", "babel-jest": "^29.7.0", "babel-plugin-module-resolver": "^5.0.2", - "babel-plugin-react-compiler": "19.1.0-rc.3", + "babel-plugin-react-compiler": "^1.0.0", "babel-preset-expo": "~54.0.10", "eslint": "^9.39.2", "eslint-import-resolver-typescript": "^4.4.4", diff --git a/patches/babel-plugin-react-compiler.patch b/patches/babel-plugin-react-compiler.patch new file mode 100644 index 0000000000..114fd83ab0 --- /dev/null +++ b/patches/babel-plugin-react-compiler.patch @@ -0,0 +1,13 @@ +diff --git a/dist/index.js b/dist/index.js +index ac4a79e741a176252312419e439be74cc80998e5..fb7584e8d64742f7926ddeadbe713cd15679e511 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -92664,7 +92664,7 @@ function codegenPlace(cx, place) { + suggestions: null + }); + const identifier4 = convertIdentifier(place.identifier); +- identifier4.loc = place.loc; ++ identifier4.loc = place.loc !== GeneratedSource ? place.loc : null; + return identifier4; + } + function convertIdentifier(identifier4) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 943211a2c3..e8ecdbab41 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,6 +217,7 @@ overrides: patchedDependencies: '@discord/bottom-sheet@4.6.1': 253965341bfbc8e63630dfca511c5d0e0878900e5fe414b2278bd322fc215e2a '@sentry/react-native@6.20.0': 1d48e4d5178f5684eb33262299e7eed283bf9601f79b9ae1af63a7f607d3483a + babel-plugin-react-compiler: a33579fd34e4a30f1bad7a2c33e58829b2fae5facff078ababbeee90f954b6a0 expo-glass-effect@55.0.8: 6c9fa5b104e53b87df4e17b320acb3b94d12ac90c0101190045dd620681efff0 expo-haptics@15.0.8: b33910ba2753c4eccdc885b449e6e33aa90b9cefa75ca8639762a26013141410 expo-image-picker@17.0.11: 47b28f6ddb8bcaa6483f8714c82daaa0001122f2b0dac6c05d19e98a61a6ceab @@ -605,8 +606,8 @@ importers: specifier: 19.1.0 version: 19.1.0 react-compiler-runtime: - specifier: 19.1.0-rc.3 - version: 19.1.0-rc.3(react@19.1.0) + specifier: ^1.0.0 + version: 1.0.0(react@19.1.0) react-dom: specifier: 19.1.0 version: 19.1.0(react@19.1.0) @@ -780,8 +781,8 @@ importers: specifier: ^5.0.2 version: 5.0.3 babel-plugin-react-compiler: - specifier: 19.1.0-rc.3 - version: 19.1.0-rc.3 + specifier: ^1.0.0 + version: 1.0.0(patch_hash=a33579fd34e4a30f1bad7a2c33e58829b2fae5facff078ababbeee90f954b6a0) babel-preset-expo: specifier: ~54.0.10 version: 54.0.10(@babel/core@7.29.0)(@babel/runtime@7.29.2)(expo@54.0.34)(react-refresh@0.14.2) @@ -3985,9 +3986,6 @@ packages: babel-plugin-react-compiler@1.0.0: resolution: {integrity: sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==} - babel-plugin-react-compiler@19.1.0-rc.3: - resolution: {integrity: sha512-mjRn69WuTz4adL0bXGx8Rsyk1086zFJeKmes6aK0xPuK3aaXmDJdLHqwKKMrpm6KAI1MCoUK72d2VeqQbu8YIA==} - babel-plugin-react-native-web@0.21.2: resolution: {integrity: sha512-SPD0J6qjJn8231i0HZhlAGH6NORe+QvRSQM2mwQEzJ2Fb3E4ruWTiiicPlHjmeWShDXLcvoorOCXjeR7k/lyWA==} @@ -7073,8 +7071,8 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-compiler-runtime@19.1.0-rc.3: - resolution: {integrity: sha512-Cssogys2XZu6SqxRdX2xd8cQAf57BBvFbLEBlIa77161lninbKUn/EqbecCe7W3eqDQfg3rIoOwzExzgCh7h/g==} + react-compiler-runtime@1.0.0: + resolution: {integrity: sha512-rRfjYv66HlG8896yPUDONgKzG5BxZD1nV9U6rkm+7VCuvQc903C4MjcoZR4zPw53IKSOX9wMQVpA1IAbRtzQ7w==} peerDependencies: react: ^17.0.0 || ^18.0.0 || ^19.0.0 || ^0.0.0-experimental @@ -12130,11 +12128,7 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-react-compiler@1.0.0: - dependencies: - '@babel/types': 7.29.0 - - babel-plugin-react-compiler@19.1.0-rc.3: + babel-plugin-react-compiler@1.0.0(patch_hash=a33579fd34e4a30f1bad7a2c33e58829b2fae5facff078ababbeee90f954b6a0): dependencies: '@babel/types': 7.29.0 @@ -12189,7 +12183,7 @@ snapshots: '@babel/preset-react': 7.28.5(@babel/core@7.29.0) '@babel/preset-typescript': 7.28.5(@babel/core@7.29.0) '@react-native/babel-preset': 0.81.5(@babel/core@7.29.0) - babel-plugin-react-compiler: 1.0.0 + babel-plugin-react-compiler: 1.0.0(patch_hash=a33579fd34e4a30f1bad7a2c33e58829b2fae5facff078ababbeee90f954b6a0) babel-plugin-react-native-web: 0.21.2 babel-plugin-syntax-hermes-parser: 0.29.1 babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.29.0) @@ -15738,7 +15732,7 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-compiler-runtime@19.1.0-rc.3(react@19.1.0): + react-compiler-runtime@1.0.0(react@19.1.0): dependencies: react: 19.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5206075f54..659d8b845a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -18,6 +18,7 @@ allowBuilds: patchedDependencies: '@discord/bottom-sheet@4.6.1': patches/@discord__bottom-sheet@4.6.1.patch '@sentry/react-native@6.20.0': patches/@sentry__react-native@6.20.0.patch + babel-plugin-react-compiler: patches/babel-plugin-react-compiler.patch 'expo-glass-effect@55.0.8': patches/expo-glass-effect@55.0.8.patch 'expo-haptics@15.0.8': patches/expo-haptics@15.0.8.patch 'expo-image-picker@17.0.11': patches/expo-image-picker@17.0.11.patch