Comparing version 0.1.3 to 0.1.4
@@ -5,2 +5,8 @@ # commandos Change Log | ||
## [0.1.5] - Jan 3, 2018 | ||
### Fixed | ||
Fixed the bug in __commandos.parse__ that non-option arguments taken by named options are not excluded from the `$` array. | ||
## [0.1.4] - Jan 3, 2018 | ||
@@ -7,0 +13,0 @@ |
@@ -15,3 +15,3 @@ { | ||
"name": "commandos", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "index.js", | ||
@@ -18,0 +18,0 @@ "keywords": [ |
@@ -326,3 +326,3 @@ 'use strict'; | ||
// 在依据选项定义的 nonOption 属性消费余项之前,需要先删除已被其他选项显式占用的余项。 | ||
parsedOptions.$ = raw.$.filter(v => v !== null); | ||
raw.$ = raw.$.filter(v => v !== null); | ||
@@ -339,8 +339,8 @@ for (let I = 0; I < def.options.length; I++) { | ||
let matchedIndexes = []; | ||
for (let i = 0, $i; i < parsedOptions.$.length; i++) { | ||
$i = parsedOptions.$[i]; | ||
for (let i = 0, $i; i < raw.$.length; i++) { | ||
$i = raw.$[i]; | ||
if ($i === null) continue; | ||
if (column.nonOption($i, i)) { | ||
// 将匹配项中余项数组中剥离。 | ||
parsedOptions.$[i] = null; | ||
raw.$[i] = null; | ||
@@ -533,2 +533,3 @@ found = true; | ||
} | ||
return parsedOptions; | ||
@@ -535,0 +536,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44500
0