yargs-parser
Advanced tools
Comparing version 19.0.4 to 20.0.0
@@ -34,3 +34,3 @@ export function camelCase(str) { | ||
const chrString = str.charAt(i); | ||
if (chrLower !== chrString) { | ||
if (chrLower !== chrString && i > 0) { | ||
notCamelcase += `${joinString}${lowercase.charAt(i)}`; | ||
@@ -37,0 +37,0 @@ } |
@@ -385,3 +385,3 @@ import { tokenizeArgString } from './tokenize-arg-string.js'; | ||
[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { | ||
if (configuration['camel-case-expansion']) { | ||
if (configuration['camel-case-expansion'] && alias.includes('-')) { | ||
delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; | ||
@@ -388,0 +388,0 @@ } |
@@ -5,2 +5,18 @@ # Changelog | ||
## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09) | ||
### ⚠ BREAKING CHANGES | ||
* do not ship type definitions (#318) | ||
### Bug Fixes | ||
* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315) | ||
### Code Refactoring | ||
* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330)) | ||
### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27) | ||
@@ -7,0 +23,0 @@ |
{ | ||
"name": "yargs-parser", | ||
"version": "19.0.4", | ||
"version": "20.0.0", | ||
"description": "the mighty option parser used by yargs", | ||
@@ -12,3 +12,2 @@ "main": "build/index.cjs", | ||
"module": "./build/lib/index.js", | ||
"types": "./build/index.cjs.d.ts", | ||
"scripts": { | ||
@@ -74,3 +73,4 @@ "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", | ||
"browser.js", | ||
"build" | ||
"build", | ||
"!*.d.ts" | ||
], | ||
@@ -77,0 +77,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
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
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
116381
12
2196