@foxden-app/foxclaw 0.5.70 → 0.5.71
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/dist/update.d.ts +1 -0
- package/dist/update.js +14 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
|
|
4
4
|
|
|
5
|
+
## 0.5.71 - 2026-07-11
|
|
6
|
+
|
|
7
|
+
### 中文
|
|
8
|
+
- 自更新找不到当前 pnpm 可执行文件时,不再通过 `pnpm@latest` 跨 major 安装:`global/5` 旧布局固定使用 pnpm 10,`global/v11` 布局固定使用 pnpm 11,避免同一次升级同时产生两套全局目录和 CLI 入口。
|
|
9
|
+
- 保留 pnpm 10 与 pnpm 11 两种全局 root 解析,确保安装后的自检和服务重启使用与当前 FoxClaw 安装布局一致的新入口。
|
|
10
|
+
|
|
11
|
+
### English
|
|
12
|
+
- Self-update no longer crosses pnpm major versions through `pnpm@latest` when the current pnpm executable is unavailable. The legacy `global/5` layout uses pnpm 10, while `global/v11` uses pnpm 11, preventing one update from creating duplicate global trees and CLI entry points.
|
|
13
|
+
- Kept global-root resolution for both pnpm 10 and pnpm 11 so post-install checks and service restart use the new entry point from the same layout as the current FoxClaw installation.
|
|
14
|
+
|
|
5
15
|
## 0.5.70 - 2026-07-11
|
|
6
16
|
|
|
7
17
|
### 中文
|
package/dist/update.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface PendingClusterUpdateBroadcast {
|
|
|
65
65
|
}
|
|
66
66
|
export declare function selfUpdateStatusPath(statusPath: string): string;
|
|
67
67
|
export declare function inferPnpmHomeFromEntryPoint(entryPoint: string): string | null;
|
|
68
|
+
export declare function inferPnpmFallbackPackageFromEntryPoint(entryPoint: string): string;
|
|
68
69
|
export declare function resolveSelfUpdateInstaller(entryPoint: string, nodePath?: string, exists?: (target: string) => boolean, env?: NodeJS.ProcessEnv): SelfUpdateInstaller;
|
|
69
70
|
export declare function resolveCodexUpdateInstaller(codexCliBin: string, nodePath?: string, exists?: (target: string) => boolean, env?: NodeJS.ProcessEnv, realpath?: (target: string) => string, readText?: (target: string) => string): SelfUpdateInstaller | null;
|
|
70
71
|
export declare function readSelfUpdateStatus(statusFile: string): SelfUpdateStatus | null;
|
package/dist/update.js
CHANGED
|
@@ -18,6 +18,17 @@ export function inferPnpmHomeFromEntryPoint(entryPoint) {
|
|
|
18
18
|
}
|
|
19
19
|
return normalizedEntryPoint.slice(0, globalIndex);
|
|
20
20
|
}
|
|
21
|
+
export function inferPnpmFallbackPackageFromEntryPoint(entryPoint) {
|
|
22
|
+
const normalizedEntryPoint = entryPoint.replace(/\\/g, '/');
|
|
23
|
+
const versionedLayout = normalizedEntryPoint.match(/\/global\/v(\d+)(?:\/|$)/);
|
|
24
|
+
if (versionedLayout?.[1]) {
|
|
25
|
+
return `pnpm@${versionedLayout[1]}`;
|
|
26
|
+
}
|
|
27
|
+
if (/\/global\/\d+(?:\/|$)/.test(normalizedEntryPoint)) {
|
|
28
|
+
return 'pnpm@10';
|
|
29
|
+
}
|
|
30
|
+
return 'pnpm@latest';
|
|
31
|
+
}
|
|
21
32
|
export function resolveSelfUpdateInstaller(entryPoint, nodePath = process.execPath, exists = fs.existsSync, env = process.env) {
|
|
22
33
|
const pnpmHome = inferPnpmHomeFromEntryPoint(entryPoint);
|
|
23
34
|
if (pnpmHome) {
|
|
@@ -41,11 +52,12 @@ export function resolveSelfUpdateInstaller(entryPoint, nodePath = process.execPa
|
|
|
41
52
|
const npmCommandName = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
42
53
|
const npmCommand = executableCandidates(npmCommandName, nodePath, env)
|
|
43
54
|
.find((candidate) => exists(candidate)) ?? npmCommandName;
|
|
55
|
+
const fallbackPackage = inferPnpmFallbackPackageFromEntryPoint(entryPoint);
|
|
44
56
|
return {
|
|
45
57
|
manager: 'pnpm',
|
|
46
58
|
command: npmCommand,
|
|
47
|
-
installArgs: ['exec', '--yes',
|
|
48
|
-
rootArgs: ['exec', '--yes',
|
|
59
|
+
installArgs: ['exec', '--yes', `--package=${fallbackPackage}`, '--', 'pnpm', 'add', '--global', PACKAGE_SPEC],
|
|
60
|
+
rootArgs: ['exec', '--yes', `--package=${fallbackPackage}`, '--', 'pnpm', 'root', '--global'],
|
|
49
61
|
pnpmHome,
|
|
50
62
|
};
|
|
51
63
|
}
|