meta: switch to minify-html; fixed test glob on package.json; removed console.log#602
meta: switch to minify-html; fixed test glob on package.json; removed console.log#602
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
cc @nodejs/web-infra if we could fast-track this to unblock nodejs/node that'd be great! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #602 +/- ##
==========================================
- Coverage 78.68% 78.66% -0.03%
==========================================
Files 127 128 +1
Lines 12435 12456 +21
Branches 882 883 +1
==========================================
+ Hits 9785 9798 +13
- Misses 2645 2653 +8
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
webcrypto.html |
334.63 KB | 320.48 KB | -14.15 KB (-4.23%) |
fs.html |
927.66 KB | 913.83 KB | -13.83 KB (-1.49%) |
crypto.html |
1007.81 KB | 997.50 KB | -10.31 KB (-1.02%) |
n-api.html |
767.40 KB | 758.34 KB | -9.07 KB (-1.18%) |
os.html |
83.60 KB | 75.40 KB | -8.20 KB (-9.80%) |
errors.html |
349.54 KB | 341.45 KB | -8.09 KB (-2.32%) |
http2.html |
743.37 KB | 736.72 KB | -6.65 KB (-0.89%) |
http.html |
597.92 KB | 591.73 KB | -6.19 KB (-1.04%) |
cli.html |
287.69 KB | 281.51 KB | -6.18 KB (-2.15%) |
util.html |
714.55 KB | 708.69 KB | -5.86 KB (-0.82%) |
test.html |
801.86 KB | 796.42 KB | -5.45 KB (-0.68%) |
quic.html |
142.57 KB | 137.33 KB | -5.24 KB (-3.68%) |
stream.html |
808.70 KB | 803.49 KB | -5.21 KB (-0.64%) |
dns.html |
215.95 KB | 210.79 KB | -5.15 KB (-2.39%) |
buffer.html |
1.07 MB | 1.06 MB | -5.00 KB (-0.46%) |
process.html |
682.75 KB | 677.97 KB | -4.78 KB (-0.70%) |
sqlite.html |
189.60 KB | 184.93 KB | -4.67 KB (-2.46%) |
net.html |
216.24 KB | 211.82 KB | -4.43 KB (-2.05%) |
deprecations.html |
263.15 KB | 258.86 KB | -4.29 KB (-1.63%) |
webstreams.html |
270.41 KB | 266.19 KB | -4.21 KB (-1.56%) |
perf_hooks.html |
349.49 KB | 345.33 KB | -4.16 KB (-1.19%) |
tls.html |
263.44 KB | 259.31 KB | -4.14 KB (-1.57%) |
readline.html |
204.62 KB | 200.67 KB | -3.95 KB (-1.93%) |
esm.html |
126.35 KB | 122.59 KB | -3.76 KB (-2.98%) |
zlib.html |
276.26 KB | 272.53 KB | -3.72 KB (-1.35%) |
events.html |
546.23 KB | 542.59 KB | -3.63 KB (-0.67%) |
module.html |
326.54 KB | 322.94 KB | -3.60 KB (-1.10%) |
url.html |
321.86 KB | 318.30 KB | -3.56 KB (-1.11%) |
vm.html |
334.30 KB | 330.88 KB | -3.42 KB (-1.02%) |
worker_threads.html |
386.29 KB | 382.93 KB | -3.36 KB (-0.87%) |
child_process.html |
442.26 KB | 438.97 KB | -3.29 KB (-0.74%) |
v8.html |
312.33 KB | 309.14 KB | -3.19 KB (-1.02%) |
diagnostics_channel.html |
224.98 KB | 221.94 KB | -3.05 KB (-1.35%) |
globals.html |
123.17 KB | 120.17 KB | -3.00 KB (-2.43%) |
assert.html |
466.93 KB | 464.27 KB | -2.66 KB (-0.57%) |
inspector.html |
113.27 KB | 110.75 KB | -2.53 KB (-2.23%) |
dgram.html |
155.64 KB | 153.12 KB | -2.52 KB (-1.62%) |
modules.html |
151.05 KB | 148.53 KB | -2.52 KB (-1.67%) |
packages.html |
121.24 KB | 118.86 KB | -2.38 KB (-1.96%) |
cluster.html |
198.22 KB | 195.87 KB | -2.35 KB (-1.19%) |
intl.html |
42.78 KB | 40.46 KB | -2.32 KB (-5.42%) |
repl.html |
217.57 KB | 215.26 KB | -2.32 KB (-1.07%) |
timers.html |
89.38 KB | 87.18 KB | -2.20 KB (-2.46%) |
single-executable-applications.html |
85.22 KB | 83.02 KB | -2.19 KB (-2.57%) |
console.html |
97.90 KB | 95.74 KB | -2.16 KB (-2.21%) |
path.html |
95.76 KB | 93.69 KB | -2.07 KB (-2.16%) |
tty.html |
43.63 KB | 41.57 KB | -2.06 KB (-4.73%) |
https.html |
155.65 KB | 153.59 KB | -2.05 KB (-1.32%) |
async_context.html |
200.56 KB | 198.51 KB | -2.05 KB (-1.02%) |
async_hooks.html |
219.76 KB | 217.73 KB | -2.03 KB (-0.92%) |
index.html |
17.06 KB | 15.14 KB | -1.92 KB (-11.25%) |
addons.html |
338.04 KB | 336.13 KB | -1.90 KB (-0.56%) |
debugger.html |
38.11 KB | 36.24 KB | -1.87 KB (-4.90%) |
tracing.html |
89.42 KB | 87.56 KB | -1.86 KB (-2.08%) |
domain.html |
101.17 KB | 99.32 KB | -1.85 KB (-1.83%) |
permissions.html |
37.47 KB | 35.62 KB | -1.85 KB (-4.93%) |
typescript.html |
33.90 KB | 32.13 KB | -1.78 KB (-5.24%) |
report.html |
187.86 KB | 186.09 KB | -1.77 KB (-0.94%) |
wasi.html |
45.27 KB | 43.51 KB | -1.76 KB (-3.89%) |
environment_variables.html |
24.61 KB | 22.87 KB | -1.74 KB (-7.07%) |
querystring.html |
33.76 KB | 32.04 KB | -1.72 KB (-5.09%) |
punycode.html |
34.40 KB | 32.69 KB | -1.71 KB (-4.98%) |
string_decoder.html |
40.21 KB | 38.57 KB | -1.65 KB (-4.09%) |
documentation.html |
25.74 KB | 24.09 KB | -1.64 KB (-6.37%) |
embedding.html |
49.68 KB | 48.04 KB | -1.64 KB (-3.30%) |
synopsis.html |
25.47 KB | 23.89 KB | -1.58 KB (-6.22%) |
orama-db Generator
| File | Base | Head | Diff |
|---|---|---|---|
orama-db.json |
8.03 MB | 8.03 MB | -1.78 KB (-0.02%) |
web Generator
| File | Base | Head | Diff |
|---|---|---|---|
deprecations.html |
494.54 KB | 509.91 KB | +15.37 KB (+3.11%) |
cli.html |
488.14 KB | 502.93 KB | +14.79 KB (+3.03%) |
quic.html |
354.04 KB | 368.40 KB | +14.36 KB (+4.06%) |
fs.html |
1.28 MB | 1.29 MB | +12.49 KB (+0.95%) |
n-api.html |
803.75 KB | 814.52 KB | +10.77 KB (+1.34%) |
errors.html |
456.15 KB | 465.94 KB | +9.80 KB (+2.15%) |
http.html |
703.11 KB | 712.70 KB | +9.59 KB (+1.36%) |
http2.html |
731.40 KB | 740.69 KB | +9.29 KB (+1.27%) |
webcrypto.html |
520.65 KB | 528.45 KB | +7.80 KB (+1.50%) |
globals.html |
224.42 KB | 231.61 KB | +7.18 KB (+3.20%) |
webstreams.html |
336.90 KB | 343.87 KB | +6.97 KB (+2.07%) |
process.html |
649.26 KB | 656.14 KB | +6.88 KB (+1.06%) |
net.html |
351.01 KB | 357.47 KB | +6.46 KB (+1.84%) |
perf_hooks.html |
367.03 KB | 373.03 KB | +6.00 KB (+1.64%) |
crypto.html |
982.98 KB | 987.57 KB | +4.59 KB (+0.47%) |
tls.html |
348.71 KB | 353.23 KB | +4.53 KB (+1.30%) |
addons.html |
263.10 KB | 259.25 KB | -3.85 KB (-1.46%) |
worker_threads.html |
351.88 KB | 355.64 KB | +3.77 KB (+1.07%) |
buffer.html |
851.96 KB | 855.53 KB | +3.56 KB (+0.42%) |
os.html |
135.53 KB | 132.04 KB | -3.49 KB (-2.57%) |
zlib.html |
276.71 KB | 279.95 KB | +3.25 KB (+1.17%) |
dns.html |
282.65 KB | 285.63 KB | +2.97 KB (+1.05%) |
util.html |
652.39 KB | 655.29 KB | +2.90 KB (+0.44%) |
events.html |
435.91 KB | 438.72 KB | +2.81 KB (+0.65%) |
inspector.html |
165.17 KB | 167.79 KB | +2.62 KB (+1.58%) |
dgram.html |
184.06 KB | 186.67 KB | +2.61 KB (+1.42%) |
timers.html |
124.83 KB | 127.13 KB | +2.30 KB (+1.84%) |
modules.html |
175.76 KB | 177.98 KB | +2.22 KB (+1.26%) |
cluster.html |
189.81 KB | 192.01 KB | +2.20 KB (+1.16%) |
readline.html |
238.78 KB | 240.92 KB | +2.13 KB (+0.89%) |
console.html |
139.67 KB | 141.77 KB | +2.10 KB (+1.50%) |
tty.html |
88.54 KB | 90.61 KB | +2.07 KB (+2.34%) |
packages.html |
153.46 KB | 155.45 KB | +1.99 KB (+1.30%) |
sqlite.html |
238.12 KB | 240.10 KB | +1.98 KB (+0.83%) |
path.html |
132.35 KB | 134.30 KB | +1.94 KB (+1.47%) |
diagnostics_channel.html |
217.61 KB | 219.47 KB | +1.86 KB (+0.86%) |
v8.html |
304.11 KB | 305.93 KB | +1.83 KB (+0.60%) |
stream.html |
818.62 KB | 820.30 KB | +1.68 KB (+0.21%) |
punycode.html |
61.38 KB | 62.82 KB | +1.45 KB (+2.36%) |
wasi.html |
66.58 KB | 67.97 KB | +1.39 KB (+2.09%) |
vm.html |
330.00 KB | 331.32 KB | +1.31 KB (+0.40%) |
url.html |
332.62 KB | 333.93 KB | +1.31 KB (+0.39%) |
module.html |
309.61 KB | 310.90 KB | +1.29 KB (+0.42%) |
querystring.html |
61.00 KB | 62.28 KB | +1.28 KB (+2.10%) |
https.html |
144.54 KB | 145.76 KB | +1.22 KB (+0.85%) |
report.html |
174.88 KB | 173.68 KB | -1.19 KB (-0.68%) |
single-executable-applications.html |
100.23 KB | 101.24 KB | +1.01 KB (+1.01%) |
environment_variables.html |
43.01 KB | 44.02 KB | +1.01 KB (+2.34%) |
tracing.html |
82.47 KB | 83.44 KB | +993.00 B (+1.18%) |
string_decoder.html |
53.33 KB | 54.29 KB | +977.00 B (+1.79%) |
documentation.html |
37.14 KB | 38.07 KB | +948.00 B (+2.49%) |
typescript.html |
52.83 KB | 53.74 KB | +928.00 B (+1.72%) |
synopsis.html |
41.73 KB | 42.57 KB | +856.00 B (+2.00%) |
repl.html |
176.02 KB | 176.85 KB | +852.00 B (+0.47%) |
child_process.html |
362.31 KB | 363.11 KB | +818.00 B (+0.22%) |
test.html |
683.39 KB | 684.13 KB | +754.00 B (+0.11%) |
permissions.html |
54.07 KB | 54.77 KB | +715.00 B (+1.29%) |
async_context.html |
158.17 KB | 158.79 KB | +641.00 B (+0.40%) |
debugger.html |
53.60 KB | 54.07 KB | +485.00 B (+0.88%) |
index.html |
35.20 KB | 35.67 KB | +475.00 B (+1.32%) |
esm.html |
152.24 KB | 152.69 KB | +467.00 B (+0.30%) |
intl.html |
57.18 KB | 57.62 KB | +455.00 B (+0.78%) |
assert.html |
321.72 KB | 321.30 KB | -426.00 B (-0.13%) |
async_hooks.html |
155.24 KB | 155.61 KB | +381.00 B (+0.24%) |
embedding.html |
58.51 KB | 58.88 KB | +373.00 B (+0.62%) |
domain.html |
102.22 KB | 102.11 KB | -117.00 B (-0.11%) |
styles.css |
128.21 KB | 128.14 KB | -67.00 B (-0.05%) |
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s HTML minification approach to improve platform support, tightens Node test discovery to avoid picking up built artifacts (e.g., out/), and removes debugging logs from tests.
Changes:
- Replace
@swc/htmlusage with@minify-html/nodein HTML generation/minification paths. - Restrict Node’s test runner to
src/**/*.test.mjsand adjust coverage/CI scripts accordingly. - Remove
console.logstatements from test suites.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/queries/tests/index.test.mjs | Removes a stray console.log from query tests. |
| src/utils/configuration/tests/index.test.mjs | Removes a stray console.log from configuration tests. |
| src/generators/web/utils/processing.mjs | Switches HTML minification implementation for the web generator. |
| src/generators/legacy-html/index.mjs | Switches HTML minification implementation for the legacy HTML generator. |
| src/generators/legacy-html-all/index.mjs | Switches HTML minification implementation for the combined legacy HTML output. |
| package.json | Updates test scripts to target src/**/*.test.mjs and swaps dependencies. |
| npm-shrinkwrap.json | Locks @minify-html/node and removes @swc/html and related packages. |
| .github/dependabot.yml | Updates Dependabot pattern from @swc/html to @minify-html/node. |
Files not reviewed (1)
- npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
To be fair in this case was a glib native binding, not missing a prebuilt swc. Im also fine for yet another alternative tho. Just worrying about performance. |
|
We could do a fallback, ie try a binding and if not don't minify? |
This PR moves from @swc/html as not being supported on all platforms we need; It also fixes the glob pattern for test scripts, if you had out/ folder tests would fail lol; and removes some console.logs() from tests.