html-minifier-next 4.0.2 → 4.1.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.
@@ -0,0 +1,382 @@
1
+ export function minify(value: string, options?: MinifierOptions): Promise<string>;
2
+ declare namespace _default {
3
+ export { minify };
4
+ }
5
+ export default _default;
6
+ /**
7
+ * Representation of an attribute from the HTML parser.
8
+ */
9
+ export type HTMLAttribute = {
10
+ name: string;
11
+ value?: string;
12
+ quote?: string;
13
+ customAssign?: string;
14
+ customOpen?: string;
15
+ customClose?: string;
16
+ };
17
+ /**
18
+ * Options that control how HTML is minified. All of these are optional
19
+ * and usually default to a disabled/safe value unless noted.
20
+ */
21
+ export type MinifierOptions = {
22
+ /**
23
+ * Predicate that determines whether whitespace inside a given element
24
+ * can be collapsed.
25
+ *
26
+ * Default: Built-in `canCollapseWhitespace` function
27
+ */
28
+ canCollapseWhitespace?: (tag: string, attrs: HTMLAttribute[], canCollapseWhitespace: (tag: string) => boolean) => boolean;
29
+ /**
30
+ * Predicate that determines whether leading/trailing whitespace around
31
+ * the element may be trimmed.
32
+ *
33
+ * Default: Built-in `canTrimWhitespace` function
34
+ */
35
+ canTrimWhitespace?: (tag: string | null, attrs: HTMLAttribute[] | undefined, canTrimWhitespace: (tag: string) => boolean) => boolean;
36
+ /**
37
+ * When true, tag and attribute names are treated as case-sensitive.
38
+ * Useful for custom HTML tags.
39
+ * If false (default) names are lower-cased via the `name` function.
40
+ *
41
+ * Default: `false`
42
+ */
43
+ caseSensitive?: boolean;
44
+ /**
45
+ * Collapse boolean attributes to their name only (for example
46
+ * `disabled="disabled"` -> `disabled`).
47
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#collapse_boolean_attributes
48
+ *
49
+ * Default: `false`
50
+ */
51
+ collapseBooleanAttributes?: boolean;
52
+ /**
53
+ * When false (default) whitespace around `inline` tags is preserved in
54
+ * more cases. When true, whitespace around inline tags may be collapsed.
55
+ * Must also enable `collapseWhitespace` to have effect.
56
+ *
57
+ * Default: `false`
58
+ */
59
+ collapseInlineTagWhitespace?: boolean;
60
+ /**
61
+ * Collapse multiple whitespace characters into one where allowed. Also
62
+ * controls trimming behaviour in several code paths.
63
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#collapse_whitespace
64
+ *
65
+ * Default: `false`
66
+ */
67
+ collapseWhitespace?: boolean;
68
+ /**
69
+ * If true, be conservative when collapsing whitespace (preserve more
70
+ * whitespace in edge cases). Affects collapse algorithms.
71
+ * Must also enable `collapseWhitespace` to have effect.
72
+ *
73
+ * Default: `false`
74
+ */
75
+ conservativeCollapse?: boolean;
76
+ /**
77
+ * When true, the parser will attempt to continue on recoverable parse
78
+ * errors. Otherwise, parsing errors may throw.
79
+ *
80
+ * Default: `false`
81
+ */
82
+ continueOnParseError?: boolean;
83
+ /**
84
+ * Array of regexes used to recognise custom attribute assignment
85
+ * operators (e.g. `'<div flex?="{{mode != cover}}"></div>'`).
86
+ * These are concatenated with the built-in assignment patterns.
87
+ *
88
+ * Default: `[]`
89
+ */
90
+ customAttrAssign?: RegExp[];
91
+ /**
92
+ * Regex matching attribute names whose values should be collapsed.
93
+ * Basically used to remove newlines and excess spaces inside attribute values,
94
+ * e.g. `/ng-class/`.
95
+ */
96
+ customAttrCollapse?: RegExp;
97
+ /**
98
+ * Array of `[openRegExp, closeRegExp]` pairs used by the parser to
99
+ * detect custom attribute surround patterns (for non-standard syntaxes,
100
+ * e.g. `<input {{#if value}}checked="checked"{{/if}}>`).
101
+ */
102
+ customAttrSurround?: [RegExp, RegExp][];
103
+ /**
104
+ * Array of regexes used to detect event handler attributes for `minifyJS`
105
+ * (e.g. `ng-click`). The default matches standard `on…` event attributes.
106
+ *
107
+ * Default: `[/^on[a-z]{3,}$/]`
108
+ */
109
+ customEventAttributes?: RegExp[];
110
+ /**
111
+ * Limits the quantifier used when building a safe regex for custom
112
+ * fragments to avoid ReDoS. See source use for details.
113
+ *
114
+ * Default: `200`
115
+ */
116
+ customFragmentQuantifierLimit?: number;
117
+ /**
118
+ * When true, decodes HTML entities in text and attributes before
119
+ * processing, and re-encodes ambiguous ampersands when outputting.
120
+ *
121
+ * Default: `false`
122
+ */
123
+ decodeEntities?: boolean;
124
+ /**
125
+ * Parse and emit using HTML5 rules. Set to `false` to use non-HTML5
126
+ * parsing behavior.
127
+ *
128
+ * Default: `true`
129
+ */
130
+ html5?: boolean;
131
+ /**
132
+ * Comments matching any pattern in this array of regexes will be
133
+ * preserved when `removeComments` is enabled. The default preserves
134
+ * “bang” comments and comments starting with `#`.
135
+ *
136
+ * Default: `[/^!/, /^\s*#/]`
137
+ */
138
+ ignoreCustomComments?: RegExp[];
139
+ /**
140
+ * Array of regexes used to identify fragments that should be
141
+ * preserved (for example server templates). These fragments are temporarily
142
+ * replaced during minification to avoid corrupting template code.
143
+ * The default preserves ASP/PHP-style tags.
144
+ *
145
+ * Default: `[/<%[\s\S]*?%>/, /<\?[\s\S]*?\?>/]`
146
+ */
147
+ ignoreCustomFragments?: RegExp[];
148
+ /**
149
+ * If false, tags marked as auto-generated by the parser will be omitted
150
+ * from output. Useful to skip injected tags.
151
+ *
152
+ * Default: `true`
153
+ */
154
+ includeAutoGeneratedTags?: boolean;
155
+ /**
156
+ * Collection of custom element tag names that should be treated as inline
157
+ * elements for white-space handling, alongside the built-in inline elements.
158
+ *
159
+ * Default: `[]`
160
+ */
161
+ inlineCustomElements?: ArrayLike<string>;
162
+ /**
163
+ * Preserve the trailing slash in self-closing tags when present.
164
+ *
165
+ * Default: `false`
166
+ */
167
+ keepClosingSlash?: boolean;
168
+ /**
169
+ * Logging function used by the minifier for warnings/errors/info.
170
+ * You can directly provide `console.log`, but `message` may also be an `Error`
171
+ * object or other non-string value.
172
+ *
173
+ * Default: `() => {}` (no-op function)
174
+ */
175
+ log?: (message: unknown) => void;
176
+ /**
177
+ * The maximum allowed input length. Used as a guard against ReDoS via
178
+ * pathological inputs. If the input exceeds this length an error is
179
+ * thrown.
180
+ *
181
+ * Default: No limit
182
+ */
183
+ maxInputLength?: number;
184
+ /**
185
+ * Maximum line length for the output. When set the minifier will wrap
186
+ * output to the given number of characters where possible.
187
+ *
188
+ * Default: No limit
189
+ */
190
+ maxLineLength?: number;
191
+ /**
192
+ * When true, enables CSS minification for inline `<style>` tags or
193
+ * `style` attributes. If an object is provided, it is passed to
194
+ * [Lightning CSS](https://www.npmjs.com/package/lightningcss)
195
+ * as transform options. If a function is provided, it will be used to perform
196
+ * custom CSS minification. If disabled, CSS is not minified.
197
+ *
198
+ * Default: `false`
199
+ */
200
+ minifyCSS?: boolean | Partial<import("lightningcss").TransformOptions<import("lightningcss").CustomAtRules>> | ((text: string, type?: string) => Promise<string> | string);
201
+ /**
202
+ * When true, enables JS minification for `<script>` contents and
203
+ * event handler attributes. If an object is provided, it is passed to
204
+ * [terser](https://www.npmjs.com/package/terser) as minify options.
205
+ * If a function is provided, it will be used to perform
206
+ * custom JS minification. If disabled, JS is not minified.
207
+ *
208
+ * Default: `false`
209
+ */
210
+ minifyJS?: boolean | import("terser").MinifyOptions | ((text: string, inline?: boolean) => Promise<string> | string);
211
+ /**
212
+ * When true, enables URL rewriting/minification. If an object is provided,
213
+ * it is passed to [relateurl](https://www.npmjs.com/package/relateurl)
214
+ * as options. If a string is provided, it is treated as an `{ site: string }`
215
+ * options object. If a function is provided, it will be used to perform
216
+ * custom URL minification. If disabled, URLs are not minified.
217
+ *
218
+ * Default: `false`
219
+ */
220
+ minifyURLs?: boolean | string | import("relateurl").Options | ((text: string) => Promise<string> | string);
221
+ /**
222
+ * Function used to normalise tag/attribute names. By default, this lowercases
223
+ * names, unless `caseSensitive` is enabled.
224
+ *
225
+ * Default: `(name) => name.toLowerCase()`,
226
+ * or `(name) => name` (no-op function) if `caseSensitive` is enabled.
227
+ */
228
+ name?: (name: string) => string;
229
+ /**
230
+ * When wrapping lines, prevent inserting a newline directly before a
231
+ * closing tag (useful to keep tags like `</a>` on the same line).
232
+ *
233
+ * Default: `false`
234
+ */
235
+ noNewlinesBeforeTagClose?: boolean;
236
+ /**
237
+ * Preserve a single line break at the start/end of text nodes when
238
+ * collapsing/trimming whitespace.
239
+ * Must also enable `collapseWhitespace` to have effect.
240
+ *
241
+ * Default: `false`
242
+ */
243
+ preserveLineBreaks?: boolean;
244
+ /**
245
+ * When true, attribute values will not be HTML-escaped (dangerous for
246
+ * untrusted input). By default, attributes are escaped.
247
+ *
248
+ * Default: `false`
249
+ */
250
+ preventAttributesEscaping?: boolean;
251
+ /**
252
+ * When true, conditional comments (for example `<!--[if IE]> … <![endif]-->`)
253
+ * will have their inner content processed by the minifier.
254
+ * Useful to minify HTML that appears inside conditional comments.
255
+ *
256
+ * Default: `false`
257
+ */
258
+ processConditionalComments?: boolean;
259
+ /**
260
+ * Array of `type` attribute values for `<script>` elements whose contents
261
+ * should be processed as HTML
262
+ * (e.g. `text/ng-template`, `text/x-handlebars-template`, etc.).
263
+ * When present, the contents of matching script tags are recursively minified,
264
+ * like normal HTML content.
265
+ *
266
+ * Default: `[]`
267
+ */
268
+ processScripts?: string[];
269
+ /**
270
+ * Preferred quote character for attribute values. If unspecified the
271
+ * minifier picks the safest quote based on the attribute value.
272
+ *
273
+ * Default: Auto-detected
274
+ */
275
+ quoteCharacter?: "\"" | "'";
276
+ /**
277
+ * Remove quotes around attribute values where it is safe to do so.
278
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_attribute_quotes
279
+ *
280
+ * Default: `false`
281
+ */
282
+ removeAttributeQuotes?: boolean;
283
+ /**
284
+ * Remove HTML comments. Comments that match `ignoreCustomComments` will
285
+ * still be preserved.
286
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_comments
287
+ *
288
+ * Default: `false`
289
+ */
290
+ removeComments?: boolean;
291
+ /**
292
+ * If true, removes attributes whose values are empty (some attributes
293
+ * are excluded by name). Can also be a function to customise which empty
294
+ * attributes are removed.
295
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_empty_or_blank_attributes
296
+ *
297
+ * Default: `false`
298
+ */
299
+ removeEmptyAttributes?: boolean | ((attrName: string, tag: string) => boolean);
300
+ /**
301
+ * Remove elements that are empty and safe to remove (for example
302
+ * `<script />` without `src`).
303
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_empty_elements
304
+ *
305
+ * Default: `false`
306
+ */
307
+ removeEmptyElements?: boolean;
308
+ /**
309
+ * Drop optional start/end tags where the HTML specification permits it
310
+ * (for example `</li>`, optional `<html>` etc.).
311
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_optional_tags
312
+ *
313
+ * Default: `false`
314
+ */
315
+ removeOptionalTags?: boolean;
316
+ /**
317
+ * Remove attributes that are redundant because they match the element's
318
+ * default values (for example `<button type="submit">`).
319
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#remove_redundant_attributes
320
+ *
321
+ * Default: `false`
322
+ */
323
+ removeRedundantAttributes?: boolean;
324
+ /**
325
+ * Remove `type` attributes from `<script>` when they are unnecessary
326
+ * (e.g. `type="text/javascript"`).
327
+ *
328
+ * Default: `false`
329
+ */
330
+ removeScriptTypeAttributes?: boolean;
331
+ /**
332
+ * Remove `type` attributes from `<style>` and `<link>` elements when
333
+ * they are unnecessary (e.g. `type="text/css"`).
334
+ *
335
+ * Default: `false`
336
+ */
337
+ removeStyleLinkTypeAttributes?: boolean;
338
+ /**
339
+ * **Note that this will currently result in invalid HTML!**
340
+ *
341
+ * When true, extra whitespace between tag name and attributes (or before
342
+ * the closing bracket) will be removed where possible. Affects output spacing
343
+ * such as the space used in the short doctype representation.
344
+ *
345
+ * Default: `false`
346
+ */
347
+ removeTagWhitespace?: boolean;
348
+ /**
349
+ * When true, enables sorting of attributes. If a function is provided it
350
+ * will be used as a custom attribute sorter, which should mutate `attrs`
351
+ * in-place to the desired order. If disabled, the minifier will attempt to
352
+ * preserve the order from the input.
353
+ *
354
+ * Default: `false`
355
+ */
356
+ sortAttributes?: boolean | ((tag: string, attrs: HTMLAttribute[]) => void);
357
+ /**
358
+ * When true, enables sorting of class names inside `class` attributes.
359
+ * If a function is provided it will be used to transform/sort the class
360
+ * name string. If disabled, the minifier will attempt to preserve the
361
+ * class-name order from the input.
362
+ *
363
+ * Default: `false`
364
+ */
365
+ sortClassName?: boolean | ((value: string) => string);
366
+ /**
367
+ * When true, whitespace around ignored custom fragments may be trimmed
368
+ * more aggressively. This affects how preserved fragments interact with
369
+ * surrounding whitespace collapse.
370
+ *
371
+ * Default: `false`
372
+ */
373
+ trimCustomFragments?: boolean;
374
+ /**
375
+ * Replace the HTML doctype with the short `<!doctype html>` form.
376
+ * See also: https://perfectionkills.com/experimenting-with-html-minifier/#use_short_doctype
377
+ *
378
+ * Default: `false`
379
+ */
380
+ useShortDoctype?: boolean;
381
+ };
382
+ //# sourceMappingURL=htmlminifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"htmlminifier.d.ts","sourceRoot":"","sources":["../../src/htmlminifier.js"],"names":[],"mappings":"AAm7CO,8BAJI,MAAM,YACN,eAAe,GACb,OAAO,CAAC,MAAM,CAAC,CAQ3B;;;;;;;;;UAQS,MAAM;YACN,MAAM;YACN,MAAM;mBACN,MAAM;iBACN,MAAM;kBACN,MAAM;;;;;;;;;;;;;4BAQN,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,KAAK,OAAO;;;;;;;wBAMjG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,KAAK,OAAO;;;;;;;;oBAMhH,OAAO;;;;;;;;gCAOP,OAAO;;;;;;;;kCAOP,OAAO;;;;;;;;yBAOP,OAAO;;;;;;;;2BAOP,OAAO;;;;;;;2BAOP,OAAO;;;;;;;;uBAMP,MAAM,EAAE;;;;;;yBAOR,MAAM;;;;;;yBAKN,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;;;;;;;4BAKlB,MAAM,EAAE;;;;;;;oCAMR,MAAM;;;;;;;qBAMN,OAAO;;;;;;;YAMP,OAAO;;;;;;;;2BAMP,MAAM,EAAE;;;;;;;;;4BAOR,MAAM,EAAE;;;;;;;+BAQR,OAAO;;;;;;;2BAMP,SAAS,CAAC,MAAM,CAAC;;;;;;uBAMjB,OAAO;;;;;;;;UAKP,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;;;;;;;;qBAO1B,MAAM;;;;;;;oBAON,MAAM;;;;;;;;;;gBAMN,OAAO,GAAG,OAAO,CAAC,OAAO,cAAc,EAAE,gBAAgB,CAAC,OAAO,cAAc,EAAE,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;;;;;;;;;;eAS9J,OAAO,GAAG,OAAO,QAAQ,EAAE,aAAa,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;;;;;;;;;;iBASzG,OAAO,GAAG,MAAM,GAAG,OAAO,WAAW,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;;;;;;;;WAS7F,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM;;;;;;;+BAOxB,OAAO;;;;;;;;yBAMP,OAAO;;;;;;;gCAOP,OAAO;;;;;;;;iCAMP,OAAO;;;;;;;;;;qBAOP,MAAM,EAAE;;;;;;;qBASR,IAAI,GAAG,GAAG;;;;;;;4BAMV,OAAO;;;;;;;;qBAMP,OAAO;;;;;;;;;4BAOP,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;;;;;;;;0BAQtD,OAAO;;;;;;;;yBAOP,OAAO;;;;;;;;gCAOP,OAAO;;;;;;;iCAOP,OAAO;;;;;;;oCAMP,OAAO;;;;;;;;;;0BAMP,OAAO;;;;;;;;;qBASP,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;;;;;;;;;oBAQzD,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;;;;;;;;0BAQrC,OAAO;;;;;;;sBAOP,OAAO"}
@@ -0,0 +1,8 @@
1
+ export const endTag: RegExp;
2
+ export class HTMLParser {
3
+ constructor(html: any, handler: any);
4
+ html: any;
5
+ handler: any;
6
+ parse(): Promise<void>;
7
+ }
8
+ //# sourceMappingURL=htmlparser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"htmlparser.d.ts","sourceRoot":"","sources":["../../src/htmlparser.js"],"names":[],"mappings":"AAgDA,4BAAoE;AAyDpE;IACE,qCAGC;IAFC,UAAgB;IAChB,aAAsB;IAGxB,uBA2VC;CACF"}
@@ -0,0 +1,9 @@
1
+ export default TokenChain;
2
+ declare class TokenChain {
3
+ add(tokens: any): void;
4
+ createSorter(): Sorter;
5
+ }
6
+ declare class Sorter {
7
+ sort(tokens: any, fromIndex?: number): any;
8
+ }
9
+ //# sourceMappingURL=tokenchain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenchain.d.ts","sourceRoot":"","sources":["../../src/tokenchain.js"],"names":[],"mappings":";AAwBA;IACE,uBASC;IAED,uBA4BC;CACF;AAjED;IACE,2CAoBC;CACF"}
@@ -0,0 +1,2 @@
1
+ export function replaceAsync(str: any, regex: any, asyncFn: any): Promise<any>;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.js"],"names":[],"mappings":"AAAA,+EAUC"}
package/package.json CHANGED
@@ -5,6 +5,7 @@
5
5
  },
