@oclif/core 4.3.1 → 4.3.2

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/lib/command.js CHANGED
@@ -227,7 +227,7 @@ class Command {
227
227
  */
228
228
  jsonEnabled() {
229
229
  // If the command doesn't support json, return false
230
- if (!this.ctor.enableJsonFlag)
230
+ if (!this.ctor?.enableJsonFlag)
231
231
  return false;
232
232
  // If the CONTENT_TYPE env var is set to json, return true
233
233
  if (this.config.scopedEnvVar?.('CONTENT_TYPE')?.toLowerCase() === 'json')
package/lib/flags.js CHANGED
@@ -14,7 +14,7 @@ function custom(defaults) {
14
14
  ...defaults,
15
15
  ...options,
16
16
  input: [],
17
- multiple: Boolean(options.multiple === undefined ? defaults?.multiple ?? false : options.multiple),
17
+ multiple: Boolean(options.multiple === undefined ? (defaults?.multiple ?? false) : options.multiple),
18
18
  type: 'option',
19
19
  });
20
20
  }
@@ -269,6 +269,7 @@ class Parser {
269
269
  ...context,
270
270
  error: context?.error,
271
271
  exit: context?.exit,
272
+ jsonEnabled: context?.jsonEnabled,
272
273
  log: context?.log,
273
274
  logToStderr: context?.logToStderr,
274
275
  token,
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": "4.3.1",
4
+ "version": "4.3.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {