Skip to content

chore(deps): bump [email protected] - #95507

Merged
eps1lon merged 16 commits into
vercel:canaryfrom
styfle:styfle/sharp-0.35.3
Jul 21, 2026
Merged

eps1lon merged 16 commits into
vercel:canaryfrom
styfle:styfle/sharp-0.35.3

Conversation

@styfle

@styfle styfle commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: e754027

@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Stats from current PR

🔴 1 regression

Metric Canary PR Change
node_modules Size 517 MB 527 MB 🔴 +9.97 MB (+2%)
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change
Cold (Listen) 1.015s 1.014s ✓
Cold (Ready in log) 1.020s 1.013s ✓
Cold (First Request) 1.724s 1.725s ✓
Warm (Listen) 1.064s 1.013s ✓
Warm (Ready in log) 1.040s 1.014s ✓
Warm (First Request) 803ms 810ms ✓
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change
Cold (Listen) 813ms 813ms ✓
Cold (Ready in log) 792ms 793ms ✓
Cold (First Request) 3.428s 3.469s ✓
Warm (Listen) 813ms 813ms ✓
Warm (Ready in log) 792ms 794ms ✓
Warm (First Request) 3.471s 3.478s ✓

⚡ Production Builds

Metric Canary PR Change
Fresh Build 6.933s 6.939s ✓
Cached Build 7.108s 7.046s ✓
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change
Fresh Build 25.878s 25.830s ✓
Cached Build 25.804s 26.043s ✓
node_modules Size 517 MB 527 MB 🔴 +9.97 MB (+2%)
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
03frh1tm1pkvs.js gzip 65.6 kB N/A -
0a-p0meqxynjz.js gzip 10.3 kB N/A -
0avtke4yefj4-.js gzip 13.1 kB N/A -
0ban--bx2qns6.js gzip 155 B N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB ✓
0ke29q58efn1a.js gzip 156 B N/A -
0m3evdsbel0p0.js gzip 153 B N/A -
0p6ivy9lb7-ut.js gzip 157 B N/A -
0pt5of3ch6d2u.js gzip 13.6 kB N/A -
0sug3ihj23mvn.js gzip 154 B N/A -
0xnsdo-6y9r3k.js gzip 5.72 kB N/A -
0y25v1ej71uft.js gzip 155 B N/A -
0yi7is8u4covm.js gzip 8.77 kB N/A -
12zd-d7xicsb4.js gzip 158 B N/A -
1elt1qium-r2m.css gzip 115 B 115 B ✓
1g2ea05dkmmwi.js gzip 45.2 kB N/A -
1mqxdmso4160h.js gzip 160 B N/A -
1prv-wg6jgtt2.js gzip 8.77 kB N/A -
1t47vod02e_4a.js gzip 8.75 kB N/A -
1tf1phijqlx9j.js gzip 220 B 220 B ✓
1tw002sq5bo4l.js gzip 10 kB N/A -
1wlerik1n7zbr.js gzip 8.7 kB N/A -
2d91wcgx6lf2k.js gzip 153 B N/A -
2koflviradwt3.js gzip 7.4 kB N/A -
2lviwqiqxm904.js gzip 3.52 kB N/A -
2ocpv0tylryvn.js gzip 160 B N/A -
2pevdqjpbf3xk.js gzip 9.45 kB N/A -
2qd2anu9eizlz.js gzip 8.75 kB N/A -
2sv39ae5_8vfj.js gzip 8.81 kB N/A -
2utx6n7w65xqa.js gzip 8.7 kB N/A -
2xsvwiy3-s105.js gzip 156 B N/A -
2zhsfsomo6g1v.js gzip 169 B N/A -
3-ukivglqkfeq.js gzip 8.78 kB N/A -
325xisqrylugu.js gzip 450 B N/A -
3jc9ghvds1spf.js gzip 2.29 kB N/A -
3juwkvkgvywfe.js gzip 10.6 kB N/A -
3kbove7q58uqh.js gzip 13.2 kB N/A -
3qn7vntp30gaj.js gzip 1.47 kB N/A -
3s5fbzg2qit8e.js gzip 156 B N/A -
3xtfvhlgn22av.js gzip 71.1 kB N/A -
turbopack-0z.._-wk.js gzip 3.78 kB N/A -
turbopack-0z..g5ya.js gzip 3.8 kB N/A -
turbopack-10..hlo9.js gzip 3.8 kB N/A -
turbopack-11..yksz.js gzip 3.81 kB N/A -
turbopack-1k..5le3.js gzip 3.8 kB N/A -
turbopack-2p..8e3n.js gzip 3.8 kB N/A -
turbopack-2s..l7od.js gzip 3.8 kB N/A -
turbopack-2u..c9m0.js gzip 3.8 kB N/A -
turbopack-39..3ysu.js gzip 3.8 kB N/A -
turbopack-3i..u_md.js gzip 3.8 kB N/A -
turbopack-3l..z_a8.js gzip 3.81 kB N/A -
turbopack-3w..t926.js gzip 3.8 kB N/A -
turbopack-3y..v370.js gzip 3.82 kB N/A -
turbopack-40..h7ed.js gzip 3.8 kB N/A -
030a1njeh5b77.js gzip N/A 10 kB -
0ceaj3rmii5dl.js gzip N/A 157 B -
0ot0qt5np20h7.js gzip N/A 8.78 kB -
0po7u01wwhl8s.js gzip N/A 157 B -
12m9rr7_7cexd.js gzip N/A 8.7 kB -
15-b7iytymgp5.js gzip N/A 65.6 kB -
186r3y_rfvr0b.js gzip N/A 8.78 kB -
19v97848yrjp7.js gzip N/A 8.81 kB -
1b9oo_n-opj3l.js gzip N/A 156 B -
1mvdo2etbyclo.js gzip N/A 156 B -
1nd_0rwgz2ozk.js gzip N/A 9.45 kB -
1oi9pltr_e10m.js gzip N/A 10.6 kB -
1qow5vb4es1bl.js gzip N/A 152 B -
1rd9tzqgzsz2w.js gzip N/A 8.77 kB -
1rewgj8du8r7b.js gzip N/A 157 B -
1rq1g_cwv642d.js gzip N/A 10.3 kB -
1uojw_uabeg93.js gzip N/A 450 B -
1w-7lusgyl81y.js gzip N/A 8.7 kB -
2-4bvun4utbsg.js gzip N/A 157 B -
20pls2cco-oyl.js gzip N/A 71.1 kB -
21h56wdn9zddo.js gzip N/A 8.75 kB -
21kc-4x8zf_oh.js gzip N/A 155 B -
22nt-vwpfkpq5.js gzip N/A 155 B -
2j9dbydew6g_b.js gzip N/A 162 B -
2lg10omv7xu14.js gzip N/A 3.52 kB -
2ovff1533zvno.js gzip N/A 13.2 kB -
2s4z8jy0z7v93.js gzip N/A 1.46 kB -
2y6gb5bs4mnam.js gzip N/A 8.75 kB -
2zvoj8k1z3cei.js gzip N/A 7.41 kB -
341h71ln1jpl3.js gzip N/A 2.29 kB -
34ttpt_n7605h.js gzip N/A 5.72 kB -
36ckfq9o-ys-a.js gzip N/A 13.1 kB -
37pm_isc9xj9i.js gzip N/A 163 B -
3vdh6_u50pu5t.js gzip N/A 13.6 kB -
3zbnmofunn_bw.js gzip N/A 158 B -
441_xec6sd6zp.js gzip N/A 45.1 kB -
45148p5lps61x.js gzip N/A 170 B -
turbopack-00..m1m7.js gzip N/A 3.81 kB -
turbopack-0d..4kzx.js gzip N/A 3.81 kB -
turbopack-0z..p79s.js gzip N/A 3.81 kB -
turbopack-1c..77uv.js gzip N/A 3.81 kB -
turbopack-1i..3kn6.js gzip N/A 3.81 kB -
turbopack-2d..v5q3.js gzip N/A 3.82 kB -
turbopack-2f..v9c_.js gzip N/A 3.78 kB -
turbopack-2k..d454.js gzip N/A 3.81 kB -
turbopack-2t..j9f5.js gzip N/A 3.81 kB -
turbopack-3_..5w5s.js gzip N/A 3.81 kB -
turbopack-39..bm8d.js gzip N/A 3.81 kB -
turbopack-3e..0dhh.js gzip N/A 3.8 kB -
turbopack-3t..czon.js gzip N/A 3.81 kB -
turbopack-3v..bfyi.js gzip N/A 3.81 kB -
Total 448 kB 448 kB ⚠️ +98 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 778 B 777 B ✓
Total 778 B 777 B ✅ -1 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 436 B 435 B ✓
Total 436 B 435 B ✅ -1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
3322-HASH.js gzip 63.7 kB N/A -
4191.HASH.js gzip 169 B N/A -
7920-HASH.js gzip 4.68 kB N/A -
9784-HASH.js gzip 5.63 kB N/A -
b1ad9f4c-HASH.js gzip 62.9 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB ✓
main-app-HASH.js gzip 254 B 253 B ✓
main-HASH.js gzip 40 kB 40 kB ✓
webpack-HASH.js gzip 1.68 kB 1.68 kB ✓
3577.HASH.js gzip N/A 168 B -
578-HASH.js gzip N/A 64.4 kB -
8590-HASH.js gzip N/A 5.61 kB -
9750-HASH.js gzip N/A 4.69 kB -
a8984546-HASH.js gzip N/A 62.9 kB -
Total 239 kB 239 kB ⚠️ +630 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB ✓
Total 39.4 kB 39.4 kB ✓
Pages
Canary PR Change
_app-HASH.js gzip 194 B 193 B ✓
_error-HASH.js gzip 181 B 182 B ✓
css-HASH.js gzip 334 B 331 B ✓
dynamic-HASH.js gzip 1.81 kB 1.81 kB ✓
edge-ssr-HASH.js gzip 255 B 253 B ✓
head-HASH.js gzip 349 B 351 B ✓
hooks-HASH.js gzip 382 B 384 B ✓
image-HASH.js gzip 580 B 582 B ✓
index-HASH.js gzip 260 B 259 B ✓
link-HASH.js gzip 2.48 kB 2.48 kB ✓
routerDirect..HASH.js gzip 317 B 318 B ✓
script-HASH.js gzip 384 B 386 B ✓
withRouter-HASH.js gzip 316 B 315 B ✓
1afbb74e6ecf..834.css gzip 106 B 106 B ✓
Total 7.95 kB 7.95 kB ⚠️ +2 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 128 kB 128 kB ✓
page.js gzip 287 kB 287 kB ✓
Total 415 kB 414 kB ✅ -605 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 616 B 616 B ✓
middleware-r..fest.js gzip 156 B 156 B ✓
middleware.js gzip 45.5 kB 45 kB 🟢 478 B (-1%)
edge-runtime..pack.js gzip 842 B 842 B ✓
Total 47.1 kB 46.6 kB ✅ -478 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 718 B 718 B ✓
Total 718 B 718 B ✓
Build Cache
Canary PR Change
0.pack gzip 4.82 MB 4.82 MB ✓
index.pack gzip 119 kB 119 kB ✓
index.pack.old gzip 119 kB 119 kB ✓
Total 5.06 MB 5.06 MB ✅ -731 B

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 366 kB 366 kB ✓
app-page-exp..prod.js gzip 202 kB 202 kB ✓
app-page-tur...dev.js gzip 365 kB 365 kB ✓
app-page-tur..prod.js gzip 202 kB 202 kB ✓
app-page-tur...dev.js gzip 362 kB 362 kB ✓
app-page-tur..prod.js gzip 200 kB 200 kB ✓
app-page.run...dev.js gzip 362 kB 362 kB ✓
app-page.run..prod.js gzip 200 kB 200 kB ✓
app-route-ex...dev.js gzip 81.7 kB 81.7 kB ✓
app-route-ex..prod.js gzip 55.6 kB 55.6 kB ✓
app-route-tu...dev.js gzip 81.8 kB 81.8 kB ✓
app-route-tu..prod.js gzip 55.6 kB 55.6 kB ✓
app-route-tu...dev.js gzip 81.4 kB 81.4 kB ✓
app-route-tu..prod.js gzip 55.4 kB 55.4 kB ✓
app-route.ru...dev.js gzip 81.3 kB 81.3 kB ✓
app-route.ru..prod.js gzip 55.3 kB 55.3 kB ✓
dist_client_...dev.js gzip 324 B 324 B ✓
dist_client_...dev.js gzip 326 B 326 B ✓
dist_client_...dev.js gzip 318 B 318 B ✓
dist_client_...dev.js gzip 317 B 317 B ✓
pages-api-tu...dev.js gzip 45.4 kB 45.4 kB ✓
pages-api-tu..prod.js gzip 34.1 kB 34.1 kB ✓
pages-api.ru...dev.js gzip 45.4 kB 45.4 kB ✓
pages-api.ru..prod.js gzip 34.1 kB 34.1 kB ✓
pages-turbo....dev.js gzip 54.9 kB 54.9 kB ✓
pages-turbo...prod.js gzip 39.7 kB 39.7 kB ✓
pages.runtim...dev.js gzip 54.8 kB 54.8 kB ✓
pages.runtim..prod.js gzip 39.7 kB 39.7 kB ✓
server.runti..prod.js gzip 67.8 kB 67.8 kB ✓
use-cache-pr...dev.js gzip 71.6 kB 71.6 kB ✓
use-cache-pr...dev.js gzip 71.6 kB 71.6 kB ✓
use-cache-pr...dev.js gzip 69.9 kB 69.9 kB ✓
use-cache-pr...dev.js gzip 69.9 kB 69.9 kB ✓
Total 3.51 MB 3.51 MB ✅ -1 B
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/e754027916732ada51cf3f96cc9f8d9319f435e2/next

