html-minifier-next 4.19.0 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -2
- package/README.md +15 -27
- package/cli.js +2 -4
- package/dist/htmlminifier.cjs +3 -4
- package/dist/htmlminifier.esm.bundle.js +217 -39
- package/dist/types/htmlminifier.d.ts +2 -2
- package/dist/types/htmlminifier.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/htmlminifier.js +3 -4
|
@@ -43,7 +43,7 @@ export type MinifierOptions = {
|
|
|
43
43
|
* - Cache size is locked after first call—subsequent calls reuse the same cache
|
|
44
44
|
* - Explicit `0` values are coerced to `1` (minimum functional cache size)
|
|
45
45
|
*
|
|
46
|
-
* Default: `500`
|
|
46
|
+
* Default: `500`
|
|
47
47
|
*/
|
|
48
48
|
cacheCSS?: number;
|
|
49
49
|
/**
|
|
@@ -53,7 +53,7 @@ export type MinifierOptions = {
|
|
|
53
53
|
* - Cache size is locked after first call—subsequent calls reuse the same cache
|
|
54
54
|
* - Explicit `0` values are coerced to `1` (minimum functional cache size)
|
|
55
55
|
*
|
|
56
|
-
* Default: `500`
|
|
56
|
+
* Default: `500`
|
|
57
57
|
*/
|
|
58
58
|
cacheJS?: number;
|
|
59
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmlminifier.d.ts","sourceRoot":"","sources":["../../src/htmlminifier.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"htmlminifier.d.ts","sourceRoot":"","sources":["../../src/htmlminifier.js"],"names":[],"mappings":"AAmiDO,8BAJI,MAAM,YACN,eAAe,GACb,OAAO,CAAC,MAAM,CAAC,CAuB3B;;;;;;;;;;;;UAz1CS,MAAM;YACN,MAAM;YACN,MAAM;mBACN,MAAM;iBACN,MAAM;kBACN,MAAM;;;;;;;;;;;;;4BAQN,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE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lnBkC,cAAc;0BAAd,cAAc;+BAAd,cAAc"}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"entities": "^7.0.0",
|
|
12
12
|
"lightningcss": "^1.28.2",
|
|
13
13
|
"relateurl": "^0.2.7",
|
|
14
|
-
"terser": "^5.
|
|
14
|
+
"terser": "^5.46.0"
|
|
15
15
|
},
|
|
16
16
|
"description": "Super-configurable, well-tested, JavaScript-based HTML minifier (enhanced successor of HTML Minifier)",
|
|
17
17
|
"devDependencies": {
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
},
|
|
99
99
|
"type": "module",
|
|
100
100
|
"types": "./dist/types/htmlminifier.d.ts",
|
|
101
|
-
"version": "4.19.
|
|
101
|
+
"version": "4.19.1"
|
|
102
102
|
}
|
package/src/htmlminifier.js
CHANGED
|
@@ -253,7 +253,7 @@ function mergeConsecutiveScripts(html) {
|
|
|
253
253
|
* - Cache size is locked after first call—subsequent calls reuse the same cache
|
|
254
254
|
* - Explicit `0` values are coerced to `1` (minimum functional cache size)
|
|
255
255
|
*
|
|
256
|
-
* Default: `500`
|
|
256
|
+
* Default: `500`
|
|
257
257
|
*
|
|
258
258
|
* @prop {number} [cacheJS]
|
|
259
259
|
* The maximum number of entries for the JavaScript minification cache. Higher
|
|
@@ -262,7 +262,7 @@ function mergeConsecutiveScripts(html) {
|
|
|
262
262
|
* - Cache size is locked after first call—subsequent calls reuse the same cache
|
|
263
263
|
* - Explicit `0` values are coerced to `1` (minimum functional cache size)
|
|
264
264
|
*
|
|
265
|
-
* Default: `500`
|
|
265
|
+
* Default: `500`
|
|
266
266
|
*
|
|
267
267
|
* @prop {boolean} [caseSensitive]
|
|
268
268
|
* When true, tag and attribute names are treated as case-sensitive.
|
|
@@ -1535,8 +1535,7 @@ function joinResultSegments(results, options, restoreCustom, restoreIgnore) {
|
|
|
1535
1535
|
function initCaches(options) {
|
|
1536
1536
|
// Only create caches once (on first call)—sizes are locked after this
|
|
1537
1537
|
if (!cssMinifyCache) {
|
|
1538
|
-
|
|
1539
|
-
const defaultSize = process.env.CI === 'true' ? 1000 : 500;
|
|
1538
|
+
const defaultSize = 500;
|
|
1540
1539
|
|
|
1541
1540
|
// Helper to parse env var—returns parsed number (including 0) or undefined if absent, invalid, or negative
|
|
1542
1541
|
const parseEnvCacheSize = (envVar) => {
|