change-image-suffix 2.1.14 → 2.1.16

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
@@ -2,6 +2,25 @@
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.16](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.15...v2.1.16) (2026-05-25)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * use "%1" with MultiSelectModel instead of %* for mixed selection ([ce5099c](https://github.com/GuoSirius/change-image-suffix/commit/ce5099cd452128e8193663dcb95560708428c2a2))
11
+
12
+ ### [2.1.15](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.14...v2.1.15) (2026-05-25)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * use AllFilesystemObjects to support mixed file+directory selection ([5a67d8f](https://github.com/GuoSirius/change-image-suffix/commit/5a67d8f3a436f24b1b9cff2c173d5aeea661f907))
18
+
19
+
20
+ ### Documentation
21
+
22
+ * update CLAUDE.md for AllFilesystemObjects architecture ([5957326](https://github.com/GuoSirius/change-image-suffix/commit/59573263dfb01c9d27239d06878068d63de96229))
23
+
5
24
  ### [2.1.14](https://github.com/GuoSirius/change-image-suffix/compare/v2.1.13...v2.1.14) (2026-05-25)
6
25
 
7
26
 
package/dist/index.js CHANGED
@@ -68,10 +68,10 @@ function installContextMenu() {
68
68
  { verb: 'tiff', label: '📋 TIFF' },
69
69
  ];
70
70
  // ── 使用 ExtendedSubCommandsKey,直接调用 node.exe(无 bat 中转)──
71
+ // AllFilesystemObjects 覆盖文件和目录,支持混合多选
71
72
  const menuBases = [
72
73
  { base: 'HKCU\\Software\\Classes\\Directory\\Background\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis', arg: '-p "%V"' },
73
- { base: 'HKCU\\Software\\Classes\\Directory\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis_dir', arg: '-p "%1"' },
74
- { base: 'HKCU\\Software\\Classes\\*\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis_file', arg: '-f "%1"' },
74
+ { base: 'HKCU\\Software\\Classes\\AllFilesystemObjects\\shell\\cis', subMenu: 'Directory\\ContextMenus\\cis_afo', arg: '"%1"', multiSelect: true },
75
75
  ];
76
76
  // 1. 注册格式子菜单
77
77
  const REG_ROOT = 'HKCU\\Software\\Classes\\';
@@ -89,6 +89,9 @@ function installContextMenu() {
89
89
  execSync(`reg add "${menu.base}" /ve /d "🖼 转换图片 (cis)" /f`, { stdio: 'ignore' });
90
90
  execSync(`reg add "${menu.base}" /v Icon /d "${iconPath}" /f`, { stdio: 'ignore' });
91
91
  execSync(`reg add "${menu.base}" /v ExtendedSubCommandsKey /d "${menu.subMenu}" /f`, { stdio: 'ignore' });
92
+ if (menu.multiSelect) {
93
+ execSync(`reg add "${menu.base}" /v MultiSelectModel /d Player /f`, { stdio: 'ignore' });
94
+ }
92
95
  }
93
96
  // 写入版本标记,用于检测 npm update 后自动刷新菜单
94
97
  const versionFile = path.join(appDataDir, 'version.json');
@@ -103,11 +106,12 @@ function installContextMenu() {
103
106
  }
104
107
  function uninstallContextMenu() {
105
108
  requireWindows();
106
- // 删除主菜单项
109
+ // 删除主菜单项(含旧版残留)
107
110
  const mainKeys = [
108
111
  'HKCU\\Software\\Classes\\Directory\\Background\\shell\\cis',
109
- 'HKCU\\Software\\Classes\\Directory\\shell\\cis',
110
- 'HKCU\\Software\\Classes\\*\\shell\\cis',
112
+ 'HKCU\\Software\\Classes\\AllFilesystemObjects\\shell\\cis',
113
+ 'HKCU\\Software\\Classes\\Directory\\shell\\cis', // 旧版残留
114
+ 'HKCU\\Software\\Classes\\*\\shell\\cis', // 旧版残留
111
115
  ];
112
116
  for (const key of mainKeys) {
113
117
  try {
@@ -115,11 +119,12 @@ function uninstallContextMenu() {
115
119
  }
116
120
  catch { /* ignore */ }
117
121
  }
118
- // 删除公共子菜单(三个:目录空白、目录图标、文件)
122
+ // 删除公共子菜单
119
123
  const subMenuRoots = [
120
124
  'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis',
121
- 'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_dir',
122
- 'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_file',
125
+ 'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_dir', // 旧版残留
126
+ 'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_file', // 旧版残留
127
+ 'HKCU\\Software\\Classes\\Directory\\ContextMenus\\cis_afo',
123
128
  ];
124
129
  for (const root of subMenuRoots) {
125
130
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "change-image-suffix",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "type": "module",
5
5
  "description": "批量转换图片格式的CLI工具,支持递归搜索、深度限制、指定后缀、Windows右键菜单等功能",
6
6
  "main": "dist/index.js",