change-image-suffix 2.1.8 → 2.1.9
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 +7 -0
- package/dist/index.js +19 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.1.9](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.8...v2.1.9) (2026-05-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* replace bat if/else blocks with goto to handle paths with parentheses ([47cff5a](https://github.com/GuoSirius/change-image-suffix/commit/47cff5ad7d50b60f41628dd1fe9bcf869a74e85e))
|
|
11
|
+
|
|
5
12
|
### [2.1.8](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.7...v2.1.8) (2026-05-25)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.js
CHANGED
|
@@ -92,24 +92,33 @@ shift
|
|
|
92
92
|
set args=
|
|
93
93
|
:parse
|
|
94
94
|
if "%~1"=="" goto :run
|
|
95
|
-
if exist "%~1\\*"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
if exist "%~1\\*" goto :is_dir
|
|
96
|
+
goto :is_file
|
|
97
|
+
|
|
98
|
+
:is_dir
|
|
99
|
+
set args=!args! -p "%~1"
|
|
100
|
+
goto :next_arg
|
|
101
|
+
|
|
102
|
+
:is_file
|
|
103
|
+
set args=!args! -f "%~1"
|
|
104
|
+
|
|
105
|
+
:next_arg
|
|
100
106
|
shift
|
|
101
107
|
goto :parse
|
|
102
108
|
|
|
103
109
|
:run
|
|
104
|
-
if "!args!"==""
|
|
105
|
-
echo [change-image-suffix] No files or directories to process.
|
|
106
|
-
pause
|
|
107
|
-
exit /b 1
|
|
108
|
-
)
|
|
110
|
+
if "!args!"=="" goto :no_args
|
|
109
111
|
|
|
110
112
|
"!CIS_CMD!" -t !format! !args!
|
|
111
113
|
pause
|
|
112
114
|
endlocal
|
|
115
|
+
goto :eof
|
|
116
|
+
|
|
117
|
+
:no_args
|
|
118
|
+
echo [change-image-suffix] No files or directories to process.
|
|
119
|
+
pause
|
|
120
|
+
endlocal
|
|
121
|
+
exit /b 1
|
|
113
122
|
`;
|
|
114
123
|
fs.writeFileSync(batPath, batContent, 'utf8');
|
|
115
124
|
// ── 格式列表(webp 排第一,其他按常见程度排序)──
|