fe-build-cli 1.6.0 → 1.6.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/update.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fe-build-cli",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "前端项目打包部署 CLI 工具,支持多服务器部署、分支管理、回滚、钉钉通知、智能处理本地改动等功能",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/update.js CHANGED
@@ -39,7 +39,12 @@ export function getCurrentVersion() {
39
39
  */
40
40
  export async function getLatestVersion() {
41
41
  try {
42
- const result = execSync('npm view fe-build-cli version', { encoding: 'utf-8', timeout: 10000 });
42
+ // 使用 --silent 参数避免显示 npm 警告
43
+ const result = execSync('npm view fe-build-cli version --silent 2>nul', {
44
+ encoding: 'utf-8',
45
+ timeout: 10000,
46
+ stdio: ['pipe', 'pipe', 'pipe'] // 隐藏 stderr
47
+ });
43
48
  return result.trim();
44
49
  } catch (error) {
45
50
  throw new Error('无法获取最新版本,请检查网络连接或 npm 源');