Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage 80.12% 80.12%
=======================================
Files 123 123
Lines 12142 12142
Branches 856 856
=======================================
Hits 9729 9729
Misses 2410 2410
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR switches HTML minification from @minify-html/node to @swc/html to address security or compatibility concerns referenced in the linked issue.
Key Changes:
- Replaced
@minify-html/nodewith@swc/htmlpackage - Updated imports from
HTMLMinifiertominify/minifySyncfunctions - Updated Dependabot configuration to track the new package
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/generators/web/utils/processing.mjs |
Updates import and minification call to use minifySync from @swc/html |
src/generators/legacy-html/index.mjs |
Updates import and minification call to use async minify from @swc/html |
src/generators/legacy-html-all/index.mjs |
Updates import and minification call to use async minify from @swc/html |
package.json |
Replaces @minify-html/node dependency with @swc/html |
npm-shrinkwrap.json |
Updates lockfile to reflect the new dependency |
.github/dependabot.yml |
Updates package grouping configuration for the new minifier |
Files not reviewed (1)
- npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| File | Base | Head | Diff |
|---|---|---|---|
webcrypto.html |
320.52 KB | 334.63 KB | +14.12 KB (+4.40%) |
fs.html |
911.63 KB | 925.40 KB | +13.77 KB (+1.51%) |
crypto.html |
997.54 KB | 1007.81 KB | +10.27 KB (+1.03%) |
n-api.html |
756.11 KB | 765.11 KB | +9.00 KB (+1.19%) |
os.html |
75.44 KB | 83.60 KB | +8.16 KB (+10.82%) |
errors.html |
340.30 KB | 348.34 KB | +8.04 KB (+2.36%) |
http2.html |
733.43 KB | 739.99 KB | +6.56 KB (+0.89%) |
http.html |
591.77 KB | 597.92 KB | +6.15 KB (+1.04%) |
cli.html |
280.23 KB | 286.36 KB | +6.13 KB (+2.19%) |
util.html |
708.05 KB | 713.85 KB | +5.80 KB (+0.82%) |
test.html |
779.36 KB | 784.63 KB | +5.27 KB (+0.68%) |
quic.html |
137.37 KB | 142.57 KB | +5.20 KB (+3.79%) |
stream.html |
803.13 KB | 808.30 KB | +5.17 KB (+0.64%) |
dns.html |
210.83 KB | 215.95 KB | +5.11 KB (+2.43%) |
buffer.html |
1.06 MB | 1.06 MB | +4.94 KB (+0.46%) |
process.html |
674.24 KB | 678.97 KB | +4.73 KB (+0.70%) |
sqlite.html |
182.98 KB | 187.57 KB | +4.59 KB (+2.51%) |
net.html |
209.13 KB | 213.46 KB | +4.34 KB (+2.07%) |
deprecations.html |
249.14 KB | 253.38 KB | +4.23 KB (+1.70%) |
webstreams.html |
255.31 KB | 259.46 KB | +4.15 KB (+1.63%) |
perf_hooks.html |
345.37 KB | 349.49 KB | +4.12 KB (+1.19%) |
tls.html |
257.83 KB | 261.89 KB | +4.07 KB (+1.58%) |
readline.html |
200.13 KB | 204.03 KB | +3.90 KB (+1.95%) |
esm.html |
122.64 KB | 126.37 KB | +3.72 KB (+3.04%) |
zlib.html |
272.57 KB | 276.26 KB | +3.69 KB (+1.35%) |
events.html |
541.82 KB | 545.42 KB | +3.60 KB (+0.66%) |
module.html |
322.97 KB | 326.53 KB | +3.56 KB (+1.10%) |
url.html |
311.94 KB | 315.44 KB | +3.50 KB (+1.12%) |
vm.html |
330.92 KB | 334.30 KB | +3.38 KB (+1.02%) |
worker_threads.html |
382.86 KB | 386.19 KB | +3.32 KB (+0.87%) |
child_process.html |
438.89 KB | 442.12 KB | +3.23 KB (+0.74%) |
v8.html |
236.77 KB | 239.92 KB | +3.14 KB (+1.33%) |
diagnostics_channel.html |
221.97 KB | 224.98 KB | +3.01 KB (+1.36%) |
globals.html |
120.21 KB | 123.17 KB | +2.96 KB (+2.46%) |
assert.html |
464.26 KB | 466.87 KB | +2.61 KB (+0.56%) |
dgram.html |
153.16 KB | 155.64 KB | +2.48 KB (+1.62%) |
modules.html |
148.57 KB | 151.05 KB | +2.48 KB (+1.67%) |
packages.html |
118.92 KB | 121.26 KB | +2.34 KB (+1.97%) |
cluster.html |
195.91 KB | 198.22 KB | +2.32 KB (+1.18%) |
intl.html |
40.50 KB | 42.78 KB | +2.28 KB (+5.64%) |
repl.html |
215.29 KB | 217.57 KB | +2.28 KB (+1.06%) |
inspector.html |
102.78 KB | 105.01 KB | +2.23 KB (+2.17%) |
timers.html |
87.22 KB | 89.38 KB | +2.16 KB (+2.48%) |
console.html |
95.78 KB | 97.90 KB | +2.12 KB (+2.22%) |
single-executable-applications.html |
77.49 KB | 79.60 KB | +2.11 KB (+2.72%) |
path.html |
93.73 KB | 95.76 KB | +2.03 KB (+2.17%) |
tty.html |
41.61 KB | 43.63 KB | +2.03 KB (+4.87%) |
https.html |
153.63 KB | 155.65 KB | +2.01 KB (+1.31%) |
async_context.html |
198.55 KB | 200.56 KB | +2.01 KB (+1.01%) |
async_hooks.html |
206.68 KB | 208.65 KB | +1.97 KB (+0.95%) |
index.html |
15.18 KB | 17.06 KB | +1.88 KB (+12.40%) |
addons.html |
336.17 KB | 338.04 KB | +1.87 KB (+0.56%) |
debugger.html |
36.28 KB | 38.11 KB | +1.83 KB (+5.05%) |
tracing.html |
87.59 KB | 89.42 KB | +1.83 KB (+2.09%) |
domain.html |
99.35 KB | 101.17 KB | +1.81 KB (+1.82%) |
permissions.html |
35.66 KB | 37.47 KB | +1.81 KB (+5.08%) |
typescript.html |
32.16 KB | 33.90 KB | +1.74 KB (+5.41%) |
report.html |
186.13 KB | 187.86 KB | +1.73 KB (+0.93%) |
wasi.html |
43.55 KB | 45.27 KB | +1.73 KB (+3.96%) |
environment_variables.html |
24.47 KB | 26.17 KB | +1.70 KB (+6.96%) |
querystring.html |
32.07 KB | 33.76 KB | +1.68 KB (+5.24%) |
punycode.html |
32.73 KB | 34.40 KB | +1.67 KB (+5.12%) |
string_decoder.html |
38.60 KB | 40.21 KB | +1.61 KB (+4.17%) |
documentation.html |
24.13 KB | 25.74 KB | +1.60 KB (+6.64%) |
embedding.html |
48.08 KB | 49.68 KB | +1.60 KB (+3.33%) |
synopsis.html |
23.93 KB | 25.47 KB | +1.55 KB (+6.46%) |
orama-db Generator
| File | Base | Head | Diff |
|---|---|---|---|
orama-db.json |
7.99 MB | 7.98 MB | -1.88 KB (-0.02%) |
web Generator
| File | Base | Head | Diff |
|---|---|---|---|
fs.html |
1.30 MB | 1.28 MB | -21.62 KB (-1.62%) |
n-api.html |
911.38 KB | 892.33 KB | -19.04 KB (-2.09%) |
deprecations.html |
503.90 KB | 486.96 KB | -16.95 KB (-3.36%) |
cli.html |
502.68 KB | 486.27 KB | -16.42 KB (-3.27%) |
http.html |
723.19 KB | 707.22 KB | -15.97 KB (-2.21%) |
http2.html |
762.52 KB | 746.65 KB | -15.87 KB (-2.08%) |
quic.html |
348.14 KB | 333.42 KB | -14.72 KB (-4.23%) |
buffer.html |
881.18 KB | 868.03 KB | -13.15 KB (-1.49%) |
stream.html |
860.12 KB | 847.24 KB | -12.88 KB (-1.50%) |
crypto.html |
988.89 KB | 976.14 KB | -12.74 KB (-1.29%) |
process.html |
679.33 KB | 666.92 KB | -12.41 KB (-1.83%) |
util.html |
693.32 KB | 682.44 KB | -10.87 KB (-1.57%) |
errors.html |
418.92 KB | 408.28 KB | -10.63 KB (-2.54%) |
webcrypto.html |
489.20 KB | 479.32 KB | -9.88 KB (-2.02%) |
test.html |
688.38 KB | 679.04 KB | -9.34 KB (-1.36%) |
webstreams.html |
337.81 KB | 328.68 KB | -9.13 KB (-2.70%) |
perf_hooks.html |
362.71 KB | 354.20 KB | -8.51 KB (-2.35%) |
net.html |
345.29 KB | 336.95 KB | -8.34 KB (-2.41%) |
globals.html |
228.63 KB | 220.42 KB | -8.21 KB (-3.59%) |
events.html |
450.83 KB | 442.97 KB | -7.86 KB (-1.74%) |
worker_threads.html |
361.38 KB | 354.24 KB | -7.14 KB (-1.98%) |
tls.html |
355.47 KB | 348.92 KB | -6.56 KB (-1.85%) |
zlib.html |
276.67 KB | 271.36 KB | -5.31 KB (-1.92%) |
url.html |
348.75 KB | 343.64 KB | -5.12 KB (-1.47%) |
v8.html |
288.47 KB | 283.49 KB | -4.99 KB (-1.73%) |
dns.html |
286.03 KB | 281.31 KB | -4.72 KB (-1.65%) |
child_process.html |
373.29 KB | 368.78 KB | -4.50 KB (-1.21%) |
vm.html |
337.23 KB | 332.88 KB | -4.34 KB (-1.29%) |
readline.html |
247.44 KB | 243.31 KB | -4.13 KB (-1.67%) |
module.html |
323.86 KB | 319.74 KB | -4.12 KB (-1.27%) |
cluster.html |
195.79 KB | 191.70 KB | -4.08 KB (-2.09%) |
dgram.html |
185.00 KB | 181.11 KB | -3.89 KB (-2.10%) |
inspector.html |
154.36 KB | 150.77 KB | -3.60 KB (-2.33%) |
modules.html |
187.15 KB | 183.63 KB | -3.52 KB (-1.88%) |
diagnostics_channel.html |
224.25 KB | 220.88 KB | -3.36 KB (-1.50%) |
console.html |
144.20 KB | 140.92 KB | -3.28 KB (-2.27%) |
sqlite.html |
232.97 KB | 229.70 KB | -3.27 KB (-1.40%) |
path.html |
143.28 KB | 140.19 KB | -3.09 KB (-2.16%) |
assert.html |
333.21 KB | 330.14 KB | -3.08 KB (-0.92%) |
os.html |
129.06 KB | 132.03 KB | +2.98 KB (+2.31%) |
timers.html |
124.58 KB | 121.66 KB | -2.92 KB (-2.35%) |
repl.html |
188.68 KB | 185.81 KB | -2.87 KB (-1.52%) |
packages.html |
167.37 KB | 164.56 KB | -2.81 KB (-1.68%) |
https.html |
148.40 KB | 145.69 KB | -2.71 KB (-1.83%) |
async_context.html |
161.71 KB | 159.18 KB | -2.53 KB (-1.56%) |
tty.html |
88.56 KB | 86.12 KB | -2.43 KB (-2.75%) |
addons.html |
280.01 KB | 277.74 KB | -2.27 KB (-0.81%) |
async_hooks.html |
157.78 KB | 155.69 KB | -2.09 KB (-1.32%) |
single-executable-applications.html |
109.21 KB | 107.20 KB | -2.01 KB (-1.84%) |
punycode.html |
63.83 KB | 62.08 KB | -1.75 KB (-2.75%) |
tracing.html |
86.43 KB | 84.72 KB | -1.71 KB (-1.98%) |
wasi.html |
69.03 KB | 67.34 KB | -1.69 KB (-2.45%) |
report.html |
181.47 KB | 179.79 KB | -1.68 KB (-0.93%) |
querystring.html |
62.70 KB | 61.16 KB | -1.54 KB (-2.45%) |
esm.html |
159.63 KB | 158.32 KB | -1.31 KB (-0.82%) |
domain.html |
103.47 KB | 102.24 KB | -1.23 KB (-1.19%) |
string_decoder.html |
54.24 KB | 53.02 KB | -1.22 KB (-2.25%) |
typescript.html |
56.15 KB | 55.02 KB | -1.13 KB (-2.02%) |
permissions.html |
60.10 KB | 58.98 KB | -1.12 KB (-1.86%) |
environment_variables.html |
45.91 KB | 44.83 KB | -1.07 KB (-2.34%) |
synopsis.html |
44.66 KB | 43.59 KB | -1.07 KB (-2.39%) |
embedding.html |
58.72 KB | 57.76 KB | -978.00 B (-1.63%) |
documentation.html |
36.34 KB | 35.43 KB | -938.00 B (-2.52%) |
intl.html |
61.67 KB | 60.77 KB | -924.00 B (-1.46%) |
debugger.html |
54.48 KB | 53.63 KB | -863.00 B (-1.55%) |
index.html |
34.43 KB | 33.97 KB | -468.00 B (-1.33%) |
|
What's the performance difference? Our current minifier is very fast (the Vercel issue is a result of AWS runner images) |
I suppose we can do a benchmark? Although by a quick search |
|
Unless there's a significant performance hit to this, I do think I am in favor of doing this, both because it solves the immediate issue, and because swc is a very well used/supported/established package compared to what we're currently using, so it seems like we'd also be reducing our risk factor with this change. |
|
Let's proceed this then, @nodejs/web-infra I'm merging this to unblock dep updates. |
|
(I forgot I authored this and shouldn't fast-track it myself, but making this an exception since it is a dep replacement to unblock dep updates, I can retroactively revert this if needed or if anyone is against this merge!) |
This PR removes @minift-html/node and replaces with @swc due to #534