Skip to content

Commit b5c65ce

Browse files
robhoganmeta-codesync[bot]
authored andcommitted
Bump Metro minimum to 0.87.2 (#59509)
Summary: Bump minimum Metro version to 0.87.2, within the same semver range, to ensure upgraders get the same version as fresh projects would. This supersedes #58506 (0.87.1). Mostly fixes, to file watching, resolution and source maps, plus faster resolution and source map composition. It removes `micromatch` to clear a CVE alert. Assets outside `projectRoot` now get `[metro-watchFolders]/N/` URLs, which also moves them in release builds. Metro release notes: - https://github.com/react/metro/releases/tag/v0.87.1 - https://github.com/react/metro/releases/tag/v0.87.2 ## Changelog: [General] [Changed] - Bump Metro minimum to 0.87.2 Pull Request resolved: #59509 Test Plan: From the fbsource root: ``` xplat/third-party/yarn/yarn install --ignore-scripts --non-interactive --cwd xplat/js xplat/third-party/yarn/yarn --force --ignore-scripts --non-interactive --cwd xplat/js/public xplat/yarn-validation/bin/yarn-validation -p xplat/js -p xplat/js/public -p xplat/js/react-native-github -k SMART_INSTALL_VERBOSE=1 bash xplat/js/scripts/update-oss-yarn-lockfile.sh test buck2 build fbsource//xplat/js:workspace arc lint -a ``` - Explicit Yarn validation passed for all three projects: `xplat/js`, `xplat/js/public` and `xplat/js/react-native-github`, including the offline mirror. The public project checks its version-controlled dependency files, not only its lockfile. - Public Metro Babel-register files match the 0.87.2 archive byte-for-byte. The 112 removed files belong to its obsolete Hermes parser dependency chain; required Flow-parser WASM/generated files remain intact. Independent review verified React Native resolves the nested Metro runtime to 0.87.2. - The public `flow-parser/babel-plugin` passed 3 real-Babel smoke cases: typed exports, Flow enums and component syntax. A standalone full public Babel-register config attempt could not run because this project intentionally replaces `babel/core` with a dummy package; the parser-plugin smoke used the real root Babel toolchain. - Independent OSS install used a fresh temporary tree/cache and `--offline --frozen-lockfile --ignore-scripts`: `Lockfile is up-to-date.` - Workspace build passed: https://www.internalfb.com/buck2/135bb490-de5b-44f0-89ee-1e3543a44182 - Lint passed with no issues; direct ESLint also passed for all five modified package manifests. ``` (cd xplat/js && js1 test --config react-native-github/jest.config.js --ci --runInBand --testPathPattern="react-native-github/packages/(metro-config|community-cli-plugin|dev-middleware)/") ``` 16 suites, 164 tests and 1 snapshot passed. The selector includes `metro-config`, but that package has no matching dedicated suites; the executed suites cover `community-cli-plugin` and `dev-middleware`. A preliminary config-only attempt hit an overlapping-install ENOENT; the isolated run passed. These focused suites use the root dependency installation; public-tree coverage is the explicit project validation and parser smoke above. Independent review confirmed all 16 release archives match their locked integrity and package metadata. Full Flow was not rerun. Reviewed By: cortinico Differential Revision: D127624345 Pulled By: javache fbshipit-source-id: bc03900422f78adcd16c9074c819fcfe710aab88
1 parent 866034f commit b5c65ce

6 files changed

Lines changed: 113 additions & 158 deletions

File tree

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
"markdownlint-cli2": "^0.23.3",
114114
"markdownlint-rule-relative-links": "^5.1.4",
115115
"memfs": "^4.38.2",
116-
"metro-babel-register": "^0.87.0",
117-
"metro-transform-plugins": "^0.87.0",
116+
"metro-babel-register": "^0.87.2",
117+
"metro-transform-plugins": "^0.87.2",
118118
"micromatch": "^4.0.4",
119119
"node-fetch": "^2.2.0",
120120
"nullthrows": "^1.1.1",

‎packages/community-cli-plugin/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"commander": "^12.0.0",
3838
"debug": "^4.4.0",
3939
"invariant": "^2.2.4",
40-
"metro": "^0.87.0",
40+
"metro": "^0.87.2",
4141
"semver": "^7.1.3"
4242
},
4343
"devDependencies": {
44-
"metro-resolver": "^0.87.0"
44+
"metro-resolver": "^0.87.2"
4545
},
4646
"peerDependencies": {
4747
"@react-native-community/cli": "*",

‎packages/metro-config/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dependencies": {
3939
"@react-native/js-polyfills": "0.87.0-main",
4040
"@react-native/metro-babel-transformer": "0.87.0-main",
41-
"metro-config": "^0.87.0",
42-
"metro-runtime": "^0.87.0"
41+
"metro-config": "^0.87.2",
42+
"metro-runtime": "^0.87.2"
4343
}
4444
}

‎packages/react-native/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@
164164
"hermes-compiler": "0.0.0",
165165
"invariant": "^2.2.4",
166166
"memoize-one": "^6.0.0",
167-
"metro-runtime": "^0.87.0",
168-
"metro-source-map": "^0.87.0",
167+
"metro-runtime": "^0.87.2",
168+
"metro-source-map": "^0.87.2",
169169
"nullthrows": "^1.1.1",
170170
"pretty-format": "^29.7.0",
171171
"promise": "^8.3.0",

‎private/core-cli-utils/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"./version.js": "./src/public/version.js"
1212
},
1313
"dependencies": {
14-
"metro-babel-register": "^0.87.0"
14+
"metro-babel-register": "^0.87.2"
1515
},
1616
"devDependencies": {},
1717
"engines": {

0 commit comments

Comments
 (0)