Projekt

Obecné

Profil

Stáhnout (15 KB) Statistiky
| Větev: | Revize:
1
# Change Log
2

    
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

    
5
<a name="11.1.1"></a>
6
## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19)
7

    
8

    
9
### Bug Fixes
10

    
11
* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98))
12

    
13

    
14
### Reverts
15

    
16
* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063))
17

    
18

    
19

    
20
<a name="11.1.0"></a>
21
# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10)
22

    
23

    
24
### Bug Fixes
25

    
26
* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31))
27

    
28

    
29
### Features
30

    
31
* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce))
32

    
33

    
34

    
35
<a name="11.0.0"></a>
36
# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06)
37

    
38

    
39
### Bug Fixes
40

    
41
* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f))
42
* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da))
43
* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4))
44

    
45

    
46
### Chores
47

    
48
* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1))
49

    
50

    
51
### Features
52

    
53
* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117))
54
* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce))
55

    
56

    
57
### BREAKING CHANGES
58

    
59
* drops Node 4 support
60
* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction.
61

    
62

    
63

    
64
<a name="10.1.0"></a>
65
# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29)
66

    
67

    
68
### Features
69

    
70
* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee))
71

    
72

    
73

    
74
<a name="10.0.0"></a>
75
# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04)
76

    
77

    
78
### Bug Fixes
79

    
80
* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599))
81

    
82

    
83
### BREAKING CHANGES
84

    
85
* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg.
86

    
87
Previous behavior:
88
```js
89
var parse = require('yargs-parser');
90

    
91
parse('--flag', {boolean: ['flag']});
92
// => { _: [], flag: true }
93

    
94
parse('--no-flag', {boolean: ['flag']});
95
// => { _: [], flag: false }
96

    
97
parse('', {boolean: ['flag']});
98
// => { _: [], flag: false }
99
```
100

    
101
New behavior:
102
```js
103
var parse = require('yargs-parser');
104

    
105
parse('--flag', {boolean: ['flag']});
106
// => { _: [], flag: true }
107

    
108
parse('--no-flag', {boolean: ['flag']});
109
// => { _: [], flag: false }
110

    
111
parse('', {boolean: ['flag']});
112
// => { _: [] } => flag not set similarly to other option type
113
```
114

    
115

    
116

    
117
<a name="9.0.2"></a>
118
## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20)
119

    
120

    
121
### Bug Fixes
122

    
123
* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad))
124

    
125

    
126

    
127
<a name="9.0.1"></a>
128
## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20)
129

    
130

    
131
### Bug Fixes
132

    
133
* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206))
134

    
135

    
136

    
137
<a name="9.0.0"></a>
138
# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20)
139

    
140

    
141
### Features
142

    
143
* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3))
144

    
145

    
146
### BREAKING CHANGES
147

    
148
* arguments of form --foo, -abc, will no longer be consumed by nargs
149

    
150

    
151

    
152
<a name="8.1.0"></a>
153
# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20)
154

    
155

    
156
### Bug Fixes
157

    
158
* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9))
159
* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c))
160
* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d))
161
* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef))
162
* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57))
163
* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9))
164

    
165

    
166
### Features
167

    
168
* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536))
169
* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6))
170

    
171

    
172

    
173
<a name="8.0.0"></a>
174
# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05)
175

    
176

    
177
### Bug Fixes
178

    
179
* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227))
180

    
181

    
182
### Features
183

    
184
* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d))
185
* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb))
186

    
187

    
188
### BREAKING CHANGES
189

    
190
* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. 
191

    
192

    
193

    
194
<a name="7.0.0"></a>
195
# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02)
196

    
197

    
198
### Chores
199

    
200
* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d))
201

    
202

    
203
### BREAKING CHANGES
204

    
205
* populate-- now defaults to false.
206

    
207

    
208

    
209
<a name="6.0.1"></a>
210
## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01)
211

    
212

    
213
### Bug Fixes
214

    
215
* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc))
216

    
217

    
218

    
219
<a name="6.0.0"></a>
220
# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01)
221

    
222

    
223
### Bug Fixes
224

    
225
* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f))
226
* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62))
227

    
228

    
229
### Chores
230

    
231
* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa))
232

    
233

    
234
### Features
235

    
236
* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8))
237
* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db))
238

    
239

    
240
### BREAKING CHANGES
241

    
242
* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default.
243
* camelcase now requires Node 4+.
244
* environment variables will now override config files (args, env, config-file, config-object)
245

    
246

    
247

    
248
<a name="5.0.0"></a>
249
# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18)
250

    
251

    
252
### Bug Fixes
253

    
254
* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f))
255

    
256

    
257
### BREAKING CHANGES
258

    
259
* environment variables will now override config files (args, env, config-file, config-object)
260

    
261

    
262

    
263
<a name="4.2.1"></a>
264
## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02)
265

    
266

    
267
### Bug Fixes
268

    
269
* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0))
270

    
271

    
272

    
273
<a name="4.2.0"></a>
274
# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01)
275

    
276

    
277
### Bug Fixes
278

    
279
* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9))
280

    
281

    
282
### Features
283

    
284
* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d))
285

    
286

    
287

    
288
<a name="4.1.0"></a>
289
# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07)
290

    
291

    
292
### Features
293

    
294
* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b))
295
* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545))
296

    
297

    
298

    
299
<a name="4.0.2"></a>
300
## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30)
301

    
302

    
303
### Bug Fixes
304

    
305
* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a))
306

    
307

    
308

    
309
<a name="4.0.1"></a>
310
## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30)
311

    
312

    
313
### Bug Fixes
314

    
315
* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11))
316

    
317

    
318

    
319
<a name="4.0.0"></a>
320
# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26)
321

    
322

    
323
### Bug Fixes
324

    
325
* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da))
326

    
327

    
328
### BREAKING CHANGES
329

    
330
* coerce is no longer applied to individual arguments in an implicit array.
331

    
332

    
333

    
334
<a name="3.2.0"></a>
335
# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13)
336

    
337

    
338
### Features
339

    
340
* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56))
341

    
342

    
343

    
344
<a name="3.1.0"></a>
345
# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09)
346

    
347

    
348
### Bug Fixes
349

    
350
* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6))
351
* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692))
352
* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616))
353

    
354

    
355
### Features
356

    
357
* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2))
358

    
359

    
360

    
361
<a name="3.0.0"></a>
362
# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07)
363

    
364

    
365
### Bug Fixes
366

    
367
* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236))
368
* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4))
369

    
370
### BREAKING CHANGES
371

    
372
* subtle change to how values are parsed in a group of single-character arguments.
373
* _first released in 3.1.0, better handling of negative values should be considered a breaking change._
374

    
375

    
376

    
377
<a name="2.4.1"></a>
378
## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16)
379

    
380

    
381
### Bug Fixes
382

    
383
* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189))
384

    
385

    
386

    
387
<a name="2.4.0"></a>
388
# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11)
389

    
390

    
391
### Features
392

    
393
* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b))
394

    
395

    
396

    
397
<a name="2.3.0"></a>
398
# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09)
399

    
400

    
401
### Bug Fixes
402

    
403
* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20)
404
* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d))
405
* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165))
406
* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6))
407
* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5))
408

    
409
### Features
410

    
411
* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900))
412
* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a))
(1-1/4)