chore: bump sharp to 0.34.5 (latest stable, binary as optional dep, no postinstall download)#453
Merged
Merged
Conversation
tony8713
force-pushed
the
chore/bump-sharp
branch
3 times, most recently
from
June 8, 2026 15:59
e21d9e1 to
634bcaf
Compare
…ownload) Rebased onto test/resolver-image-snapshots. Keeps only the sharp dependency bump and the resize() return-type adaptation; test/snapshot changes are dropped since the new image-snapshot test helper handles them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tony8713
force-pushed
the
chore/bump-sharp
branch
from
June 10, 2026 00:29
ad0009a to
d6bdaf0
Compare
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.
sharp was pinned
^0.30.1. On 0.30.x the native binary is fetched in a postinstall step, which times out flakily on CI and causes intermittent install failures.sharp 0.33+ ships platform binaries as
@img/sharp-*npm optional dependencies, so there is no postinstall download step at all - the right prebuilt binary is just resolved from the lockfile. Bumped to the current latest stable,0.34.5(0.35.x is still RC-only), per @wa0x6e's request for the latest version.Scope
package.json: sharp^0.30.1->^0.34.5yarn.lock: now carries the@img/sharp-*optional deps at0.34.5(e.g.@img/sharp-darwin-arm64, the linux/musl/win32 variants, and@img/sharp-libvips-*at1.2.4)src/utils.ts: annotateresize()asPromise<Buffer>. sharp 0.34.5's types resolve cleanly toBuffer, so noanycast is needed - this just makes the inferred return type explicit.Base
Based on #456 (
test/resolver-image-snapshots). The shared test-snapshot changes that adapt the resolver tests to the new sharp types are inherited from that branch, not duplicated here.Node compat
engines.nodeis>=22.6.0, CI runs on Node 22. sharp 0.34.5 requires Node^18.17.0 || ^20.3.0 || >=21.0.0, so Node 22 is well within range.🤖 Generated with Claude Code