yargs 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/lib/validation.js +4 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
<a name="9.0.1"></a>
|
|
6
|
+
## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
<a name="9.0.0"></a>
|
|
6
16
|
# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03)
|
|
7
17
|
|
package/lib/validation.js
CHANGED
|
@@ -249,6 +249,7 @@ module.exports = function validation (yargs, usage, y18n) {
|
|
|
249
249
|
;(implied[key] || []).forEach((value) => {
|
|
250
250
|
let num
|
|
251
251
|
let key = origKey
|
|
252
|
+
const origValue = value
|
|
252
253
|
|
|
253
254
|
// convert string '1' to number 1
|
|
254
255
|
num = Number(key)
|
|
@@ -278,7 +279,7 @@ module.exports = function validation (yargs, usage, y18n) {
|
|
|
278
279
|
value = argv[value]
|
|
279
280
|
}
|
|
280
281
|
if (key && !value) {
|
|
281
|
-
implyFail.push(origKey)
|
|
282
|
+
implyFail.push(` ${origKey} -> ${origValue}`)
|
|
282
283
|
}
|
|
283
284
|
})
|
|
284
285
|
})
|
|
@@ -286,12 +287,8 @@ module.exports = function validation (yargs, usage, y18n) {
|
|
|
286
287
|
if (implyFail.length) {
|
|
287
288
|
let msg = `${__('Implications failed:')}\n`
|
|
288
289
|
|
|
289
|
-
implyFail.forEach((
|
|
290
|
-
|
|
291
|
-
implied[key].forEach((value) => {
|
|
292
|
-
msg += (` ${key} -> ${value}`)
|
|
293
|
-
})
|
|
294
|
-
}
|
|
290
|
+
implyFail.forEach((value) => {
|
|
291
|
+
msg += (value)
|
|
295
292
|
})
|
|
296
293
|
|
|
297
294
|
usage.fail(msg)
|