vite-svg-sprite-generator-plugin 1.1.6 → 1.1.7
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 +10 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/vite-svg-sprite-generator-plugin.js +4 -1
- package/vite-svg-sprite-generator-plugin.ts +30 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.1.7] - 2025-01-28
|
|
6
|
+
|
|
7
|
+
### 📦 Publication Release
|
|
8
|
+
|
|
9
|
+
- **UPDATED:** Version updated for npm publication
|
|
10
|
+
- **NO CHANGES:** Code is identical to v1.1.6
|
|
11
|
+
- **REASON:** Version bump for clean publication
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
5
15
|
## [1.1.6] - 2025-01-28
|
|
6
16
|
|
|
7
17
|
### 🐛 Bug Fix - Preview Mode Detection
|
package/README.md
CHANGED
|
@@ -394,6 +394,12 @@ sun.svg : 305 → 287 bytes (-5.9%)
|
|
|
394
394
|
|
|
395
395
|
## 📝 Changelog
|
|
396
396
|
|
|
397
|
+
### v1.1.7 (2025-01-28)
|
|
398
|
+
|
|
399
|
+
- 📦 **Version Bump** - Updated for npm publication
|
|
400
|
+
- ✅ **No Code Changes** - Identical to v1.1.6
|
|
401
|
+
- 🚀 **Ready to Publish** - All versions synchronized
|
|
402
|
+
|
|
397
403
|
### v1.1.6 (2025-01-28)
|
|
398
404
|
|
|
399
405
|
- 🐛 **Fixed Preview Detection** - Preview mode now correctly detected
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-svg-sprite-generator-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Production-ready Vite plugin for automatic SVG sprite generation with HMR support, SVGO optimization, and security features",
|
|
5
5
|
"main": "vite-svg-sprite-generator-plugin.js",
|
|
6
6
|
"module": "vite-svg-sprite-generator-plugin.js",
|
|
@@ -8,9 +8,12 @@ import { normalizePath } from 'vite';
|
|
|
8
8
|
* Production-ready plugin for automatic SVG sprite generation
|
|
9
9
|
* with HMR support, SVGO optimization, and security features
|
|
10
10
|
*
|
|
11
|
-
* @version 1.1.
|
|
11
|
+
* @version 1.1.7
|
|
12
12
|
* @package vite-svg-sprite-generator-plugin
|
|
13
13
|
*
|
|
14
|
+
* @changelog v1.1.7
|
|
15
|
+
* - Updated version for publication
|
|
16
|
+
*
|
|
14
17
|
* @changelog v1.1.6
|
|
15
18
|
* - FIXED: Preview mode detection now works correctly
|
|
16
19
|
* - Preview detected as: serve + production + !SSR
|
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Vite SVG Sprite Generator Plugin
|
|
3
3
|
* Production-ready plugin for automatic SVG sprite generation
|
|
4
|
-
* with HMR support and
|
|
4
|
+
* with HMR support, SVGO optimization, and security features
|
|
5
5
|
*
|
|
6
|
-
* @version 1.
|
|
6
|
+
* @version 1.1.7
|
|
7
7
|
* @package vite-svg-sprite-generator-plugin
|
|
8
|
+
*
|
|
9
|
+
* @changelog v1.1.7
|
|
10
|
+
* - Updated version for publication
|
|
11
|
+
*
|
|
12
|
+
* @changelog v1.1.6
|
|
13
|
+
* - FIXED: Preview mode detection now works correctly
|
|
14
|
+
* - Preview detected as: serve + production + !SSR
|
|
15
|
+
* - Added debug logging for mode detection
|
|
16
|
+
* - Confirmed: Preview mode skips validation (0ms)
|
|
17
|
+
*
|
|
18
|
+
* @changelog v1.1.4
|
|
19
|
+
* - Intelligent mode detection for preview command
|
|
20
|
+
* - Preview mode skips unnecessary operations (0ms vs 583ms)
|
|
21
|
+
* - Automatic command detection (serve/build/preview)
|
|
22
|
+
*
|
|
23
|
+
* @changelog v1.1.1
|
|
24
|
+
* - Using vite.normalizePath for better cross-platform compatibility
|
|
25
|
+
*
|
|
26
|
+
* @changelog v1.1.0
|
|
27
|
+
* - Path traversal protection via validateIconsPath()
|
|
28
|
+
* - All FS operations are now async (no event loop blocking)
|
|
29
|
+
* - Precompiled RegExp patterns (~20% faster sanitization)
|
|
30
|
+
* - New configResolved() hook for early validation
|
|
31
|
+
* - Enhanced error messages with examples
|
|
32
|
+
*
|
|
33
|
+
* Note: This is the TypeScript source file.
|
|
34
|
+
* The main distribution file is vite-svg-sprite-generator-plugin.js
|
|
8
35
|
*/
|
|
9
36
|
|
|
10
37
|
import { existsSync, statSync } from 'fs';
|
|
@@ -291,7 +318,7 @@ function createLogger(options: Required<SvgSpriteOptions>) {
|
|
|
291
318
|
|
|
292
319
|
/**
|
|
293
320
|
* Vite SVG Sprite Plugin с опциональной SVGO оптимизацией
|
|
294
|
-
* @version 1.
|
|
321
|
+
* @version 1.1.7
|
|
295
322
|
* @param userOptions - пользовательские опции
|
|
296
323
|
*/
|
|
297
324
|
export default function svgSpritePlugin(userOptions: SvgSpriteOptions = {}): Plugin {
|