yargs 16.1.0 → 16.1.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 -296
- package/README.md +2 -2
- package/build/lib/yargs-factory.js +1 -1
- package/helpers/helpers.mjs +10 -0
- package/helpers/index.js +14 -0
- package/helpers/package.json +3 -0
- package/package.json +7 -5
- package/yargs +1 -1
- package/helpers.mjs +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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
|
+
### [16.1.1](https://www.github.com/yargs/yargs/compare/v16.1.0...v16.1.1) (2020-11-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* expose helpers for legacy versions of Node.js ([#1801](https://www.github.com/yargs/yargs/issues/1801)) ([107deaa](https://www.github.com/yargs/yargs/commit/107deaa4f68b7bc3f2386041e1f4fe0272b29c0a))
|
|
11
|
+
* **deno:** get yargs working on deno@1.5.x ([#1799](https://www.github.com/yargs/yargs/issues/1799)) ([cb01c98](https://www.github.com/yargs/yargs/commit/cb01c98c44e30f55c2dc9434caef524ae433d9a4))
|
|
12
|
+
|
|
5
13
|
## [16.1.0](https://www.github.com/yargs/yargs/compare/v16.0.3...v16.1.0) (2020-10-15)
|
|
6
14
|
|
|
7
15
|
|
|
@@ -65,299 +73,5 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
65
73
|
|
|
66
74
|
* **yargs:** add missing command(module) signature ([#1707](https://www.github.com/yargs/yargs/issues/1707)) ([0f81024](https://www.github.com/yargs/yargs/commit/0f810245494ccf13a35b7786d021b30fc95ecad5)), closes [#1704](https://www.github.com/yargs/yargs/issues/1704)
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### Features
|
|
73
|
-
|
|
74
|
-
* adds deprecation option for commands ([027a636](https://www.github.com/yargs/yargs/commit/027a6365b737e13116811a8ef43670196e1fa00a))
|
|
75
|
-
* support array of examples ([#1682](https://www.github.com/yargs/yargs/issues/1682)) ([225ab82](https://www.github.com/yargs/yargs/commit/225ab8271938bed3a48d23175f3d580ce8cd1306))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Bug Fixes
|
|
79
|
-
|
|
80
|
-
* **docs:** describe usage of `.check()` in more detail ([932cd11](https://www.github.com/yargs/yargs/commit/932cd1177e93f5cc99edfe57a4028e30717bf8fb))
|
|
81
|
-
* **i18n:** Japanese translation phrasing ([#1619](https://www.github.com/yargs/yargs/issues/1619)) ([0894175](https://www.github.com/yargs/yargs/commit/089417550ef5a5b8ce3578dd2a989191300b64cd))
|
|
82
|
-
* **strict mode:** report default command unknown arguments ([#1626](https://www.github.com/yargs/yargs/issues/1626)) ([69f29a9](https://www.github.com/yargs/yargs/commit/69f29a9cd429d4bb99481238305390107ac75b02))
|
|
83
|
-
* **usage:** translate 'options' group only when displaying help ([#1600](https://www.github.com/yargs/yargs/issues/1600)) ([e60b39b](https://www.github.com/yargs/yargs/commit/e60b39b9d3a912c06db43f87c86ba894142b6c1c))
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### Reverts
|
|
87
|
-
|
|
88
|
-
* Revert "chore(deps): update dependency eslint to v7 (#1656)" (#1673) ([34949f8](https://www.github.com/yargs/yargs/commit/34949f89ee7cdf88f7b315659df4b5f62f714842)), closes [#1656](https://www.github.com/yargs/yargs/issues/1656) [#1673](https://www.github.com/yargs/yargs/issues/1673)
|
|
89
|
-
|
|
90
|
-
### [15.3.1](https://www.github.com/yargs/yargs/compare/v15.3.0...v15.3.1) (2020-03-16)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Bug Fixes
|
|
94
|
-
|
|
95
|
-
* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential
|
|
96
|
-
prototype pollution vulnerability. This was reported by the Snyk Security Research Team. ([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2))
|
|
97
|
-
|
|
98
|
-
## [15.3.0](https://www.github.com/yargs/yargs/compare/v15.2.0...v15.3.0) (2020-03-08)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Features
|
|
102
|
-
|
|
103
|
-
* **yargs-parser:** introduce single-digit boolean aliases ([#1576](https://www.github.com/yargs/yargs/issues/1576)) ([3af7f04](https://www.github.com/yargs/yargs/commit/3af7f04cdbfcbd4b3f432aca5144d43f21958c39))
|
|
104
|
-
* add usage for single-digit boolean aliases ([#1580](https://www.github.com/yargs/yargs/issues/1580)) ([6014e39](https://www.github.com/yargs/yargs/commit/6014e39bca3a1e8445aa0fb2a435f6181e344c45))
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### Bug Fixes
|
|
108
|
-
|
|
109
|
-
* address ambiguity between nargs of 1 and requiresArg ([#1572](https://www.github.com/yargs/yargs/issues/1572)) ([a5edc32](https://www.github.com/yargs/yargs/commit/a5edc328ecb3f90d1ba09cfe70a0040f68adf50a))
|
|
110
|
-
|
|
111
|
-
## [15.2.0](https://www.github.com/yargs/yargs/compare/v15.1.0...v15.2.0) (2020-03-01)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### ⚠ BREAKING CHANGES
|
|
115
|
-
|
|
116
|
-
* **deps:** yargs-parser@17.0.0 no longer implicitly creates arrays out of boolean
|
|
117
|
-
arguments when duplicates are provided
|
|
118
|
-
|
|
119
|
-
### Features
|
|
120
|
-
|
|
121
|
-
* **completion:** takes negated flags into account when boolean-negation is set ([#1509](https://www.github.com/yargs/yargs/issues/1509)) ([7293ad5](https://www.github.com/yargs/yargs/commit/7293ad50d20ea0fb7dd1ac9b925e90e1bd95dea8))
|
|
122
|
-
* **deps:** pull in yargs-parser@17.0.0 ([#1553](https://www.github.com/yargs/yargs/issues/1553)) ([b9409da](https://www.github.com/yargs/yargs/commit/b9409da199ebca515a848489c206b807fab2e65d))
|
|
123
|
-
* deprecateOption ([#1559](https://www.github.com/yargs/yargs/issues/1559)) ([8aae333](https://www.github.com/yargs/yargs/commit/8aae3332251d09fa136db17ef4a40d83fa052bc4))
|
|
124
|
-
* display appropriate $0 for electron apps ([#1536](https://www.github.com/yargs/yargs/issues/1536)) ([d0e4379](https://www.github.com/yargs/yargs/commit/d0e437912917d6a66bb5128992fa2f566a5f830b))
|
|
125
|
-
* introduces strictCommands() subset of strict mode ([#1540](https://www.github.com/yargs/yargs/issues/1540)) ([1d4cca3](https://www.github.com/yargs/yargs/commit/1d4cca395a98b395e6318f0505fc73bef8b01350))
|
|
126
|
-
* **deps:** yargs-parser with 'greedy-array' configuration ([#1569](https://www.github.com/yargs/yargs/issues/1569)) ([a03a320](https://www.github.com/yargs/yargs/commit/a03a320dbf5c0ce33d829a857fc04a651c0bb53e))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### Bug Fixes
|
|
130
|
-
|
|
131
|
-
* help always displayed for the first command parsed having an async handler ([#1535](https://www.github.com/yargs/yargs/issues/1535)) ([d585b30](https://www.github.com/yargs/yargs/commit/d585b303a43746201b05c9c9fda94a444634df33))
|
|
132
|
-
* **deps:** fix enumeration for normalized path arguments ([#1567](https://www.github.com/yargs/yargs/issues/1567)) ([0b5b1b0](https://www.github.com/yargs/yargs/commit/0b5b1b0e5f4f9baf393c48e9cc2bc85c1b67a47a))
|
|
133
|
-
* **locales:** only translate default option group name ([acc16de](https://www.github.com/yargs/yargs/commit/acc16de6b846ea7332db753646a9cec76b589162))
|
|
134
|
-
* **locales:** remove extra space in French for 'default' ([#1564](https://www.github.com/yargs/yargs/issues/1564)) ([ecfc2c4](https://www.github.com/yargs/yargs/commit/ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6))
|
|
135
|
-
* **translations:** add French translation for unknown command ([#1563](https://www.github.com/yargs/yargs/issues/1563)) ([18b0b75](https://www.github.com/yargs/yargs/commit/18b0b752424bf560271e670ff95a0f90c8386787))
|
|
136
|
-
* **translations:** fix pluralization in error messages. ([#1557](https://www.github.com/yargs/yargs/issues/1557)) ([94fa38c](https://www.github.com/yargs/yargs/commit/94fa38cbab8d86943e87bf41d368ed56dffa6835))
|
|
137
|
-
* **yargs:** correct support of bundled electron apps ([#1554](https://www.github.com/yargs/yargs/issues/1554)) ([a0b61ac](https://www.github.com/yargs/yargs/commit/a0b61ac21e2b554aa73dbf1a66d4a7af94047c2f))
|
|
138
|
-
|
|
139
|
-
## [15.1.0](https://www.github.com/yargs/yargs/compare/v15.0.2...v15.1.0) (2020-01-02)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Features
|
|
143
|
-
|
|
144
|
-
* **lang:** add Finnish localization (language code fi) ([222c8fe](https://www.github.com/yargs/yargs/commit/222c8fef2e2ad46e314c337dec96940f896bec35))
|
|
145
|
-
* complete short options with a single dash ([#1507](https://www.github.com/yargs/yargs/issues/1507)) ([99011ab](https://www.github.com/yargs/yargs/commit/99011ab5ba90232506ece0a17e59e2001a1ab562))
|
|
146
|
-
* onFinishCommand handler ([#1473](https://www.github.com/yargs/yargs/issues/1473)) ([fe380cd](https://www.github.com/yargs/yargs/commit/fe380cd356aa33aef0449facd59c22cab8930ac9))
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
### Bug Fixes
|
|
150
|
-
|
|
151
|
-
* getCompletion() was not working for options ([#1495](https://www.github.com/yargs/yargs/issues/1495)) ([463feb2](https://www.github.com/yargs/yargs/commit/463feb2870158eb9df670222b0f0a40a05cf18d0))
|
|
152
|
-
* misspelling of package.json `engines` field ([0891d0e](https://www.github.com/yargs/yargs/commit/0891d0ed35b30c83a6d9e9f6a5c5f84d13c546a0))
|
|
153
|
-
* populate positionals when unknown-options-as-args is set ([#1508](https://www.github.com/yargs/yargs/issues/1508)) ([bb0f2eb](https://www.github.com/yargs/yargs/commit/bb0f2eb996fa4e19d330b31a01c2036cafa99a7e)), closes [#1444](https://www.github.com/yargs/yargs/issues/1444)
|
|
154
|
-
* show 2 dashes on help for single digit option key or alias ([#1493](https://www.github.com/yargs/yargs/issues/1493)) ([63b3dd3](https://www.github.com/yargs/yargs/commit/63b3dd31a455d428902220c1992ae930e18aff5c))
|
|
155
|
-
* **docs:** use recommended cjs import syntax for ts examples ([#1513](https://www.github.com/yargs/yargs/issues/1513)) ([f9a18bf](https://www.github.com/yargs/yargs/commit/f9a18bfd624a5013108084f690cd8a1de794c430))
|
|
156
|
-
|
|
157
|
-
### [15.0.2](https://www.github.com/yargs/yargs/compare/v15.0.1...v15.0.2) (2019-11-19)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
### Bug Fixes
|
|
161
|
-
|
|
162
|
-
* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd))
|
|
163
|
-
|
|
164
|
-
### [15.0.1](https://www.github.com/yargs/yargs/compare/v15.0.0...v15.0.1) (2019-11-16)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
* **deps:** cliui, find-up, and string-width, all drop Node 6 support ([#1479](https://www.github.com/yargs/yargs/issues/1479)) ([6a9ebe2](https://www.github.com/yargs/yargs/commit/6a9ebe2d955e3e979e76c07ffbb1c17fef64cb49))
|
|
170
|
-
|
|
171
|
-
## [15.0.0](https://www.github.com/yargs/yargs/compare/v14.2.0...v15.0.0) (2019-11-10)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
### ⚠ BREAKING CHANGES
|
|
175
|
-
|
|
176
|
-
* **deps:** yargs-parser now throws on invalid combinations of config (#1470)
|
|
177
|
-
* yargs-parser@16.0.0 drops support for Node 6
|
|
178
|
-
* drop Node 6 support (#1461)
|
|
179
|
-
* remove package.json-based parserConfiguration (#1460)
|
|
180
|
-
|
|
181
|
-
### Features
|
|
182
|
-
|
|
183
|
-
* **deps:** yargs-parser now throws on invalid combinations of config ([#1470](https://www.github.com/yargs/yargs/issues/1470)) ([c10c38c](https://www.github.com/yargs/yargs/commit/c10c38cca04298f96b55a7e374a9a134abefffa7))
|
|
184
|
-
* expose `Parser` from `require('yargs/yargs')` ([#1477](https://www.github.com/yargs/yargs/issues/1477)) ([1840ba2](https://www.github.com/yargs/yargs/commit/1840ba22f1a24c0ece8e32bbd31db4134a080aee))
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
### Bug Fixes
|
|
188
|
-
|
|
189
|
-
* **docs:**
|
|
190
|
-
cript import to prevent a future major release warning ([#1441](https://www.github.com/yargs/yargs/issues/1441)) ([b1b156a](https://www.github.com/yargs/yargs/commit/b1b156a3eb4ddd6803fbbd56c611a77919293000))
|
|
191
|
-
* stop-parse was not being respected by commands ([#1459](https://www.github.com/yargs/yargs/issues/1459)) ([12c82e6](https://www.github.com/yargs/yargs/commit/12c82e62663e928148a7ee2f51629aa26a0f9bb2))
|
|
192
|
-
* update to yargs-parser with fix for array default values ([#1463](https://www.github.com/yargs/yargs/issues/1463)) ([ebee59d](https://www.github.com/yargs/yargs/commit/ebee59d9022da538410e69a5c025019ed46d13d2))
|
|
193
|
-
* **docs:** update boolean description and examples in docs ([#1474](https://www.github.com/yargs/yargs/issues/1474)) ([afd5b48](https://www.github.com/yargs/yargs/commit/afd5b4871bfeb90d58351ac56c5c44a83ef033e6))
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
### Miscellaneous Chores
|
|
197
|
-
|
|
198
|
-
* drop Node 6 support ([#1461](https://www.github.com/yargs/yargs/issues/1461)) ([2ba8ce0](https://www.github.com/yargs/yargs/commit/2ba8ce05e8fefbeffc6cb7488d9ebf6e86cceb1d))
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
### Code Refactoring
|
|
202
|
-
|
|
203
|
-
* remove package.json-based parserConfiguration ([#1460](https://www.github.com/yargs/yargs/issues/1460)) ([0d3642b](https://www.github.com/yargs/yargs/commit/0d3642b6f829b637938774c0c6ce5f6bfe1afa51))
|
|
204
|
-
|
|
205
|
-
## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### Bug Fixes
|
|
209
|
-
|
|
210
|
-
* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63))
|
|
211
|
-
* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2))
|
|
212
|
-
* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e))
|
|
213
|
-
* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e))
|
|
214
|
-
* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe))
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
### Features
|
|
218
|
-
|
|
219
|
-
* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520))
|
|
220
|
-
|
|
221
|
-
## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06)
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
### Bug Fixes
|
|
225
|
-
|
|
226
|
-
* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124))
|
|
227
|
-
* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13))
|
|
228
|
-
* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52))
|
|
229
|
-
* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537))
|
|
230
|
-
* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e))
|
|
231
|
-
* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764))
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
### Features
|
|
235
|
-
|
|
236
|
-
* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98))
|
|
237
|
-
|
|
238
|
-
## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30)
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
### ⚠ BREAKING CHANGES
|
|
242
|
-
|
|
243
|
-
* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed
|
|
244
|
-
* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute.
|
|
245
|
-
* do not allow additional positionals in strict mode
|
|
246
|
-
|
|
247
|
-
### Bug Fixes
|
|
248
|
-
|
|
249
|
-
* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151))
|
|
250
|
-
* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9))
|
|
251
|
-
* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9))
|
|
252
|
-
* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b))
|
|
253
|
-
* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c))
|
|
254
|
-
* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b))
|
|
255
|
-
* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372)
|
|
256
|
-
* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382)
|
|
257
|
-
|
|
258
|
-
### Features
|
|
259
|
-
|
|
260
|
-
* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554))
|
|
261
|
-
* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853))
|
|
262
|
-
|
|
263
|
-
## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10)
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
### Bug Fixes
|
|
267
|
-
|
|
268
|
-
* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b))
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
### Features
|
|
272
|
-
|
|
273
|
-
* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b))
|
|
274
|
-
* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c))
|
|
275
|
-
|
|
276
|
-
### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13)
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
### Bug Fixes
|
|
280
|
-
|
|
281
|
-
* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813))
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05)
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
### Bug Fixes
|
|
289
|
-
|
|
290
|
-
* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65))
|
|
291
|
-
* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132))
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
### Tests
|
|
295
|
-
|
|
296
|
-
* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b))
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06)
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18)
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
### Bug Fixes
|
|
308
|
-
|
|
309
|
-
* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224))
|
|
310
|
-
* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394))
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15)
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
### Features
|
|
317
|
-
|
|
318
|
-
* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156)
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
<a name="13.1.0"></a>
|
|
322
|
-
# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12)
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
### Features
|
|
326
|
-
|
|
327
|
-
* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a))
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
<a name="13.0.0"></a>
|
|
332
|
-
# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02)
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
### Bug Fixes
|
|
336
|
-
|
|
337
|
-
* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739))
|
|
338
|
-
* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6))
|
|
339
|
-
* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2))
|
|
340
|
-
* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518))
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
### Chores
|
|
344
|
-
|
|
345
|
-
* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~
|
|
346
|
-
* _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._
|
|
347
|
-
* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f))
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
### Features
|
|
351
|
-
|
|
352
|
-
* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a))
|
|
353
|
-
* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9))
|
|
354
|
-
* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa))
|
|
355
|
-
* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f))
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
### BREAKING CHANGES
|
|
359
|
-
|
|
360
|
-
* options with leading '+' or '0' now parse as strings
|
|
361
|
-
* dropping Node 6 which hits end of life in April 2019
|
|
362
|
-
* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes)
|
|
363
|
-
* we now warn if the yargs stanza package.json is used.
|
|
76
|
+
[Older CHANGELOG Entries](https://github.com/yargs/yargs/blob/master/docs/CHANGELOG-historical.md)
|
|
77
|
+
|
package/README.md
CHANGED
|
@@ -124,10 +124,10 @@ As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):
|
|
|
124
124
|
|
|
125
125
|
```typescript
|
|
126
126
|
import yargs from 'https://deno.land/x/yargs/deno.ts'
|
|
127
|
-
import { Arguments
|
|
127
|
+
import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts'
|
|
128
128
|
|
|
129
129
|
yargs(Deno.args)
|
|
130
|
-
.command('download <files...>', 'download a list of files', (yargs:
|
|
130
|
+
.command('download <files...>', 'download a list of files', (yargs: any) => {
|
|
131
131
|
return yargs.positional('files', {
|
|
132
132
|
describe: 'a list of files to do something with'
|
|
133
133
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { command as Command, } from './command.js';
|
|
2
|
-
import { assertNotStrictEqual,
|
|
2
|
+
import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js';
|
|
3
3
|
import { YError } from './yerror.js';
|
|
4
4
|
import { usage as Usage } from './usage.js';
|
|
5
5
|
import { argsert } from './argsert.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js';
|
|
2
|
+
import {hideBin} from '../build/lib/utils/process-argv.js';
|
|
3
|
+
import Parser from 'yargs-parser';
|
|
4
|
+
import shim from '../lib/platform-shims/esm.mjs';
|
|
5
|
+
|
|
6
|
+
const applyExtends = (config, cwd, mergeExtends) => {
|
|
7
|
+
return _applyExtends(config, cwd, mergeExtends, shim);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export {applyExtends, hideBin, Parser};
|
package/helpers/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const {
|
|
2
|
+
applyExtends,
|
|
3
|
+
cjsPlatformShim,
|
|
4
|
+
Parser,
|
|
5
|
+
processArgv,
|
|
6
|
+
} = require('../build/index.cjs');
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
applyExtends: (config, cwd, mergeExtends) => {
|
|
10
|
+
return applyExtends(config, cwd, mergeExtends, cjsPlatformShim);
|
|
11
|
+
},
|
|
12
|
+
hideBin: processArgv.hideBin,
|
|
13
|
+
Parser,
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yargs",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.1",
|
|
4
4
|
"description": "yargs the modern, pirate-themed, successor to optimist.",
|
|
5
5
|
"main": "./index.cjs",
|
|
6
6
|
"exports": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"./index.cjs"
|
|
13
13
|
],
|
|
14
14
|
"./helpers": {
|
|
15
|
-
"import": "./helpers.mjs",
|
|
16
|
-
"require": "./
|
|
15
|
+
"import": "./helpers/helpers.mjs",
|
|
16
|
+
"require": "./helpers/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./yargs": [
|
|
19
19
|
{
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"files": [
|
|
34
34
|
"browser.mjs",
|
|
35
35
|
"index.cjs",
|
|
36
|
-
"helpers
|
|
36
|
+
"helpers/*.js",
|
|
37
|
+
"helpers/*",
|
|
37
38
|
"index.mjs",
|
|
38
39
|
"yargs",
|
|
39
40
|
"build",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"get-caller-file": "^2.0.5",
|
|
49
50
|
"require-directory": "^2.1.1",
|
|
50
51
|
"string-width": "^4.2.0",
|
|
51
|
-
"y18n": "^5.0.
|
|
52
|
+
"y18n": "^5.0.5",
|
|
52
53
|
"yargs-parser": "^20.2.2"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
@@ -99,6 +100,7 @@
|
|
|
99
100
|
"standardx": {
|
|
100
101
|
"ignore": [
|
|
101
102
|
"build",
|
|
103
|
+
"helpers",
|
|
102
104
|
"**/example/**",
|
|
103
105
|
"**/platform-shims/esm.mjs"
|
|
104
106
|
]
|
package/yargs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// TODO: consolidate on using a helpers file at some point in the future, which
|
|
2
|
-
// is the approach currently used to export Parser and
|
|
2
|
+
// is the approach currently used to export Parser and applyExtends for ESM:
|
|
3
3
|
const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs')
|
|
4
4
|
Yargs.applyExtends = (config, cwd, mergeExtends) => {
|
|
5
5
|
return applyExtends(config, cwd, mergeExtends, cjsPlatformShim)
|
package/helpers.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {applyExtends as _applyExtends} from './build/lib/utils/apply-extends.js';
|
|
2
|
-
import {hideBin} from './build/lib/utils/process-argv.js';
|
|
3
|
-
import Parser from 'yargs-parser';
|
|
4
|
-
import shim from './lib/platform-shims/esm.mjs';
|
|
5
|
-
|
|
6
|
-
const applyExtends = (config, cwd, mergeExtends) => {
|
|
7
|
-
return _applyExtends(config, cwd, mergeExtends, shim);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export {applyExtends, hideBin, Parser};
|