Comparing version 15.3.0 to 15.3.1-beta.0
{ | ||
"name": "yargs", | ||
"version": "15.3.0", | ||
"version": "15.3.1-beta.0", | ||
"description": "yargs the modern, pirate-themed, successor to optimist.", | ||
@@ -32,3 +32,3 @@ "main": "./index.js", | ||
"y18n": "^4.0.0", | ||
"yargs-parser": "^18.1.0" | ||
"yargs-parser": "^18.1.1-beta.0" | ||
}, | ||
@@ -39,2 +39,3 @@ "devDependencies": { | ||
"chalk": "^3.0.0", | ||
"coveralls": "^3.0.9", | ||
"cpr": "^3.0.1", | ||
@@ -41,0 +42,0 @@ "cross-spawn": "^7.0.0", |
11
yargs.js
@@ -262,2 +262,3 @@ 'use strict' | ||
keys.forEach((key) => { | ||
key = sanitizeKey(key) | ||
options[type].push(key) | ||
@@ -318,4 +319,4 @@ }) | ||
if (Array.isArray(key)) { | ||
const temp = Object.create(null) | ||
// an array of keys with one value ['x', 'y', 'z'], function parse () {} | ||
const temp = {} | ||
key.forEach((k) => { | ||
@@ -331,2 +332,3 @@ temp[k] = value | ||
} else { | ||
key = sanitizeKey(key) | ||
// a single key value pair 'x', parse() {} | ||
@@ -341,2 +343,9 @@ if (isArray) { | ||
// TODO(bcoe): in future major versions move more objects towards | ||
// Object.create(null): | ||
function sanitizeKey (key) { | ||
if (key === '__proto__') return '___proto___' | ||
return key | ||
} | ||
function deleteFromParserHintObject (optionKey) { | ||
@@ -343,0 +352,0 @@ // delete from all parsing hints: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181714
3928
13
1
Updatedyargs-parser@^18.1.1-beta.0