Socket
Socket
Sign inDemoInstall

yargs

Package Overview
Dependencies
15
Maintainers
2
Versions
250
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 17.0.0 to 17.0.1

7

build/lib/command.js

@@ -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) {

2

build/lib/middleware.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc