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 16.0.0-beta.1 to 16.0.0-beta.2

4

build/lib/validation.js

@@ -62,3 +62,3 @@ import { argsert } from './argsert.js';

};
self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand) {
self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) {
const commandKeys = yargs.getCommandInstance().getCommands();

@@ -75,3 +75,3 @@ const unknown = [];

});
if ((currentContext.commands.length > 0) || (commandKeys.length > 0) || isDefaultCommand) {
if (checkPositionals && ((currentContext.commands.length > 0) || (commandKeys.length > 0) || isDefaultCommand)) {
argv._.slice(currentContext.commands.length).forEach((key) => {

@@ -78,0 +78,0 @@ if (commandKeys.indexOf('' + key) === -1) {

@@ -116,2 +116,3 @@ import { command as Command } from './command.js';

strictCommands,
strictOptions,
completionCommand,

@@ -145,2 +146,3 @@ output,

strictCommands,
strictOptions,
completionCommand,

@@ -709,2 +711,9 @@ parseFn,

self.getStrictCommands = () => strictCommands;
let strictOptions = false;
self.strictOptions = function (enabled) {
argsert('[boolean]', [enabled], arguments.length);
strictOptions = enabled !== false;
return self;
};
self.getStrictOptions = () => strictOptions;
let parserConfig = {};

@@ -1050,2 +1059,5 @@ self.parserConfiguration = function parserConfiguration(config) {

}
else if (strictOptions) {
validation.unknownArguments(argv, aliases, {}, false, false);
}
validation.customChecks(argv, aliases);

@@ -1052,0 +1064,0 @@ validation.limitedChoices(argv);

{
"name": "yargs",
"version": "16.0.0-beta.1",
"version": "16.0.0-beta.2",
"description": "yargs the modern, pirate-themed, successor to optimist.",

@@ -15,3 +15,3 @@ "main": "./index.cjs",

"./yargs": {
"require": "./build/index.cjs"
"require": "./yargs.cjs"
}

@@ -32,2 +32,3 @@ },

"index.mjs",
"yargs.mjs",
"build",

@@ -45,3 +46,3 @@ "locales",

"string-width": "^4.2.0",
"y18n": "^4.0.0",
"y18n": "^5.0.1",
"yargs-parser": "^19.0.4"

@@ -99,4 +100,2 @@ },

"build",
"index.cjs",
"yargs.cjs",
"**/example/**"

@@ -103,0 +102,0 @@ ]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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