@clerc/plugin-help 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.
package/dist/index.cjs CHANGED
@@ -13,7 +13,7 @@ const mustArray = (a) => Array.isArray(a) ? a : [a];
13
13
  const gracefulFlagName = (n) => n.length <= 1 ? `-${n}` : `--${n}`;
14
14
  function generateNameAndAliasFromCommands(commands) {
15
15
  return Object.fromEntries(
16
- Object.entries(commands).map(([name, command]) => [name, [name, ...mustArray(command.alias || "")].join(", ")])
16
+ Object.entries(commands).map(([name, command]) => [name, [name, ...command.alias ? mustArray(command.alias) : []].join(", ")])
17
17
  );
18
18
  }
19
19
  function generateFlagNameAndAliasFromCommand(command) {
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ const mustArray = (a) => Array.isArray(a) ? a : [a];
5
5
  const gracefulFlagName = (n) => n.length <= 1 ? `-${n}` : `--${n}`;
6
6
  function generateNameAndAliasFromCommands(commands) {
7
7
  return Object.fromEntries(
8
- Object.entries(commands).map(([name, command]) => [name, [name, ...mustArray(command.alias || "")].join(", ")])
8
+ Object.entries(commands).map(([name, command]) => [name, [name, ...command.alias ? mustArray(command.alias) : []].join(", ")])
9
9
  );
10
10
  }
11
11
  function generateFlagNameAndAliasFromCommand(command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-help",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",
5
5
  "description": "Clerc plugin help",
6
6
  "keywords": [
@@ -39,8 +39,11 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
+ "peerDependencies": {
43
+ "clerc": "*"
44
+ },
42
45
  "dependencies": {
43
- "clerc": "0.1.0",
46
+ "clerc": "0.2.0",
44
47
  "picocolors": "^1.0.0"
45
48
  },
46
49
  "scripts": {