@evanpurkhiser/tooling-personal 1.27.0 → 1.28.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.
package/dist/cmd/pr.js CHANGED
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.pr = void 0;
6
7
  const chalk_1 = __importDefault(require("chalk"));
7
8
  const listr2_1 = require("listr2");
8
9
  const open_1 = __importDefault(require("open"));
@@ -159,4 +160,4 @@ async function pr() {
159
160
  // 08. Open in browser
160
161
  open_1.default(createPullRequest.pullRequest.url);
161
162
  }
162
- exports.default = pr;
163
+ exports.pr = pr;
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.selectCommit = void 0;
6
7
  const chalk_1 = __importDefault(require("chalk"));
7
8
  const simple_git_1 = __importDefault(require("simple-git"));
8
9
  const fzf_1 = require("../fzf");
@@ -19,4 +20,4 @@ async function selectCommit() {
19
20
  const commitHashes = selected.map(commit => commit.hash);
20
21
  console.log(commitHashes.join('\n'));
21
22
  }
22
- exports.default = selectCommit;
23
+ exports.selectCommit = selectCommit;
package/dist/fzf.js CHANGED
@@ -13,11 +13,19 @@ async function fzfSelect({ prompt, genValues, }) {
13
13
  ], { shell: true, stdio: ['pipe', 'pipe', 'inherit'] });
14
14
  fzf.stdin.setDefaultEncoding('utf-8');
15
15
  const options = {};
16
- await genValues(option => {
16
+ const valuesDone = genValues(option => {
17
+ if (fzf.stdin.destroyed) {
18
+ return;
19
+ }
17
20
  options[option.id] = option;
18
21
  fzf.stdin.write(`${option.id}\t${option.label.trim()}\n`);
19
22
  });
20
- fzf.stdin.end();
23
+ if (valuesDone instanceof Promise) {
24
+ valuesDone.then(() => fzf.stdin.end());
25
+ }
26
+ else {
27
+ fzf.stdin.end();
28
+ }
21
29
  const output = await new Promise(resolve => fzf.stdout.once('data', d => resolve(d.toString())));
22
30
  return output
23
31
  .split('\n')
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const yargs_1 = __importDefault(require("yargs"));
9
- const pr_1 = __importDefault(require("./cmd/pr"));
10
- const select_commit_1 = __importDefault(require("./cmd/select-commit"));
9
+ const pr_1 = require("./cmd/pr");
10
+ const select_commit_1 = require("./cmd/select-commit");
11
11
  yargs_1.default(process.argv.slice(2))
12
12
  .option('color', {
13
13
  boolean: true,
@@ -18,7 +18,7 @@ yargs_1.default(process.argv.slice(2))
18
18
  chalk_1.default.level = args.color ? 3 : 0;
19
19
  }
20
20
  }, true)
21
- .command('pr', 'Create and update PRs', pr_1.default)
22
- .command('select-commit', 'Select a commit hash', select_commit_1.default)
21
+ .command('pr', 'Create and update PRs', pr_1.pr)
22
+ .command('select-commit', 'Select a commit hash', select_commit_1.selectCommit)
23
23
  .demandCommand(1, '')
24
24
  .parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanpurkhiser/tooling-personal",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "description": "Evan Purkhiser's personal tooling",
5
5
  "repository": "https://github.com/evanpurkhiser/tooling-personal",
6
6
  "author": "Evan Purkhiser",
@@ -27,7 +27,7 @@
27
27
  "yargs": "^17.0.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@evanpurkhiser/eslint-config": "^0.17.0",
30
+ "@evanpurkhiser/eslint-config": "^0.20.0",
31
31
  "@tsconfig/node16": "^1.0.1",
32
32
  "eslint": "^8.45.0",
33
33
  "prettier": "^3.0.0",