Repository navigation
chore(deps): bump metro to 0.84.6 to drop image-size - #4734
Merged
Merged
Conversation
metro 0.84.5 replaced its image-size dependency with vendored image parsers (react/metro#1860). That removes image-size 1.2.1 from the tree, which clears Dependabot alert #437 (GHSA-5p2g-fcmc-qvqq, infinite loop in the JXL and HEIF parsers). No patched image-size 1.x exists and metro requires ^1.0.2, so bumping metro is the only fix. Lockfile-only: every dependent already accepts ^0.84.3. The metro-* packages pin each other exactly, so the whole family moves together. queue@6.0.2 drops out with image-size. The vendored parsers return the same dimensions as image-size for all 421 raster images in the repo. SVGs differ, but metro.config.js removes svg from assetExts, so Metro never sizes them.
There was a problem hiding this comment.
Athena Review
Pinned commit: 6d4e377
anthropic:claude-opus-5-5: completed openai:gpt-6-sol: completed
0 validated findings. This is a nonblocking COMMENT review, not an approval. No findings does not establish correctness.
Limitations:
- yarn.lock: unsupported dependency format; versions/compatibility unverified
- Usage search limited to eight changed/conventional JS/TS paths; no full-tree analysis. Manifest ranges are not resolved versions. Release notes are not proof of compatibility.
- Only yarn.lock changed. package.json is shown only in part, so it cannot be confirmed which direct dependency ranges pull in metro (for example, metro-config@^0.84.3 and metro@^0.84.3). Resolving these ranges to 0.84.6 looks consistent with semver.
- No upstream release notes for metro 0.84.5 or 0.84.6 were supplied. It is therefore unverified how metro now reads image asset dimensions after dropping image-size, and whether asset handling (e.g., PNG/JPEG/WebP/SVG sizes) behaves identically.
- It was not verified that no other package in the tree, or any project code, imports image-size or queue directly. Both are fully removed from the lockfile, so any undeclared direct usage would break.
- Node engine requirements of metro 0.84.6 were not supplied for comparison with the project's node = 22.13.0.
- The hermes-parser version stays at 0.35.0 across the metro packages. Compatibility of the React Native and @react-native/* packages with metro 0.84.6 was not verified.
- The supplied evidence does not include Metro 0.84.4-to-0.84.6 release details or package contents, so behavioral changes cannot be assessed.
- The available package.json excerpt and usage search are too limited to verify direct dependency ranges, peer requirements, or application compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Relates to Dependabot alert #437 (GHSA-5p2g-fcmc-qvqq): image-size 1.2.1 can loop forever on a crafted JXL or HEIF image.
image-size is only used by Metro (
Assets.js, reading asset dimensions at bundle time), so this does not affect the app at runtime. The worst case is a hung Metro or release build. There is no patched image-size 1.x and Metro requires^1.0.2, so the fix has to come through Metro.metro 0.84.5 replaced image-size with vendored parsers that do not handle JXL or HEIF (react/metro#1860). This PR moves the metro-* packages from 0.84.4 to 0.84.6. It only changes the lockfile: every dependent already accepts
^0.84.3, and the metro packages pin each other exactly, so they all move together. image-size and its dependency queue@6.0.2 are removed from the lockfile.Verification:
yarn install --frozen-lockfilepasses.stroke-widthaswidth), butmetro.config.jsremoves svg fromassetExts, so Metro never sizes them.react-native bundle --dev false) builds: 21.6 MB, 72 assets copied.#4566 (RN 0.87.1) needs the same fix separately: its lockfile has metro 0.87.0, which still depends on image-size. 0.87.1 drops it.
This pull request is categorized as a:
Checklist
yarn run tscand made sure my code compiles correctlyyarn run lintand made sure my code didn’t contain any problematic patternsyarn run prettierand made sure my code is formatted correctlyyarn run testand made sure all of the tests passNo source files changed; CI runs these checks.
Testing
If you modified or added a utility file, did you add new unit tests?
I have tested this PR on the following platforms (please specify OS version and phone model/VM):
I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):
On-device
Remote
Locales
Third Party Dependencies and Packages
yarnafter this PR is merged inpackage.jsonandyarn.lockhave been properly updatedOther: