yargs 18.0.0-candidate.5 → 18.0.0-candidate.7
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/README.md +0 -7
- package/build/lib/command.js +1 -1
- package/build/lib/yargs-factory.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
[![js-standard-style][standard-image]][standard-url]
|
|
14
14
|
[![Coverage][coverage-image]][coverage-url]
|
|
15
15
|
[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
|
|
16
|
-
[![Slack][slack-image]][slack-url]
|
|
17
16
|
|
|
18
17
|
## Description
|
|
19
18
|
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
|
|
@@ -147,10 +146,6 @@ yargs(Deno.args)
|
|
|
147
146
|
|
|
148
147
|
See examples of using yargs in the browser in [docs](/docs/browser.md).
|
|
149
148
|
|
|
150
|
-
## Community
|
|
151
|
-
|
|
152
|
-
Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
|
|
153
|
-
|
|
154
149
|
## Documentation
|
|
155
150
|
|
|
156
151
|
### Table of Contents
|
|
@@ -182,8 +177,6 @@ post on why we think this is important](https://medium.com/the-node-js-collectio
|
|
|
182
177
|
[standard-url]: http://standardjs.com/
|
|
183
178
|
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
|
|
184
179
|
[conventional-commits-url]: https://conventionalcommits.org/
|
|
185
|
-
[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
|
|
186
|
-
[slack-url]: http://devtoolscommunity.herokuapp.com
|
|
187
180
|
[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
|
|
188
181
|
[coverage-image]: https://img.shields.io/nycrc/yargs/yargs
|
|
189
182
|
[coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc
|
package/build/lib/command.js
CHANGED
|
@@ -19,7 +19,7 @@ export class CommandInstance {
|
|
|
19
19
|
addDirectory(dir, req, callerFile, opts) {
|
|
20
20
|
opts = opts || {};
|
|
21
21
|
this.requireCache.add(callerFile);
|
|
22
|
-
const fullDirPath = this.shim.path.
|
|
22
|
+
const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir);
|
|
23
23
|
const files = this.shim.readdirSync(fullDirPath, {
|
|
24
24
|
recursive: opts.recurse ? true : false,
|
|
25
25
|
});
|
|
@@ -1327,6 +1327,7 @@ export class YargsInstance {
|
|
|
1327
1327
|
return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir);
|
|
1328
1328
|
}
|
|
1329
1329
|
[kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) {
|
|
1330
|
+
var _a, _b, _c, _d;
|
|
1330
1331
|
let skipValidation = !!calledFromCommand || helpOnly;
|
|
1331
1332
|
args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f");
|
|
1332
1333
|
__classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
|
|
@@ -1372,7 +1373,12 @@ export class YargsInstance {
|
|
|
1372
1373
|
}
|
|
1373
1374
|
__classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f");
|
|
1374
1375
|
const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands();
|
|
1375
|
-
const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey
|
|
1376
|
+
const requestCompletions = ((_a = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _a === void 0 ? void 0 : _a.completionKey)
|
|
1377
|
+
? [
|
|
1378
|
+
(_b = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _b === void 0 ? void 0 : _b.completionKey,
|
|
1379
|
+
...((_d = this.getAliases()[(_c = __classPrivateFieldGet(this, _YargsInstance_completion, "f")) === null || _c === void 0 ? void 0 : _c.completionKey]) !== null && _d !== void 0 ? _d : []),
|
|
1380
|
+
].some((key) => Object.prototype.hasOwnProperty.call(argv, key))
|
|
1381
|
+
: false;
|
|
1376
1382
|
const skipRecommendation = helpOptSet || requestCompletions || helpOnly;
|
|
1377
1383
|
if (argv._.length) {
|
|
1378
1384
|
if (handlerKeys.length) {
|