yargs 10.0.2 → 10.0.3

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 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="10.0.3"></a>
6
+ ## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685))
12
+
13
+
14
+
5
15
  <a name="10.0.2"></a>
6
16
  ## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21)
7
17
 
package/lib/command.js CHANGED
@@ -318,15 +318,16 @@ module.exports = function command (yargs, usage, validation) {
318
318
 
319
319
  const unparsed = []
320
320
  Object.keys(positionalMap).forEach((key) => {
321
- [].push.apply(unparsed, positionalMap[key].map((value) => {
322
- return `--${key} ${value}`
323
- }))
321
+ positionalMap[key].map((value) => {
322
+ unparsed.push(`--${key}`)
323
+ unparsed.push(value)
324
+ })
324
325
  })
325
326
 
326
327
  // short-circuit parse.
327
328
  if (!unparsed.length) return
328
329
 
329
- const parsed = Parser.detailed(unparsed.join(' '), options)
330
+ const parsed = Parser.detailed(unparsed, options)
330
331
 
331
332
  if (parsed.error) {
332
333
  yargs.getUsageInstance().fail(parsed.error.message, parsed.error)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yargs",
3
- "version": "10.0.2",
3
+ "version": "10.0.3",
4
4
  "description": "yargs the modern, pirate-themed, successor to optimist.",
5
5
  "main": "./index.js",
6
6
  "files": [