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 #621 +/- ##
=======================================
Coverage ? 72.51%
=======================================
Files ? 144
Lines ? 12597
Branches ? 872
=======================================
Hits ? 9135
Misses ? 3457
Partials ? 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
webcrypto.html |
320.48 KB | 334.63 KB | +14.15 KB (+4.42%) |
fs.html |
913.83 KB | 927.66 KB | +13.83 KB (+1.51%) |
crypto.html |
997.50 KB | 1007.81 KB | +10.31 KB (+1.03%) |
n-api.html |
758.34 KB | 767.40 KB | +9.07 KB (+1.20%) |
os.html |
75.40 KB | 83.60 KB | +8.20 KB (+10.87%) |
errors.html |
341.45 KB | 349.54 KB | +8.09 KB (+2.37%) |
http2.html |
737.61 KB | 744.28 KB | +6.66 KB (+0.90%) |
http.html |
591.74 KB | 597.93 KB | +6.19 KB (+1.05%) |
cli.html |
281.36 KB | 287.54 KB | +6.18 KB (+2.20%) |
util.html |
708.63 KB | 714.49 KB | +5.86 KB (+0.83%) |
test.html |
813.57 KB | 818.99 KB | +5.41 KB (+0.67%) |
quic.html |
137.33 KB | 142.57 KB | +5.24 KB (+3.82%) |
stream.html |
803.51 KB | 808.72 KB | +5.21 KB (+0.65%) |
dns.html |
210.79 KB | 215.95 KB | +5.15 KB (+2.44%) |
buffer.html |
1.06 MB | 1.07 MB | +5.00 KB (+0.46%) |
process.html |
677.94 KB | 682.72 KB | +4.78 KB (+0.71%) |
sqlite.html |
191.59 KB | 196.35 KB | +4.76 KB (+2.49%) |
net.html |
211.82 KB | 216.24 KB | +4.43 KB (+2.09%) |
deprecations.html |
258.96 KB | 263.26 KB | +4.29 KB (+1.66%) |
webstreams.html |
266.20 KB | 270.42 KB | +4.21 KB (+1.58%) |
perf_hooks.html |
345.33 KB | 349.49 KB | +4.16 KB (+1.20%) |
tls.html |
259.31 KB | 263.44 KB | +4.14 KB (+1.60%) |
readline.html |
200.67 KB | 204.62 KB | +3.95 KB (+1.97%) |
esm.html |
122.59 KB | 126.35 KB | +3.76 KB (+3.07%) |
zlib.html |
272.53 KB | 276.26 KB | +3.72 KB (+1.37%) |
events.html |
541.57 KB | 545.20 KB | +3.63 KB (+0.67%) |
module.html |
314.39 KB | 317.98 KB | +3.59 KB (+1.14%) |
url.html |
318.30 KB | 321.86 KB | +3.56 KB (+1.12%) |
vm.html |
420.10 KB | 423.52 KB | +3.42 KB (+0.81%) |
worker_threads.html |
382.93 KB | 386.29 KB | +3.36 KB (+0.88%) |
child_process.html |
438.97 KB | 442.26 KB | +3.29 KB (+0.75%) |
v8.html |
309.14 KB | 312.33 KB | +3.19 KB (+1.03%) |
diagnostics_channel.html |
223.19 KB | 226.26 KB | +3.08 KB (+1.38%) |
globals.html |
120.14 KB | 123.14 KB | +3.00 KB (+2.50%) |
assert.html |
464.27 KB | 466.93 KB | +2.66 KB (+0.57%) |
inspector.html |
110.75 KB | 113.27 KB | +2.53 KB (+2.28%) |
dgram.html |
153.12 KB | 155.64 KB | +2.52 KB (+1.64%) |
modules.html |
148.53 KB | 151.05 KB | +2.52 KB (+1.70%) |
packages.html |
118.87 KB | 121.25 KB | +2.38 KB (+2.00%) |
cluster.html |
195.87 KB | 198.22 KB | +2.35 KB (+1.20%) |
intl.html |
40.46 KB | 42.78 KB | +2.32 KB (+5.73%) |
repl.html |
215.26 KB | 217.57 KB | +2.32 KB (+1.08%) |
single-executable-applications.html |
87.13 KB | 89.41 KB | +2.28 KB (+2.62%) |
timers.html |
87.18 KB | 89.38 KB | +2.20 KB (+2.52%) |
console.html |
95.74 KB | 97.90 KB | +2.16 KB (+2.26%) |
path.html |
93.69 KB | 95.76 KB | +2.07 KB (+2.21%) |
tty.html |
41.57 KB | 43.63 KB | +2.06 KB (+4.97%) |
https.html |
153.59 KB | 155.65 KB | +2.05 KB (+1.34%) |
async_context.html |
198.51 KB | 200.56 KB | +2.05 KB (+1.03%) |
async_hooks.html |
217.73 KB | 219.76 KB | +2.03 KB (+0.93%) |
index.html |
15.14 KB | 17.06 KB | +1.92 KB (+12.68%) |
addons.html |
336.13 KB | 338.04 KB | +1.90 KB (+0.57%) |
debugger.html |
36.24 KB | 38.11 KB | +1.87 KB (+5.15%) |
tracing.html |
87.56 KB | 89.42 KB | +1.86 KB (+2.13%) |
domain.html |
99.32 KB | 101.17 KB | +1.85 KB (+1.86%) |
permissions.html |
35.62 KB | 37.47 KB | +1.85 KB (+5.19%) |
typescript.html |
31.60 KB | 33.37 KB | +1.77 KB (+5.61%) |
report.html |
186.09 KB | 187.86 KB | +1.77 KB (+0.95%) |
wasi.html |
43.51 KB | 45.27 KB | +1.76 KB (+4.05%) |
environment_variables.html |
22.87 KB | 24.61 KB | +1.74 KB (+7.61%) |
querystring.html |
32.04 KB | 33.76 KB | +1.72 KB (+5.36%) |
punycode.html |
32.69 KB | 34.40 KB | +1.71 KB (+5.24%) |
string_decoder.html |
38.57 KB | 40.21 KB | +1.65 KB (+4.27%) |
documentation.html |
24.09 KB | 25.73 KB | +1.64 KB (+6.81%) |
embedding.html |
48.04 KB | 49.68 KB | +1.64 KB (+3.41%) |
synopsis.html |
23.89 KB | 25.47 KB | +1.58 KB (+6.63%) |
orama-db Generator
| File | Base | Head | Diff |
|---|---|---|---|
orama-db.json |
8.04 MB | 8.04 MB | +1.00 B (+0.00%) |
web Generator
| File | Base | Head | Diff |
|---|---|---|---|
deprecations.html |
510.24 KB | 494.86 KB | -15.37 KB (-3.01%) |
cli.html |
502.62 KB | 487.83 KB | -14.79 KB (-2.94%) |
quic.html |
368.40 KB | 354.04 KB | -14.36 KB (-3.90%) |
fs.html |
1.29 MB | 1.28 MB | -12.49 KB (-0.94%) |
n-api.html |
814.52 KB | 803.75 KB | -10.77 KB (-1.32%) |
errors.html |
465.94 KB | 456.15 KB | -9.80 KB (-2.10%) |
http.html |
712.74 KB | 703.15 KB | -9.59 KB (-1.35%) |
http2.html |
742.13 KB | 732.84 KB | -9.29 KB (-1.25%) |
webcrypto.html |
528.45 KB | 520.65 KB | -7.80 KB (-1.48%) |
globals.html |
233.02 KB | 225.83 KB | -7.18 KB (-3.08%) |
webstreams.html |
343.91 KB | 336.94 KB | -6.97 KB (-2.03%) |
process.html |
656.32 KB | 649.44 KB | -6.88 KB (-1.05%) |
net.html |
357.47 KB | 351.01 KB | -6.46 KB (-1.81%) |
perf_hooks.html |
373.03 KB | 367.03 KB | -6.00 KB (-1.61%) |
crypto.html |
987.57 KB | 982.98 KB | -4.59 KB (-0.46%) |
tls.html |
353.23 KB | 348.71 KB | -4.53 KB (-1.28%) |
addons.html |
259.25 KB | 263.10 KB | +3.85 KB (+1.48%) |
worker_threads.html |
355.64 KB | 351.88 KB | -3.77 KB (-1.06%) |
buffer.html |
855.53 KB | 851.96 KB | -3.56 KB (-0.42%) |
os.html |
132.04 KB | 135.53 KB | +3.49 KB (+2.64%) |
zlib.html |
279.95 KB | 276.71 KB | -3.25 KB (-1.16%) |
dns.html |
285.63 KB | 282.65 KB | -2.97 KB (-1.04%) |
util.html |
655.26 KB | 652.36 KB | -2.90 KB (-0.44%) |
events.html |
438.30 KB | 435.47 KB | -2.83 KB (-0.65%) |
inspector.html |
167.79 KB | 165.17 KB | -2.62 KB (-1.56%) |
dgram.html |
186.67 KB | 184.06 KB | -2.61 KB (-1.40%) |
timers.html |
127.13 KB | 124.83 KB | -2.30 KB (-1.81%) |
modules.html |
177.98 KB | 175.76 KB | -2.22 KB (-1.25%) |
cluster.html |
192.01 KB | 189.81 KB | -2.20 KB (-1.14%) |
readline.html |
240.92 KB | 238.78 KB | -2.13 KB (-0.89%) |
console.html |
141.77 KB | 139.67 KB | -2.10 KB (-1.48%) |
tty.html |
90.61 KB | 88.54 KB | -2.07 KB (-2.29%) |
sqlite.html |
248.35 KB | 246.30 KB | -2.05 KB (-0.83%) |
packages.html |
155.47 KB | 153.48 KB | -1.99 KB (-1.28%) |
path.html |
134.30 KB | 132.35 KB | -1.94 KB (-1.45%) |
diagnostics_channel.html |
221.34 KB | 219.48 KB | -1.86 KB (-0.84%) |
v8.html |
305.93 KB | 304.11 KB | -1.83 KB (-0.60%) |
stream.html |
820.34 KB | 818.66 KB | -1.68 KB (-0.21%) |
punycode.html |
62.82 KB | 61.38 KB | -1.45 KB (-2.30%) |
wasi.html |
67.97 KB | 66.58 KB | -1.39 KB (-2.04%) |
module.html |
306.17 KB | 304.86 KB | -1.31 KB (-0.43%) |
url.html |
333.93 KB | 332.62 KB | -1.31 KB (-0.39%) |
vm.html |
350.32 KB | 349.02 KB | -1.30 KB (-0.37%) |
querystring.html |
62.28 KB | 61.00 KB | -1.28 KB (-2.06%) |
https.html |
145.76 KB | 144.54 KB | -1.22 KB (-0.84%) |
report.html |
173.68 KB | 174.88 KB | +1.19 KB (+0.69%) |
environment_variables.html |
44.02 KB | 43.01 KB | -1.01 KB (-2.29%) |
tracing.html |
83.44 KB | 82.47 KB | -993.00 B (-1.16%) |
single-executable-applications.html |
105.00 KB | 104.04 KB | -985.00 B (-0.92%) |
string_decoder.html |
54.29 KB | 53.33 KB | -977.00 B (-1.76%) |
documentation.html |
38.07 KB | 37.14 KB | -948.00 B (-2.43%) |
typescript.html |
53.42 KB | 52.50 KB | -934.00 B (-1.71%) |
synopsis.html |
42.57 KB | 41.73 KB | -856.00 B (-1.96%) |
repl.html |
176.85 KB | 176.02 KB | -852.00 B (-0.47%) |
child_process.html |
363.11 KB | 362.31 KB | -818.00 B (-0.22%) |
permissions.html |
54.77 KB | 54.07 KB | -715.00 B (-1.27%) |
test.html |
699.51 KB | 698.83 KB | -702.00 B (-0.10%) |
async_context.html |
158.79 KB | 158.17 KB | -641.00 B (-0.39%) |
debugger.html |
54.07 KB | 53.60 KB | -485.00 B (-0.88%) |
index.html |
35.67 KB | 35.20 KB | -475.00 B (-1.30%) |
esm.html |
152.69 KB | 152.24 KB | -467.00 B (-0.30%) |
intl.html |
57.62 KB | 57.18 KB | -455.00 B (-0.77%) |
assert.html |
321.30 KB | 321.72 KB | +426.00 B (+0.13%) |
async_hooks.html |
155.61 KB | 155.24 KB | -381.00 B (-0.24%) |
embedding.html |
58.88 KB | 58.51 KB | -373.00 B (-0.62%) |
domain.html |
102.11 KB | 102.22 KB | +117.00 B (+0.11%) |
| const textDecoder = new TextDecoder(); | ||
| // See https://github.com/swc-project/swc/issues/11599 for why we need to load | ||
| // the WASM file in this way | ||
| await initSync( |
There was a problem hiding this comment.
Let's lock this PR till upstream gets fixed
There was a problem hiding this comment.
Pull request overview
This PR replaces the existing HTML minification implementation with @swc/html-wasm as an alternative to @minify-html/wasm, updating downstream generators accordingly.
Changes:
- Switch HTML minification utility from
@minify-html/wasmto@swc/html-wasmand initialize the SWC WASM runtime. - Adjust web + legacy HTML generators to use the new
minifyHTML()return value directly (string). - Update dependency manifests and Dependabot patterns for the new package.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils/html-minifier.mjs |
Re-implements minifyHTML() using SWC’s HTML WASM minifier and adds WASM initialization. |
src/generators/web/utils/processing.mjs |
Uses minifyHTML() output directly when producing per-page HTML results. |
src/generators/legacy-html/generate.mjs |
Writes minified HTML as a string (removes Buffer.from(...)). |
src/generators/legacy-html-all/generate.mjs |
Writes minified HTML as a string (removes Buffer.from(...)). |
package.json |
Replaces @minify-html/wasm dependency with @swc/html-wasm. |
npm-shrinkwrap.json |
Locks @swc/html-wasm and removes @minify-html/wasm (plus related lockfile churn). |
.github/dependabot.yml |
Updates Dependabot dependency group pattern for the new minifier package. |
Files not reviewed (1)
- npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // See https://github.com/swc-project/swc/issues/11599 for why we need to load | ||
| // the WASM file in this way | ||
| await initSync( | ||
| readFile(new URL(import.meta.resolve('@swc/html-wasm/wasm_bg.wasm'))) | ||
| ); |
There was a problem hiding this comment.
This module performs filesystem I/O and WASM initialization at import time via top-level await initSync(...). Since minifyHTML is imported unconditionally in generators even when config.minify is false, this can add startup latency and introduce failure modes in code paths that never actually minify. Consider lazy-initializing on the first minifyHTML() call (cache an init promise/flag) so the cost is only paid when minification is enabled.
Alternative to minify-html