From 3a48c2eb52db8e8c5b20455d175606987379a2aa Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 7 Jul 2026 16:34:40 -0700 Subject: [PATCH 1/3] fix: declare missing dependencies caught in pnpm mode Upstreaming part of microsoft/react-native-macos#3010 (enabling Yarn v4's pnpm mode, which requires stricter dependency declarations). Several first-party packages import modules they don't declare, resolving only via a hoisted node_modules: - @react-native/metro-babel-transformer: metro-babel-transformer - @react-native/fantom: metro, metro-config, jest-docblock, jest-message-util, source-map - @react-native/babel-plugin-codegen: @babel/plugin-syntax-flow (devDependency) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/babel-plugin-codegen/package.json | 3 ++- packages/react-native-babel-transformer/package.json | 1 + private/react-native-fantom/package.json | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index d58d065315b8..65ad1622371e 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -29,6 +29,7 @@ "@react-native/codegen": "0.87.0-main" }, "devDependencies": { - "@babel/core": "^7.25.2" + "@babel/core": "^7.25.2", + "@babel/plugin-syntax-flow": "^7.25.0" } } diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index a57b68112da3..d0601becf1f8 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -29,6 +29,7 @@ "@babel/core": "^7.25.2", "@react-native/babel-preset": "0.87.0-main", "hermes-parser": "0.36.1", + "metro-babel-transformer": "^0.86.0", "nullthrows": "^1.1.1" }, "peerDependencies": { diff --git a/private/react-native-fantom/package.json b/private/react-native-fantom/package.json index f0f965fbba23..a219e3e30bcc 100644 --- a/private/react-native-fantom/package.json +++ b/private/react-native-fantom/package.json @@ -8,7 +8,12 @@ "build": "./build.sh" }, "dependencies": { - "babel-plugin-istanbul": "^7.0.0" + "babel-plugin-istanbul": "^7.0.0", + "jest-docblock": "^29.7.0", + "jest-message-util": "^29.7.0", + "metro": "^0.86.0", + "metro-config": "^0.86.0", + "source-map": "^0.7.4" }, "peerDependencies": { "jest": "^29.7.0", From 9cf3c4296bdb47891a9e41a02d33e794494b6d5c Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 7 Jul 2026 16:42:36 -0700 Subject: [PATCH 2/3] chore: update yarn.lock for newly declared dependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- yarn.lock | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6ff74db2d2d..c59b1e428835 100644 --- a/yarn.lock +++ b/yarn.lock @@ -180,6 +180,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== +"@babel/helper-plugin-utils@^7.29.7": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz#c0a0766f1a13617d8a17407d7ab8f9d486225ea4" + integrity sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw== + "@babel/helper-remap-async-to-generator@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz#e53956ab3d5b9fb88be04b3e2f31b523afd34b92" @@ -372,6 +377,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" +"@babel/plugin-syntax-flow@^7.25.0": + version "7.29.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.29.7.tgz#3f3278c11c896c43bf8098250819785fd1231881" + integrity sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ== + dependencies: + "@babel/helper-plugin-utils" "^7.29.7" + "@babel/plugin-syntax-import-assertions@^7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz#620412405058efa56e4a564903b79355020f445f" @@ -4987,10 +4999,10 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" -hermes-compiler@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/hermes-compiler/-/hermes-compiler-0.0.0.tgz#8d9f6a0b2740ce34d71258fec684e7b6bfd97efa" - integrity sha512-boVFutx6ME/Km2mB6vvsQcdnazEYYI/jV1pomx1wcFUG/EVqTkr5CU0CW9bKipOA/8Hyu3NYwW3THg2Q1kNCfA== +hermes-compiler@250829098.0.15: + version "250829098.0.15" + resolved "https://registry.yarnpkg.com/hermes-compiler/-/hermes-compiler-250829098.0.15.tgz#ded6ecac9e873e359b9e5e13e4a2b0149cc7bca2" + integrity sha512-GJiEBl2JgT8FsRcY9DOBYW9L0KGRij58y7FeINJOaqWdYIrf/o3hi8NCsW3CV+XbG1vAwEeuXvwg4+xMJ8cc3g== hermes-eslint@0.36.1: version "0.36.1" @@ -6529,7 +6541,7 @@ metro-babel-register@^0.86.0: escape-string-regexp "^1.0.5" flow-enums-runtime "^0.0.6" -metro-babel-transformer@0.86.0: +metro-babel-transformer@0.86.0, metro-babel-transformer@^0.86.0: version "0.86.0" resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.86.0.tgz#bf8f27c6ba7f02ab36e01e3c47371ab47b96b4f3" integrity sha512-gHOqsttTUPwLo54YemxsuB12WPptFBrLh1bTMwKIqmTUwOi3/EZw1sZSMVJFrrX7Md2Q72iBVvIIOWl6A+cLzA== @@ -8343,6 +8355,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +source-map@^0.7.4: + version "0.7.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02" + integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" From 21fe2ab2de7dc3fbeed858307c9b998379445b44 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 7 Jul 2026 16:55:53 -0700 Subject: [PATCH 3/3] fix: correct source-map and @babel/plugin-syntax-flow version ranges - source-map: ^0.7.4 -> ^0.6.1. Fantom uses the synchronous SourceMapConsumer constructor, which is the 0.6.x API; 0.7+ returns a Promise. 0.6.1 is also already resolved in the lockfile, avoiding a new major. - @babel/plugin-syntax-flow: ^7.25.0 -> ^7.26.0 to match the range already present in the lockfile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/babel-plugin-codegen/package.json | 2 +- private/react-native-fantom/package.json | 2 +- yarn.lock | 17 ----------------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 65ad1622371e..85b06d0e7136 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -30,6 +30,6 @@ }, "devDependencies": { "@babel/core": "^7.25.2", - "@babel/plugin-syntax-flow": "^7.25.0" + "@babel/plugin-syntax-flow": "^7.26.0" } } diff --git a/private/react-native-fantom/package.json b/private/react-native-fantom/package.json index a219e3e30bcc..73fdbf521764 100644 --- a/private/react-native-fantom/package.json +++ b/private/react-native-fantom/package.json @@ -13,7 +13,7 @@ "jest-message-util": "^29.7.0", "metro": "^0.86.0", "metro-config": "^0.86.0", - "source-map": "^0.7.4" + "source-map": "^0.6.1" }, "peerDependencies": { "jest": "^29.7.0", diff --git a/yarn.lock b/yarn.lock index c59b1e428835..89abba7686a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -180,11 +180,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== -"@babel/helper-plugin-utils@^7.29.7": - version "7.29.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz#c0a0766f1a13617d8a17407d7ab8f9d486225ea4" - integrity sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw== - "@babel/helper-remap-async-to-generator@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz#e53956ab3d5b9fb88be04b3e2f31b523afd34b92" @@ -377,13 +372,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-flow@^7.25.0": - version "7.29.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.29.7.tgz#3f3278c11c896c43bf8098250819785fd1231881" - integrity sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ== - dependencies: - "@babel/helper-plugin-utils" "^7.29.7" - "@babel/plugin-syntax-import-assertions@^7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz#620412405058efa56e4a564903b79355020f445f" @@ -8355,11 +8343,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.4: - version "0.7.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02" - integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"