Skip to content

fix: correctly handle format_auto,animated #235

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

Merged
merged 5 commits into from
Mar 21, 2025
Merged

Conversation

jameswragg
Copy link
Contributor

Fixes #234

Using animated modifier creates the following modifier key/value which wasn't seen as a truthy value when used in combination with format_auto meaning the format selection wasn't limited to "image/webp", "image/gif":

{
  animated: ''
}

jameswragg and others added 2 commits July 5, 2024 11:53
Using `animated` modifier creates the following modifier key/value which wasn't seen as a truthy value when using `format_auto`:
```
{
  animated: ''
}
```
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.83%. Comparing base (f666cb4) to head (29a216d).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
src/server.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #235       +/-   ##
===========================================
- Coverage   56.02%   45.83%   -10.20%     
===========================================
  Files          14       13        -1     
  Lines        1203      888      -315     
  Branches       83       83               
===========================================
- Hits          674      407      -267     
+ Misses        526      478       -48     
  Partials        3        3               

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks. We should later properly fix it by making sure modifiers are mapped to boolean. I have made slight change to explicitly include "" case.

@pi0 pi0 changed the title fix: animated modifier wasn't correctly being passed to autoDetectFormat fix: correctly handle f_auto,animated Mar 21, 2025
@pi0 pi0 changed the title fix: correctly handle f_auto,animated fix: correctly handle format_auto,animated Mar 21, 2025
@pi0 pi0 merged commit b9aba99 into unjs:main Mar 21, 2025
2 of 4 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.

animated modifier not being respected when used with format_webp
2 participants