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

yargs-parser

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs-parser - npm Package Compare versions

Comparing version 17.0.1 to 17.1.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01)
### Features
* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb))
### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29)

@@ -7,0 +14,0 @@

18

index.js

@@ -16,18 +16,19 @@ const camelCase = require('camelcase')

const configuration = Object.assign({
'short-option-groups': true,
'boolean-negation': true,
'camel-case-expansion': true,
'combine-arrays': false,
'dot-notation': true,
'parse-numbers': true,
'boolean-negation': true,
'negation-prefix': 'no-',
'duplicate-arguments-array': true,
'flatten-duplicate-arrays': true,
'greedy-arrays': true,
'halt-at-non-option': false,
'nargs-eats-options': false,
'negation-prefix': 'no-',
'parse-numbers': true,
'populate--': false,
'combine-arrays': false,
'set-placeholder-key': false,
'halt-at-non-option': false,
'short-option-groups': true,
'strip-aliased': false,
'strip-dashed': false,
'unknown-options-as-args': false,
'nargs-eats-options': false
'unknown-options-as-args': false
}, opts.configuration)

@@ -416,2 +417,3 @@ const defaults = Object.assign(Object.create(null), opts.default)

argsToSet.push(processValue(key, next))
if (!configuration['greedy-arrays']) break
}

@@ -418,0 +420,0 @@ }

{
"name": "yargs-parser",
"version": "17.0.1",
"version": "17.1.0",
"description": "the mighty option parser used by yargs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -268,2 +268,23 @@ # yargs-parser

### greedy arrays
* default: `true`
* key: `greedy-arrays`
Should arrays consume more than one positional argument following their flag.
```sh
node example --arr 1 2
{ _[], arr: [1, 2] }
```
_if disabled:_
```sh
node example --arr 1 2
{ _[2], arr: [1] }
```
**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.**
### nargs eats options

@@ -270,0 +291,0 @@

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