@guanghechen/commander 1.0.1 → 1.0.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## <small>1.0.2 (2024-09-29)</small>
7
+
8
+ * :art: improve(commander): remove unnecessary third-party dependencies ([d5cb553](https://github.com/guanghechen/node-scaffolds/commit/d5cb553))
9
+
10
+
11
+
12
+
13
+
6
14
  ## <small>1.0.1 (2024-09-28)</small>
7
15
 
8
16
  * :art: improve: reuse @guanghechen/cli ([6c8e6a0](https://github.com/guanghechen/node-scaffolds/commit/6c8e6a0))
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <header>
2
2
  <h1 align="center">
3
- <a href="https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.1/packages/commander#readme">@guanghechen/commander</a>
3
+ <a href="https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.2/packages/commander#readme">@guanghechen/commander</a>
4
4
  </h1>
5
5
  <div align="center">
6
6
  <a href="https://www.npmjs.com/package/@guanghechen/commander">
@@ -78,6 +78,6 @@ Utility functions for creating command programs tools based on [commander.js][].
78
78
  * [commander.js][]
79
79
 
80
80
 
81
- [homepage]: https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.1/packages/commander#readme
81
+ [homepage]: https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.2/packages/commander#readme
82
82
  [commander.js]: https://github.com/tj/commander.js/
83
83
 
package/lib/cjs/index.cjs CHANGED
@@ -1,15 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var commander = require('commander');
4
+ var cli = require('@guanghechen/cli');
4
5
  var exec = require('@guanghechen/exec');
5
6
  var select = require('@inquirer/select');
6
- var commandExists = require('command-exists');
7
- var cli = require('@guanghechen/cli');
8
7
 
9
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
9
 
11
10
  var select__default = /*#__PURE__*/_interopDefault(select);
12
- var commandExists__default = /*#__PURE__*/_interopDefault(commandExists);
13
11
 
14
12
  class Command extends commander.Command {
15
13
  _actionHandler;
@@ -133,12 +131,12 @@ function createTopCommand(commandName, version) {
133
131
  return program;
134
132
  }
135
133
 
136
- const hasGitInstalled = () => commandExists__default.default.sync('git');
134
+ const hasGitInstalled = () => cli.commandExistsSync('git');
137
135
  async function installDependencies(params) {
138
136
  const { cwd, plopBypass, reporter } = params;
139
- const hasYarnInstalled = commandExists__default.default.sync('yarn');
137
+ const hasYarnInstalled = cli.commandExistsSync('yarn');
140
138
  if (!hasYarnInstalled) {
141
- const hasNpmInstalled = commandExists__default.default.sync('npm');
139
+ const hasNpmInstalled = cli.commandExistsSync('npm');
142
140
  if (!hasNpmInstalled)
143
141
  return;
144
142
  }
package/lib/esm/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Command as Command$1 } from 'commander';
2
+ import { commandExistsSync } from '@guanghechen/cli';
3
+ export * from '@guanghechen/cli';
2
4
  import { safeExec } from '@guanghechen/exec';
3
5
  import select from '@inquirer/select';
4
- import commandExists from 'command-exists';
5
- export * from '@guanghechen/cli';
6
6
 
7
7
  class Command extends Command$1 {
8
8
  _actionHandler;
@@ -126,12 +126,12 @@ function createTopCommand(commandName, version) {
126
126
  return program;
127
127
  }
128
128
 
129
- const hasGitInstalled = () => commandExists.sync('git');
129
+ const hasGitInstalled = () => commandExistsSync('git');
130
130
  async function installDependencies(params) {
131
131
  const { cwd, plopBypass, reporter } = params;
132
- const hasYarnInstalled = commandExists.sync('yarn');
132
+ const hasYarnInstalled = commandExistsSync('yarn');
133
133
  if (!hasYarnInstalled) {
134
- const hasNpmInstalled = commandExists.sync('npm');
134
+ const hasNpmInstalled = commandExistsSync('npm');
135
135
  if (!hasNpmInstalled)
136
136
  return;
137
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanghechen/commander",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A wrapper of commander.js with some utilities",
5
5
  "author": {
6
6
  "name": "guanghechen",
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.0",
11
+ "url": "https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.1",
12
12
  "directory": "packages/commander"
13
13
  },
14
- "homepage": "https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.0/packages/commander#readme",
14
+ "homepage": "https://github.com/guanghechen/node-scaffolds/tree/@guanghechen/commander@1.0.1/packages/commander#readme",
15
15
  "keywords": [
16
16
  "commander"
17
17
  ],
@@ -41,15 +41,11 @@
41
41
  "README.md"
42
42
  ],
43
43
  "dependencies": {
44
- "@guanghechen/cli": "^1.0.1",
44
+ "@guanghechen/cli": "^1.0.2",
45
45
  "@guanghechen/exec": "^1.0.6",
46
46
  "@guanghechen/reporter.types": "^1.0.4",
47
47
  "@inquirer/select": "^3.0.1",
48
- "command-exists": "^1.2.9",
49
48
  "commander": "^12.1.0"
50
49
  },
51
- "devDependencies": {
52
- "@types/js-yaml": "^4.0.9"
53
- },
54
- "gitHead": "0b05e2e41ca5e5bebf4cd88c9eef1d80b36460a1"
50
+ "gitHead": "230582da1b1f3a517d8e880dcf086351b6e5f304"
55
51
  }