Commit: e754027

const t = meta?.mediaType
if (t && [AVIF, WEBP, JPEG, PNG, GIF, SVG, TIFF].includes(t)) {
return t
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The new version of sharp changed the metadata response.

  • Before{ "format": "avif" }
  • After { "format": "heic", "mediaType": "image/avif" }

Since this code is after the mediaType, we can just return it here instead of needing to merge with the other detector response.

Also we can probably remove this sharp metadata call in a future PR anyway.

default:
return null
format satisfies never // exhaustive check
return null // impossible to reach

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The satisfies makes it safer in the future since we'll get a build error if we forget to add a case

if (contentType === AVIF) {
transformer.avif({
quality: Math.max(quality - 20, 1),
quality: Math.max(quality - 30, 1),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was necessary since the avif output was larger than the webp output and we have a test to catch this problem.

I checked what sharp recommends and they have a default quality of 80 for webp and 50 for avif so a difference of 30 is expected here.

I also used my human eye balls to verify there is no discernable difference when converting mountains.jpg to webp or avif at this new quality.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also here's an anaylsis for the output comparing before/after

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I checked what sharp recommends and they have a default quality of 80 for webp and 50 for avif so a difference of 30 is expected here.

It'd be good to add a comment here with a link to the docs.

Also, unclear if just subtracting 30 is better, or if multiplying by 50/80 is better. The second option would probably scale better to really low quality settings?

Looking around I found this:
https://www.industrialempathy.com/posts/avif-webp-quality-settings/#quality-settings-for-a-range-of-jpeg-qualities
https://docs.google.com/spreadsheets/d/1E29kPLR5_0PThsw6SVbco7HvMU0aynBLfVN0RfIXgPk/edit?gid=1245219304#gid=1245219304

That implies something closer to a coefficient than a constant offset.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@styfle styfle Jul 7, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I applied your suggestion for the 50/80 ratio in 78d062f since it makes avif better match webp at an value of quality 👍

See results here: avif-quality-comparison-ratio-w1024.html.zip

}
if (
file.match(
/\/node_modules\/@img\/sharp-\w+-\w+\/lib\/sharp-\w+-\w+.node$/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This regex was too brittle before so I changed it to be more explicit which is simply replace the platform and arch so this test will pass on windows/mac/linux/etc but still fail if its missing the files sharp needs to run.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you still remove the version from the filename though? i.e. the 0.35.3

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mischnic Fixed in 3a3bc00

@styfle
styfle requested a review from timneutkens July 6, 2026 19:07
@styfle
styfle requested a review from eps1lon July 6, 2026 20:23
if (contentType === AVIF) {
transformer.avif({
quality: Math.max(quality - 20, 1),
quality: Math.max(quality - 30, 1),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I checked what sharp recommends and they have a default quality of 80 for webp and 50 for avif so a difference of 30 is expected here.

It'd be good to add a comment here with a link to the docs.

Also, unclear if just subtracting 30 is better, or if multiplying by 50/80 is better. The second option would probably scale better to really low quality settings?

Looking around I found this:
https://www.industrialempathy.com/posts/avif-webp-quality-settings/#quality-settings-for-a-range-of-jpeg-qualities
https://docs.google.com/spreadsheets/d/1E29kPLR5_0PThsw6SVbco7HvMU0aynBLfVN0RfIXgPk/edit?gid=1245219304#gid=1245219304

That implies something closer to a coefficient than a constant offset.

@styfle

styfle commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Changing to draft per @eps1lon so we can merge another PR first and avoid merge conflicts

@styfle
styfle marked this pull request as draft July 7, 2026 18:06
@styfle
styfle marked this pull request as ready for review July 21, 2026 18:05
@eps1lon
eps1lon enabled auto-merge (squash) July 21, 2026 19:02
@eps1lon
eps1lon force-pushed the styfle/sharp-0.35.3 branch from 07cb155 to e754027 Compare July 21, 2026 19:13
@eps1lon
eps1lon merged commit 120c804 into vercel:canary Jul 21, 2026
216 of 218 checks passed
@styfle
styfle deleted the styfle/sharp-0.35.3 branch July 21, 2026 19:58
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants