@vitarx/release-cli 1.0.5 → 1.0.6

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/dist/release.js +2 -0
  2. package/package.json +1 -1
package/dist/release.js CHANGED
@@ -134,6 +134,7 @@ async function publishPackage(pkgDir, packageManager, isDryRun = false, args, la
134
134
  const confirm = await prompt(`是否确认发布 ${pkg.name}@${newVersion}? (y/N) `);
135
135
  if (confirm && confirm.toLowerCase() !== 'y') {
136
136
  log.warn('已取消发布');
137
+ rollbackChanges(undefined, isDryRun, lastCommitHash);
137
138
  process.exit(0);
138
139
  }
139
140
  // -------------------- Step 4: 构建和测试项目 --------------------
@@ -174,6 +175,7 @@ async function publishPackage(pkgDir, packageManager, isDryRun = false, args, la
174
175
  const confirm = await prompt(chalk.yellow('⚠️ 生成 changelog 失败,要继续发布流程吗? (y/N) '));
175
176
  if (confirm.toLowerCase() !== 'y') {
176
177
  log.warn('已取消发布');
178
+ rollbackChanges(undefined, isDryRun, lastCommitHash);
177
179
  process.exit(0);
178
180
  }
179
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitarx/release-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "A CLI tool for automated npm package release with workspace support",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",