fix(deps): alias image-size to image-size-next@1.2.2 (CVE-2025-71329/71330) - #46
Open
lcf2212dev wants to merge 1 commit into
Open
lcf2212dev wants to merge 1 commit into
lcf2212dev wants to merge 1 commit into
Conversation
…71330) Published datauri still pins archived image-size@1.0.0. Alias the 1.x coordinate to the maintained drop-in so pkg-json.js ships the patched package without changing the public API.
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.
Why this PR
Published
datauri@4.1.0still depends onimage-size@1.0.0(exact pin, copied into the npm tarball bytools/pkg-json.jsfrom this repo'sdevDependencies). Upstreamimage-sizeis archived. The last 1.x release (1.2.1) is still affected by:There is no patched version on the original package name.
npm audit fixwill not rename the coordinate. This is a follow-up to #45 with a one-line drop-in so consumers stop pulling the vulnerable tarball.Change
Alias the published 1.x dependency (this repo is major 1, CJS
imageSize(buffer)insrc/datauri/css.ts):image-size-next@1.2.2is a MIT community fork with the same 1.x public API. Compare: lcf2212dev/image-size-next@v1.2.1...v1.2.2This is the 1.x pin. Do not use
image-size-next@2.1.1here (that line is ESM+CJS 2.x and is not a drop-in for this tree).Hub: lcf2212dev/image-size-next#3
I maintain
image-size-nextand am not affiliated with the originalimage-sizeauthor. Happy to switch to vendoring or dropping the CSS dimension helper if you prefer.Test plan
npm ciresolvesimage-size→image-size-next@1.2.2npm test(CSS width/height path still callsimageSizeon the file buffer)npm run build/pkg-jsonwrites"image-size": "npm:image-size-next@1.2.2"intolib/datauri/package.json