@node-minify/types 10.2.0 → 10.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @node-minify/types
2
2
 
3
+ ## 10.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2e64877: feat: add `allowEmptyOutput` option to skip writing empty output files
8
+
9
+ When minifiers produce empty output (e.g., CSS files with only comments), the new `allowEmptyOutput` option allows gracefully skipping the file write instead of throwing a validation error. Also adds `--allow-empty-output` CLI flag.
10
+
11
+ ## 10.3.0
12
+
3
13
  ## 10.2.0
4
14
 
5
15
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Rodolphe Stoclin
3
+ Copyright (c) 2011-2026 Rodolphe Stoclin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-minify/types",
3
- "version": "10.2.0",
3
+ "version": "10.4.0",
4
4
  "description": "types for @node-minify",
5
5
  "keywords": [
6
6
  "compressor",
package/src/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * node-minify
3
- * Copyright(c) 2011-2025 Rodolphe Stoclin
3
+ * Copyright (c) 2011-2026 Rodolphe Stoclin
4
4
  * MIT Licensed
5
5
  */
6
6
 
@@ -165,6 +165,12 @@ export type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
165
165
  */
166
166
  buffer?: number;
167
167
 
168
+ /**
169
+ * Timeout for the compressor process (in milliseconds).
170
+ * If execution exceeds this limit, the process will be killed.
171
+ */
172
+ timeout?: number;
173
+
168
174
  /**
169
175
  * File type for compressors that support multiple types.
170
176
  * Required for YUI compressor.
@@ -191,6 +197,14 @@ export type Settings<TOptions extends CompressorOptions = CompressorOptions> = {
191
197
  * @default false
192
198
  */
193
199
  replaceInPlace?: boolean;
200
+
201
+ /**
202
+ * Allow empty output without throwing an error.
203
+ * When true, if minification results in empty content, the output file will not be written.
204
+ * Useful for CSS files containing only comments that get stripped.
205
+ * @default false
206
+ */
207
+ allowEmptyOutput?: boolean;
194
208
  };
195
209
 
196
210
  /**