@zhuan-ai/zhuanspec 2.14.0 → 2.15.0
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/dist/core/hooks/init.js +3 -3
- package/package.json +1 -1
package/dist/core/hooks/init.js
CHANGED
|
@@ -32,9 +32,9 @@ async function checkVersionUpdate() {
|
|
|
32
32
|
const pkgContent = JSON.parse(await fs.promises.readFile(pkgPath, 'utf-8'));
|
|
33
33
|
current = pkgContent.version;
|
|
34
34
|
}
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
const { stdout } = await execAsync('npm view @zhuan-ai/zhuanspec version', { timeout: 5000 });
|
|
35
|
+
// 强制查询 npmjs.org 公共源,避免用户本地 registry 指向私有仓库时
|
|
36
|
+
// 拿到过期版本号,永远误报"版本过旧"。
|
|
37
|
+
const { stdout } = await execAsync('npm view @zhuan-ai/zhuanspec version --registry=https://registry.npmjs.org/', { timeout: 5000 });
|
|
38
38
|
const latest = stdout.trim();
|
|
39
39
|
if (!latest || !current)
|
|
40
40
|
return null;
|