Skip to content

chore(deps): bump metro to 0.84.6 to drop image-size - #4734

Merged
kaloudis merged 1 commit into
masterfrom
chore/metro-0.84.6
Sep 25, 2026
Merged

kaloudis merged 1 commit into
masterfrom
chore/metro-0.84.6

Conversation

@kaloudis

@kaloudis kaloudis commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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-lockfile passes.
  • For all 421 raster images tracked in the repo, the vendored parsers return the same dimensions as image-size 1.2.1. SVGs give different results (the new parser reads stroke-width as width), but metro.config.js removes svg from assetExts, so Metro never sizes them.
  • An Android release bundle (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:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

No source files changed; CI runs these checks.

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

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.

@athena-zeusln athena-zeusln Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

Test coverage

Metric Coverage Covered/Total vs master
Statements 42.67% 6457/15132 0.00%
Branches 39.2% 3659/9333 0.00%
Functions 32.01% 866/2705 0.00%
Lines 43.12% 6192/14358 0.00%

Commit: 6d4e377 | Test run | Baseline: master@5744ac66d

@kaloudis kaloudis added Dependencies Pull requests that update a dependency file Security labels Sep 25, 2026
@kaloudis
kaloudis merged commit 1b9f02d into master Sep 25, 2026
4 checks passed
@kaloudis
kaloudis deleted the chore/metro-0.84.6 branch September 25, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Pull requests that update a dependency file Security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant