Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Feb 10, 2024
1 parent 74a4379 commit dfff598
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
5 changes: 5 additions & 0 deletions img.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,11 @@ class Image {
let sharpFormatOptions = this.getSharpOptionsForFormat(outputFormat);
let hasFormatOptions = Object.keys(sharpFormatOptions).length > 0;
if(hasFormatOptions || outputFormat && metadata.format !== outputFormat) {
// https://github.com/lovell/sharp/issues/3680
// Fix heic regression in sharp 0.33
if(outputFormat === "heic" && !sharpFormatOptions.compression) {
sharpFormatOptions.compression = "av1";
}
sharpInstance.toFormat(outputFormat, sharpFormatOptions);
}

Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"brotli-size": "^4.0.0",
"debug": "^4.3.4",
"entities": "^4.5.0",
"image-size": "^1.0.2",
"image-size": "^1.1.1",
"p-queue": "^6.6.2",
"sharp": "^0.32.6"
"sharp": "^0.33.2"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-plugin-webc": "^0.11.1",
"ava": "^5.3.1",
"ava": "^6.1.1",
"eslint": "^8.52.0",
"pixelmatch": "^5.3.0"
},
Expand All @@ -57,11 +57,13 @@
"files": [
"./test/*.js"
],
"ignoredByWatcher": [
"./.cache/*",
"./img/*",
"./test/img/*",
"./test/**/generated*"
]
"watchMode": {
"ignoreChanges": [
"./.cache/*",
"./img/*",
"./test/img/*",
"./test/**/generated*"
]
}
}
}
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ test("Animated gif", async t => {
t.is(stats.gif[0].width, 400);
t.is(stats.gif[0].height, 400);
// it’s a big boi
t.true( stats.gif[0].size > 1000*1000 );
t.true( stats.gif[0].size > 1000*999 );
});

test("Change hashLength", async t => {
Expand Down

0 comments on commit dfff598

Please sign in to comment.