Compare commits

...

2 Commits

Author SHA1 Message Date
Jim Liu 宝玉 0e571b72fb chore: release v1.23.1 2026-01-27 00:59:34 -06:00
Jim Liu 宝玉 366630f8c3 fix(baoyu-compress-image): rename original as backup instead of deleting 2026-01-27 00:59:30 -06:00
4 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
}, },
"metadata": { "metadata": {
"description": "Skills shared by Baoyu for improving daily work efficiency", "description": "Skills shared by Baoyu for improving daily work efficiency",
"version": "1.23.0" "version": "1.23.1"
}, },
"plugins": [ "plugins": [
{ {
+5
View File
@@ -2,6 +2,11 @@
English | [中文](./CHANGELOG.zh.md) English | [中文](./CHANGELOG.zh.md)
## 1.23.1 - 2026-01-27
### Fixes
- `baoyu-compress-image`: rename original file as `_original` backup instead of deleting after compression.
## 1.23.0 - 2026-01-26 ## 1.23.0 - 2026-01-26
### Refactor ### Refactor
+5
View File
@@ -2,6 +2,11 @@
[English](./CHANGELOG.md) | 中文 [English](./CHANGELOG.md) | 中文
## 1.23.1 - 2026-01-27
### 修复
- `baoyu-compress-image`:压缩后将原始文件重命名为 `_original` 备份,不再删除。
## 1.23.0 - 2026-01-26 ## 1.23.0 - 2026-01-26
### 重构 ### 重构
+3 -1
View File
@@ -147,7 +147,9 @@ async function processFile(
const outputSize = statSync(tempOutput).size; const outputSize = statSync(tempOutput).size;
if (!opts.keep && absInput !== output) { if (!opts.keep && absInput !== output) {
unlinkSync(absInput); const ext = extname(absInput);
const base = absInput.slice(0, -ext.length);
renameSync(absInput, `${base}_original${ext}`);
} }
renameSync(tempOutput, output); renameSync(tempOutput, output);