uglify-js-minify-css-allfiles 2.3.0 → 2.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.3.1] - 2025-02-13
9
+
10
+ ### Fixed
11
+
12
+ - Fixed `ext is not defined` error in image versioning log messages
13
+
8
14
  ## [2.3.0] - 2025-02-13
9
15
 
10
16
  ### Added
package/dist/module.js CHANGED
@@ -75,10 +75,7 @@ async function processPattern(pattern, content, fileExt, filePath, logger, hashM
75
75
 
76
76
  if (!hash) {
77
77
  newContent = newContent.replace(`${imagePath}?v=${marker}`, imagePath);
78
- await logger?.warn('Failed to generate hash, keeping original URL', {
79
- file: filePath,
80
- image: imagePath + ext,
81
- });
78
+ // 'Failed to generate hash, keeping original URL : ' + filePath;
82
79
  continue;
83
80
  }
84
81
 
@@ -86,7 +83,7 @@ async function processPattern(pattern, content, fileExt, filePath, logger, hashM
86
83
  modified = true;
87
84
  await logger?.info('Updated CSS image version', {
88
85
  file: filePath,
89
- image: imagePath + ext,
86
+ image: imagePath,
90
87
  oldHash: hashManager.getPreviousHash(absoluteImagePath),
91
88
  newHash: hash,
92
89
  });
@@ -197,7 +194,7 @@ async function processFile(filePath, logger, options) {
197
194
  }
198
195
  result = output.styles;
199
196
  } else {
200
- await logger?.info(`Unsupported file type, skipping: ${filePath}`);
197
+ // `Unsupported file type, skipping: ${filePath}`;
201
198
  return;
202
199
  }
203
200
 
@@ -88,7 +88,7 @@ export default class HashManager {
88
88
  try {
89
89
  await fs.access(filePath);
90
90
  } catch (error) {
91
- console.warn(`File not found: ${filePath}`);
91
+ // `File not found: ${filePath}`;
92
92
  return { hash: null, changed: false };
93
93
  }
94
94
 
@@ -220,3 +220,98 @@
220
220
  [02/13/2025, 11:49:34] [INFO] Updated JS image reference with hash {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"./img/samples.svg","newHash":"bd916168"}
221
221
  [02/13/2025, 11:49:34] [INFO] Updated file with versioned image references {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js"}
222
222
  [02/13/2025, 11:49:34] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
223
+ [02/13/2025, 13:04:42] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
224
+ [02/13/2025, 13:04:43] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\.image-hashes.json
225
+ [02/13/2025, 13:04:43] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\sample.jpg
226
+ [02/13/2025, 13:04:43] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\samples.svg
227
+ [02/13/2025, 13:04:43] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
228
+ [02/13/2025, 13:04:43] [ERROR] Failed to process file {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","error":"ext is not defined"}
229
+ [02/13/2025, 13:04:43] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
230
+ [02/13/2025, 13:04:43] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/samples.svg","newHash":"c5266cee"}
231
+ [02/13/2025, 13:04:43] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg","newHash":"c5266cee"}
232
+ [02/13/2025, 13:04:43] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg","newHash":"c5266cee"}
233
+ [02/13/2025, 13:04:43] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg./img/samples.svg","newHash":"c5266cee"}
234
+ [02/13/2025, 13:04:43] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/samples.svg","newHash":"c5266cee"}
235
+ [02/13/2025, 13:04:43] [INFO] Updated file with versioned image references {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js"}
236
+ [02/13/2025, 13:04:43] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":1,"errorFiles":[]}}
237
+ [02/13/2025, 13:05:46] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
238
+ [02/13/2025, 13:05:47] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\.image-hashes.json
239
+ [02/13/2025, 13:05:47] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\sample.jpg
240
+ [02/13/2025, 13:05:47] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\samples.svg
241
+ [02/13/2025, 13:05:47] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
242
+ [02/13/2025, 13:05:47] [INFO] Updated CSS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/samples.svg","oldHash":"5e25d61b","newHash":"5e25d61b"}
243
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/sample.png"}
244
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"test.png"}
245
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"icon.svg"}
246
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"border.webp"}
247
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"photo.avif"}
248
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
249
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
250
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"sprite.png"}
251
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"../img/sample.jpg"}
252
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
253
+ [02/13/2025, 13:05:47] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
254
+ [02/13/2025, 13:05:47] [INFO] Updated file with versioned image references {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css"}
255
+ [02/13/2025, 13:05:47] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
256
+ [02/13/2025, 13:05:47] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
257
+ [02/13/2025, 13:05:53] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
258
+ [02/13/2025, 13:05:54] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\.image-hashes.json
259
+ [02/13/2025, 13:05:54] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\sample.jpg
260
+ [02/13/2025, 13:05:54] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\samples.svg
261
+ [02/13/2025, 13:05:54] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
262
+ [02/13/2025, 13:05:54] [INFO] Updated CSS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/sample.jpg","oldHash":"64d54047","newHash":"64d54047"}
263
+ [02/13/2025, 13:05:54] [INFO] Updated CSS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/samples.svg","oldHash":"5e25d61b","newHash":"5e25d61b"}
264
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/sample.png"}
265
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"test.png"}
266
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"icon.svg"}
267
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"border.webp"}
268
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"photo.avif"}
269
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
270
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
271
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"sprite.png"}
272
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"../img/sample.jpg"}
273
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
274
+ [02/13/2025, 13:05:54] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
275
+ [02/13/2025, 13:05:54] [INFO] Updated file with versioned image references {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css"}
276
+ [02/13/2025, 13:05:54] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
277
+ [02/13/2025, 13:05:55] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/samples.svg","newHash":"e01dfe7a"}
278
+ [02/13/2025, 13:05:55] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg","newHash":"e01dfe7a"}
279
+ [02/13/2025, 13:05:55] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg./img/samples.svg","newHash":"e01dfe7a"}
280
+ [02/13/2025, 13:05:55] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/sample.jpg","newHash":"e01dfe7a"}
281
+ [02/13/2025, 13:05:55] [INFO] Updated JS image version {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js","image":"\"./img/samples.svg","newHash":"e01dfe7a"}
282
+ [02/13/2025, 13:05:55] [INFO] Updated file with versioned image references {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.js"}
283
+ [02/13/2025, 13:05:55] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
284
+ [02/13/2025, 13:06:40] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
285
+ [02/13/2025, 13:06:40] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\.image-hashes.json
286
+ [02/13/2025, 13:06:40] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\sample.jpg
287
+ [02/13/2025, 13:06:40] [INFO] Unsupported file type, skipping: C:\Users\PEARL\Desktop\_code\minify_contents\test\img\samples.svg
288
+ [02/13/2025, 13:06:40] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
289
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"img/sample.png"}
290
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"test.png"}
291
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"icon.svg"}
292
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"border.webp"}
293
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"photo.avif"}
294
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
295
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
296
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"sprite.png"}
297
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"../img/sample.jpg"}
298
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"bg.jpg"}
299
+ [02/13/2025, 13:06:40] [WARN] Failed to generate hash, keeping original URL {"file":"C:\\Users\\PEARL\\Desktop\\_code\\minify_contents\\test\\test.css","image":"pattern.png"}
300
+ [02/13/2025, 13:06:41] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
301
+ [02/13/2025, 13:06:41] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
302
+ [02/13/2025, 13:09:24] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
303
+ [02/13/2025, 13:09:25] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
304
+ [02/13/2025, 13:09:25] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
305
+ [02/13/2025, 13:09:25] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
306
+ [02/13/2025, 13:10:07] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
307
+ [02/13/2025, 13:10:07] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
308
+ [02/13/2025, 13:10:08] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
309
+ [02/13/2025, 13:10:08] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
310
+ [02/13/2025, 13:10:21] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
311
+ [02/13/2025, 13:10:22] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
312
+ [02/13/2025, 13:10:22] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
313
+ [02/13/2025, 13:10:22] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
314
+ [02/13/2025, 13:10:40] [INFO] Starting minification process {"contentPath":"./test/","excludeFolder":"lib","useBabel":{"targets":"chrome 40"},"useVersioning":true}
315
+ [02/13/2025, 13:10:41] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.css
316
+ [02/13/2025, 13:10:41] [INFO] Writing file: C:\Users\PEARL\Desktop\_code\minify_contents\test\test.js
317
+ [02/13/2025, 13:10:41] [INFO] Processing Summary {"summary":{"totalFilesProcessed":5,"filesWithErrors":0,"errorCount":0,"errorFiles":[]}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uglify-js-minify-css-allfiles",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "you will be able to minify all files as same file names which is js or css",
5
5
  "main": "minify.js",
6
6
  "type": "module",