@guanghechen/commander 4.7.0 → 4.7.1

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
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix built-in `--version` handling so leaf commands with a configured `version` print their own
8
+ version.
9
+
3
10
  ## 4.7.0
4
11
 
5
12
  ### Minor Changes
@@ -1404,7 +1404,7 @@ class Command {
1404
1404
  return this.#options.some(option => option.long === long);
1405
1405
  }
1406
1406
  #supportsBuiltinVersion() {
1407
- return this.#parent === undefined && this.#version !== undefined && this.#builtin.option.version;
1407
+ return this.#version !== undefined && this.#builtin.option.version;
1408
1408
  }
1409
1409
  #resolveOptionPolicy() {
1410
1410
  const optionMap = new Map();