@oclif/core 1.13.2 → 1.13.5

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
@@ -2,6 +2,27 @@
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.5](https://github.com/oclif/core/compare/v1.13.4...v1.13.5) (2022-08-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * skip loadDevPlugins ([#459](https://github.com/oclif/core/issues/459)) ([21c948c](https://github.com/oclif/core/commit/21c948cd41b08b3aad4df5c3439d33e235f6979e))
11
+
12
+ ### [1.13.4](https://github.com/oclif/core/compare/v1.13.3...v1.13.4) (2022-08-08)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * retain enable json flag get/set apply flag at parse ([#460](https://github.com/oclif/core/issues/460)) ([9812937](https://github.com/oclif/core/commit/9812937e43a573cf4a10d4b03fca47555de5a1d9))
18
+
19
+ ### [1.13.3](https://github.com/oclif/core/compare/v1.13.2...v1.13.3) (2022-08-06)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * improve flag types ([6d0b4e1](https://github.com/oclif/core/commit/6d0b4e1f1761baba0e085ea8d342a7bc913e7e5d))
25
+
5
26
  ### [1.13.2](https://github.com/oclif/core/compare/v1.13.1...v1.13.2) (2022-08-05)
6
27
 
7
28
 
package/lib/command.js CHANGED
@@ -44,8 +44,15 @@ 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-ignore
52
+ delete this.globalFlags.json;
53
+ // @ts-ignore
54
+ delete this.flags.json;
55
+ }
49
56
  }
50
57
  static get globalFlags() {
51
58
  return this._globalFlags;
@@ -150,16 +150,18 @@ class Config {
150
150
  }
151
151
  }
152
152
  async loadDevPlugins() {
153
- // do not load oclif.devPlugins in production
154
- if (this.isProd)
155
- return;
156
- try {
157
- const devPlugins = this.pjson.oclif.devPlugins;
158
- if (devPlugins)
159
- await this.loadPlugins(this.root, 'dev', devPlugins);
160
- }
161
- catch (error) {
162
- process.emitWarning(error);
153
+ if (this.options.devPlugins !== false) {
154
+ // do not load oclif.devPlugins in production
155
+ if (this.isProd)
156
+ return;
157
+ try {
158
+ const devPlugins = this.pjson.oclif.devPlugins;
159
+ if (devPlugins)
160
+ await this.loadPlugins(this.root, 'dev', devPlugins);
161
+ }
162
+ catch (error) {
163
+ process.emitWarning(error);
164
+ }
163
165
  }
164
166
  }
165
167
  async loadUserPlugins() {
@@ -194,9 +194,7 @@ export declare type CompletableOptionFlag<T> = OptionFlag<T> & {
194
194
  completion?: Completion;
195
195
  };
196
196
  export declare type CompletableFlag<T> = BooleanFlag<T> | CompletableOptionFlag<T>;
197
- export declare type FlagInput<T extends FlagOutput = {
198
- [flag: string]: unknown;
199
- }> = {
197
+ export declare type FlagInput<T extends FlagOutput = object> = {
200
198
  [P in keyof T]: CompletableFlag<T[P]>;
201
199
  };
202
200
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "1.13.2",
4
+ "version": "1.13.5",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {