@clerc/plugin-completions 1.0.0-beta.4 → 1.0.0-beta.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/index.js +2 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { definePlugin, resolveCommand } from "@clerc/core";
1
+ import { DOUBLE_DASH, definePlugin, resolveCommand } from "@clerc/core";
2
2
  import tabtab, { getShellFromEnv } from "@pnpm/tabtab";
3
3
  import { formatFlagName, toArray } from "@clerc/utils";
4
4
 
@@ -33,7 +33,7 @@ function splitCommand(cmd) {
33
33
  }
34
34
  async function getCompletion(cli, env) {
35
35
  const inputArgv = splitCommand(env.partial.slice(0, env.partial.length - env.lastPartial.length)).slice(1);
36
- if (inputArgv.includes("--")) return [];
36
+ if (inputArgv.includes(DOUBLE_DASH)) return [];
37
37
  const [command, commandName] = resolveCommand(cli._commands, inputArgv);
38
38
  if (env.lastPartial.startsWith("-")) {
39
39
  const flags = command ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/plugin-completions",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc plugin completions",
@@ -46,10 +46,10 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@pnpm/tabtab": "^0.5.4",
49
- "@clerc/utils": "1.0.0-beta.4"
49
+ "@clerc/utils": "1.0.0-beta.6"
50
50
  },
51
51
  "devDependencies": {
52
- "@clerc/core": "1.0.0-beta.4"
52
+ "@clerc/core": "1.0.0-beta.6"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@clerc/core": "*"