fix(sharp): support create input descriptors - #8818
Closed
proggeramlug wants to merge 2 commits into
Closed
Conversation
|
Warning Review limit reachedNext included review available in 19 minutes. View limit detailsLimit details: You’ve used all 8 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
proggeramlug
added a commit
that referenced
this pull request
Aug 25, 2026
* fix(async_hooks): address lifecycle review feedback * fix(doctor): reject stale runtime archives * docs: add runtime compatibility changelog fragment * fix(sharp): support create input descriptors * perf(codegen): specialize call-returned array stores * perf(map): repair ordered-delete indexes in place * chore: add changelog for map delete optimization * test(map): root ordered-delete string keys * feat(qs): add native Stripe-compatible shim (#8751) * docs: add changelog fragment for sharp create * fix(runtime): complete build identity inputs * test(compile): cover compiled package builtin imports * chore: add changelog for array-store optimization --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
Contributor
Author
|
Landed on |
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.
Summary
Adds support for Sharp's object-form
createinput sosharp({ create: ... }).png().toBuffer()creates a real solid RGB or RGBA image instead of returning an invalid handle.Changes
create.width,height,channels, andbackgroundusing Sharp-compatible bounds and channel rules.sharp({ create: ... })constructor form.Related issue
Fixes #8748
Test plan
cargo build --release -p perry-ext-sharpcargo test -p perry-ext-sharp --libcargo clippy -p perry-ext-sharp --lib --no-deps -- -D warningscargo test -p perry --test issue_8748_sharp_createpython scripts/check_test_registration.pycargo run -p perry-doc-tests -- --lint docs/srccargo fmt -p perry-ext-sharp -p perry-codegen -p perry -- --checkdocs/src/Screenshots / output
Before: object-form
createinput producedInvalid sharp handle.After: RGB and RGBA canvases encode to PNG and decode with the expected dimensions, channels, and alpha metadata.
Checklist
feat:/fix:/docs:/chore:prefix convention used in the log