bstack 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/bstack.js +13 -0
  2. package/package.json +1 -1
package/dist/bstack.js CHANGED
@@ -4,6 +4,9 @@ import { spawnSync } from "node:child_process";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
6
6
  import { dirname } from "node:path";
7
+ //#region package.json
8
+ var version = "0.2.0";
9
+ //#endregion
7
10
  //#region src/command.ts
8
11
  var CommandError = class extends Error {
9
12
  command;
@@ -637,6 +640,7 @@ Options:
637
640
  --dry-run Inspect the stack without rewriting commits or pushing
638
641
  --quiet Hide progress logs; the final summary is still printed
639
642
  --same-base Refuse checkout if it would change the current merge base
643
+ -v, --version Show the installed version
640
644
  -h, --help Show this help
641
645
  `;
642
646
  function main() {
@@ -662,6 +666,11 @@ function main() {
662
666
  type: "boolean",
663
667
  default: false
664
668
  },
669
+ version: {
670
+ type: "boolean",
671
+ short: "v",
672
+ default: false
673
+ },
665
674
  help: {
666
675
  type: "boolean",
667
676
  short: "h",
@@ -673,6 +682,10 @@ function main() {
673
682
  process.stdout.write(help);
674
683
  return;
675
684
  }
685
+ if (values.version) {
686
+ console.log(version);
687
+ return;
688
+ }
676
689
  const runner = new NodeCommandRunner();
677
690
  const cwd = process.cwd();
678
691
  const repository = new GitRepository(cwd, runner);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bstack",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "packageManager": "pnpm@11.5.1",
5
5
  "description": "Create native GitHub stacked pull requests from a linear series of commits",
6
6
  "repository": {