@oclif/core
Advanced tools
Comparing version 0.5.37 to 0.5.38
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.38](https://github.com/oclif/core/compare/v0.5.37...v0.5.38) (2021-09-15) | ||
### Features | ||
* have --json global flag disabled by default ([#252](https://github.com/oclif/core/issues/252)) ([c2a7799](https://github.com/oclif/core/commit/c2a7799ce036697c77917a830a12bce5db6c68a7)) | ||
### [0.5.37](https://github.com/oclif/core/compare/v0.5.36...v0.5.37) (2021-09-15) | ||
@@ -7,0 +14,0 @@ |
@@ -57,3 +57,3 @@ import * as Interfaces from './interfaces'; | ||
static parserOptions: {}; | ||
static disableJsonFlag: boolean | undefined; | ||
static enableJsonFlag: boolean; | ||
/** | ||
@@ -60,0 +60,0 @@ * instantiate and run the command |
@@ -41,3 +41,3 @@ "use strict"; | ||
static set flags(flags) { | ||
this._flags = this.disableJsonFlag || settings_1.settings.disableJsonFlag ? flags : Object.assign({}, Command.globalFlags, flags); | ||
this._flags = this.enableJsonFlag || settings_1.settings.enableJsonFlag ? Object.assign({}, Command.globalFlags, flags) : flags; | ||
} | ||
@@ -85,3 +85,3 @@ get ctor() { | ||
jsonEnabled() { | ||
return !this.ctor.disableJsonFlag && this.argv.includes('--json'); | ||
return this.ctor.enableJsonFlag && this.argv.includes('--json'); | ||
} | ||
@@ -154,2 +154,3 @@ async init() { | ||
Command.parserOptions = {}; | ||
Command.enableJsonFlag = false; | ||
// eslint-disable-next-line valid-jsdoc | ||
@@ -156,0 +157,0 @@ /** |
@@ -34,6 +34,6 @@ export declare type Settings = { | ||
/** | ||
* Disable the --json flag for all commands | ||
* Enable the --json flag for all commands | ||
*/ | ||
disableJsonFlag?: boolean; | ||
enableJsonFlag?: boolean; | ||
}; | ||
export declare const settings: Settings; |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "0.5.37", | ||
"version": "0.5.38", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208242
5192