@zjex/git-workflow 0.2.14 → 0.2.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/dist/index.js CHANGED
@@ -2095,7 +2095,7 @@ process.on("SIGTERM", () => {
2095
2095
  console.log("");
2096
2096
  process.exit(0);
2097
2097
  });
2098
- var version = true ? "0.2.14" : "0.0.0-dev";
2098
+ var version = true ? "0.2.16" : "0.0.0-dev";
2099
2099
  async function mainMenu() {
2100
2100
  console.log(
2101
2101
  colors.green(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zjex/git-workflow",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "🚀 极简的 Git 工作流 CLI 工具,让分支管理和版本发布变得轻松愉快",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "version": "node scripts/version.js",
18
18
  "release": "./scripts/release.sh",
19
19
  "release:dry": "./scripts/release.sh --dry-run",
20
- "publish:npm": "node scripts/publish.js",
20
+ "publish:npm": "NODE_NO_WARNINGS=1 node scripts/publish.js",
21
21
  "prepublishOnly": "npm run build",
22
22
  "prepare": "husky"
23
23
  },
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node --no-warnings
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { execSync } from "child_process";
4
4
  import { readFileSync } from "fs";
@@ -111,6 +111,14 @@ async function main() {
111
111
  const currentVersion = pkg.version;
112
112
 
113
113
  // [5] 选择新版本号
114
+ const spinner5 = ora({
115
+ text: `${colors.blue("[5/11]")} 选择新版本号...`,
116
+ spinner: "dots",
117
+ }).start();
118
+
119
+ // 停止 spinner,保持交互式
120
+ spinner5.stop();
121
+
114
122
  console.log(`${colors.blue("[5/11]")} 选择新版本号...`);
115
123
  console.log("");
116
124
 
@@ -132,12 +140,20 @@ async function main() {
132
140
  }
133
141
 
134
142
  // 清除上面的输出,重新显示步骤5
135
- // 需要清除:
143
+ // npm run version 输出:
144
+ // - "> @zjex/git-workflow@x.x.x version" (1行)
145
+ // - "> node scripts/version.js" (1行)
146
+ // - 空行 (1行)
147
+ // - "? 选择版本升级类型:" (1行)
148
+ // - 选项列表 (4行: patch, minor, major, custom)
149
+ // - 空行 (1行)
150
+ // - "✔ 版本已更新: x.x.x → x.x.x" (1行)
151
+ // - 空行 (1行)
152
+ // 加上我们自己的:
136
153
  // - "[5/11] 选择新版本号..." (1行)
137
154
  // - 空行 (1行)
138
- // - npm run version 的所有输出 (约11)
139
- // 总共 13
140
- const linesToClear = 13;
155
+ // 总共约 14
156
+ const linesToClear = 14;
141
157
 
142
158
  for (let i = 0; i < linesToClear; i++) {
143
159
  process.stdout.write("\x1b[1A"); // 向上移动一行
@@ -243,10 +259,8 @@ async function main() {
243
259
  execSync("npm publish", { stdio: "inherit" });
244
260
 
245
261
  // 清除 npm publish 的所有输出
246
- // 根据实际测试,npm publish 输出约 50-60
247
- // 包括:prepublishOnly、build、prepare、husky、npm notice、认证等
248
- // 为了确保清除干净,使用 60 行
249
- const linesToClear = 60;
262
+ // 根据实际测试,需要删除约 95
263
+ const linesToClear = 95;
250
264
 
251
265
  for (let i = 0; i < linesToClear; i++) {
252
266
  process.stdout.write("\x1b[1A");