yargs
Advanced tools
Comparing version 17.0.0 to 17.0.1
@@ -426,8 +426,3 @@ import { assertNotStrictEqual, } from './typings/common-types.js'; | ||
function isCommandAndAliases(cmd) { | ||
if (cmd.every(c => typeof c === 'string')) { | ||
return true; | ||
} | ||
else { | ||
return false; | ||
} | ||
return cmd.every(c => typeof c === 'string'); | ||
} | ||
@@ -434,0 +429,0 @@ export function isCommandBuilderCallback(builder) { |
@@ -33,3 +33,3 @@ import { argsert } from './argsert.js'; | ||
this.globalMiddleware = this.globalMiddleware.filter(m => { | ||
const toCheck = [...(aliases[option] ? aliases[option] : []), option]; | ||
const toCheck = [...(aliases[option] || []), option]; | ||
if (!m.option) | ||
@@ -36,0 +36,0 @@ return true; |
@@ -7,10 +7,5 @@ import { isPromise } from './is-promise.js'; | ||
const result = isFunction(getResult) ? getResult() : getResult; | ||
if (isPromise(result)) { | ||
return result.then((result) => { | ||
return resultHandler(result); | ||
}); | ||
} | ||
else { | ||
return resultHandler(result); | ||
} | ||
return isPromise(result) | ||
? result.then((result) => resultHandler(result)) | ||
: resultHandler(result); | ||
} | ||
@@ -17,0 +12,0 @@ catch (err) { |
@@ -124,9 +124,3 @@ import { argsert } from './argsert.js'; | ||
const newAliases = yargs.parsed.newAliases; | ||
for (const a of [key, ...aliases[key]]) { | ||
if (!Object.prototype.hasOwnProperty.call(newAliases, a) || | ||
!newAliases[key]) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); | ||
}; | ||
@@ -133,0 +127,0 @@ self.limitedChoices = function limitedChoices(argv) { |
@@ -5,2 +5,9 @@ # Changelog | ||
### [17.0.1](https://www.github.com/yargs/yargs/compare/v17.0.0...v17.0.1) (2021-05-03) | ||
### Bug Fixes | ||
* **build:** Node 12 is now minimum version ([#1936](https://www.github.com/yargs/yargs/issues/1936)) ([0924566](https://www.github.com/yargs/yargs/commit/09245666e57facb140e0b45a9e45ca704883e5dd)) | ||
## [17.0.0](https://www.github.com/yargs/yargs/compare/v16.2.0...v17.0.0) (2021-05-02) | ||
@@ -7,0 +14,0 @@ |
{ | ||
"name": "yargs", | ||
"version": "17.0.0", | ||
"version": "17.0.1", | ||
"description": "yargs the modern, pirate-themed, successor to optimist.", | ||
@@ -5,0 +5,0 @@ "main": "./index.cjs", |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
273125
13
4896