6
6
  "bugs": "https://github.com/j9t/html-minifier-next/issues",
7
7
  "dependencies": {
8
+ "@types/relateurl": "^0.2.33",
8
9
  "change-case": "^4.1.2",
9
10
  "commander": "^14.0.2",
10
11
  "entities": "^7.0.0",
@@ -15,18 +16,20 @@
15
16
  "description": "Highly configurable, well-tested, JavaScript-based HTML minifier",
16
17
  "devDependencies": {
17
18
  "@commitlint/cli": "^20.1.0",
18
- "@eslint/js": "^9.37.0",
19
- "@rollup/plugin-commonjs": "^28.0.9",
19
+ "@eslint/js": "^9.39.1",
20
+ "@rollup/plugin-commonjs": "^29.0.0",
20
21
  "@rollup/plugin-json": "^6.1.0",
21
22
  "@rollup/plugin-node-resolve": "^16.0.3",
22
23
  "@rollup/plugin-terser": "^0.4.4",
23
- "eslint": "^9.37.0",
24
+ "eslint": "^9.39.1",
24
25
  "rollup": "^4.52.5",
25
26
  "rollup-plugin-polyfill-node": "^0.13.0",
27
+ "typescript": "^5.9.3",
26
28
  "vite": "^7.1.12"
27
29
  },
28
30
  "exports": {
29
31
  ".": {
32
+ "types": "./dist/types/htmlminifier.d.ts",
30
33
  "import": "./src/htmlminifier.js",
31
34
  "require": "./dist/htmlminifier.cjs"
32
35
  },
@@ -64,19 +67,22 @@
64
67
  "license": "MIT",
65
68
  "main": "./dist/htmlminifier.cjs",
66
69
  "module": "./src/htmlminifier.js",
70
+ "types": "./dist/types/htmlminifier.d.ts",
67
71
  "name": "html-minifier-next",
68
72
  "repository": "https://github.com/j9t/html-minifier-next.git",
69
73
  "scripts": {
70
- "build": "rollup -c",
74
+ "prebuild": "node --eval='require(`fs`).rmSync(`dist`,{recursive:true,force:true})'",
75
+ "build": "tsc && rollup -c",
71
76
  "build:docs": "vite build --base /html-minifier-next/ --outDir build",
72
77
  "deploy": "npm run build && npm run build:docs",
73
78
  "lint": "eslint .",
74
79
  "prepack": "npm run build",
75
80
  "prepare": "git config core.hooksPath .githooks || true",
76
81
  "serve": "npm run build && vite",
77
- "test": "node --test tests/*.spec.js",
82
+ "test": "npm run test:types && node --test tests/*.spec.js",
83
+ "test:types": "tsc --project tsconfig.test.json",
78
84
  "test:watch": "node --test --watch tests/*.spec.js"
79
85
  },
80
86
  "type": "module",
81
- "version": "4.0.2"
87
+ "version": "4.1.1"
82
88
  }