bstack 1.1.5 → 1.1.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/bstack.mjs +5 -2
  2. package/package.json +1 -1
package/dist/bstack.mjs CHANGED
@@ -6,7 +6,7 @@ import * as v from "valibot";
6
6
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
7
7
  import { dirname } from "node:path";
8
8
  //#region package.json
9
- var version = "1.1.5";
9
+ var version = "1.1.6";
10
10
  //#endregion
11
11
  //#region src/command.ts
12
12
  var CommandError = class extends Error {
@@ -59,6 +59,7 @@ function checkoutStack(dependencies, options) {
59
59
  const { repository, github, reporter } = dependencies;
60
60
  reporter.progress("Checking the repository and GitHub prerequisites");
61
61
  repository.assertReady();
62
+ repository.assertClean();
62
63
  github.assertReady();
63
64
  const remote = repository.resolveRemote(options.remote);
64
65
  reporter.progress(`Looking up pull request ${options.reference}`);
@@ -166,7 +167,9 @@ var GitCliRepository = class {
166
167
  }
167
168
  assertReady() {
168
169
  this.git(["rev-parse", "--show-toplevel"]);
169
- if (this.git(["status", "--porcelain"]).stdout.trim()) throw new Error("The working tree must be clean before bstack rewrites commits or pushes branches");
170
+ }
171
+ assertClean() {
172
+ if (this.git(["status", "--porcelain"]).stdout.trim()) throw new Error("The working tree must be clean before checkout");
170
173
  }
171
174
  currentBranch() {
172
175
  return this.git([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bstack",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Create native GitHub stacked pull requests from a linear series of commits",
5
5
  "license": "MIT",
6
6
  "repository": {