Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yargs

Package Overview
Dependencies
Maintainers
2
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs - npm Package Compare versions

Comparing version 17.4.1 to 17.5.0

11

build/lib/completion.js

@@ -73,3 +73,3 @@ import { isCommandBuilderCallback } from './command.js';

!options.hiddenOptions.includes(key) &&
!this.argsContainKey(args, argv, key, negable)) {
!this.argsContainKey(args, key, negable)) {
this.completeOptionKey(key, completions, current);

@@ -143,10 +143,11 @@ if (negable && !!options.default[key])

}
argsContainKey(args, argv, key, negable) {
if (args.indexOf(`--${key}`) !== -1)
argsContainKey(args, key, negable) {
const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1;
if (argsContains(key))
return true;
if (negable && args.indexOf(`--no-${key}`) !== -1)
if (negable && argsContains(`no-${key}`))
return true;
if (this.aliases) {
for (const alias of this.aliases[key]) {
if (argv[alias] !== undefined)
if (argsContains(alias))
return true;

@@ -153,0 +154,0 @@ }

@@ -5,4 +5,6 @@ export class YError extends Error {

this.name = 'YError';
Error.captureStackTrace(this, YError);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, YError);
}
}
}
{
"name": "yargs",
"version": "17.4.1",
"version": "17.5.0",
"description": "yargs the modern, pirate-themed, successor to optimist.",

@@ -19,4 +19,9 @@ "main": "./index.cjs",

},
"./browser": {
"import": "./browser.mjs",
"types": "./browser.d.ts"
},
"./yargs": [
{
"import": "./yargs.mjs",
"require": "./yargs"

@@ -23,0 +28,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc