Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump sharp 0.33 #664

Merged
merged 8 commits into from
Dec 4, 2023
Merged

Conversation

birkskyum
Copy link
Contributor

@birkskyum birkskyum commented Dec 1, 2023

Sharp 0.33 solves a lot of issues around installation due to the postinstall script, and it brings it's own types which the Renovate PR doesn't get right.

Fixing this in imagetools, will i.e. fix a lot downstream issues of installing. Here is i.e. an example of Qwik with Deno etc.

  • I have read the contributing guidelines
  • I have written new tests, as applicable (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • I have added a changeset, if applicable
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • What is the new behavior (if this is a feature change)?

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this
    PR?)

  • Other information:

Copy link

changeset-bot bot commented Dec 1, 2023

🦋 Changeset detected

Latest commit: ea6561a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
imagetools-core Patch
vite-imagetools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann
Copy link
Collaborator

Thanks @birkskyum. I kicked off the CI and it looks like you'll have to update a few test assertions as part of this PR

@birkskyum
Copy link
Contributor Author

birkskyum commented Dec 1, 2023

Hmm, it's more than test assertions it would seem. There is this change in the heif options that imagetools need to adapt to:

Also the tint weight seem to have changed:.

@birkskyum
Copy link
Contributor Author

birkskyum commented Dec 1, 2023

I've added this compression line to the format.ts, so it'll know to use av1, which was the previous default. Typescript complains a bit here, because the code doesn't do type narrowing of the outputOptions based on the value of the format.

    return image.toFormat(format, {
      compression: format == 'heif' ? 'av1' : undefined,
      quality: getQuality(config, image),
      lossless: getLossless(config, image) as boolean,
      progressive: getProgressive(config, image) as boolean
    })

@birkskyum
Copy link
Contributor Author

Okay, I've tried to update the tests

@birkskyum
Copy link
Contributor Author

birkskyum commented Dec 2, 2023

Getting close. Rolled back a change, so the tests in the vite package are unchanged. Good chance it'll pass now on CI

Copy link

codecov bot commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ce8a285) 93.60% compared to head (c7a0bef) 93.60%.
Report is 1 commits behind head on main.

❗ Current head c7a0bef differs from pull request most recent head ea6561a. Consider uploading reports for the commit ea6561a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #664   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files          32       32           
  Lines        1188     1189    +1     
  Branches      188      189    +1     
=======================================
+ Hits         1112     1113    +1     
  Misses         76       76           
Flag Coverage Δ
imagetools-core 97.01% <100.00%> (+<0.01%) ⬆️
vite-imagetools 78.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benmccann benmccann merged commit 5d7a77d into JonasKruckenberg:main Dec 4, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants