@oclif/core 1.13.8 → 1.13.9
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 +7 -0
- package/lib/command.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.13.9](https://github.com/oclif/core/compare/v1.13.8...v1.13.9) (2022-08-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove json flag if subclass overrides enableJsonFlag ([#467](https://github.com/oclif/core/issues/467)) ([05dd12a](https://github.com/oclif/core/commit/05dd12ad114f37d0512df2d89a8e51d0984fa3d4))
|
|
11
|
+
|
|
5
12
|
### [1.13.8](https://github.com/oclif/core/compare/v1.13.7...v1.13.8) (2022-08-09)
|
|
6
13
|
|
|
7
14
|
|
package/lib/command.js
CHANGED
|
@@ -44,8 +44,16 @@ class Command {
|
|
|
44
44
|
}
|
|
45
45
|
static set enableJsonFlag(value) {
|
|
46
46
|
this._enableJsonFlag = value;
|
|
47
|
-
if (value)
|
|
47
|
+
if (value === true) {
|
|
48
48
|
this.globalFlags = jsonFlag;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// @ts-expect-error because this.globalFlags is typed as a plain object
|
|
52
|
+
delete this.globalFlags?.json;
|
|
53
|
+
this.flags = {}; // force the flags setter to run
|
|
54
|
+
// @ts-expect-error because this.flags is typed as a plain object
|
|
55
|
+
delete this.flags?.json;
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
static get globalFlags() {
|
|
51
59
|
return this._globalFlags;
|