10000 deps: update yargs · DavideDaniel/documentation@6f6f9d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f6f9d0

Browse files
deps: update yargs
1 parent e4d8a7c commit 6f6f9d0

File tree

4 files changed

+13
-113
lines changed

4 files changed

+13
-113
lines changed

bin/documentation.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,15 @@
33
/* eslint no-console: 0 */
44

55
import yargs from 'yargs';
6+
import { hideBin } from 'yargs/helpers';
67
import commands from '../src/commands/index.js';
78

8-
const argv = yargs
9+
const argv = yargs(hideBin(process.argv))
910
.strict()
1011
.command(commands.serve)
1112
.command(commands.build)
1213
.command(commands.lint)
1314
.command(commands.readme)
14-
.fail(function (msg, error) {
15-
if (error) {
16-
throw error;
17-
} else {
18-
yargs.showHelp('error');
19-
console.error(msg);
20-
return yargs.exit(1);
21-
}
22-
})
2315
.example('documentation build foo.js -f md > API.md')
2416
.example('documentation readme index.js -s "API Docs" --github')
2517
.version()
@@ -57,8 +49,3 @@ if (argv.private) {
5749
);
5850
console.error('for example: -a public -a private -a protected -a undefined');
5951
}
60-
61-
if (!argv._handled) {
62-
yargs.showHelp('error');
63-
process.exit(1);
64-
}

package-lock.json

Lines changed: 8 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"vfile-sort": "^3.0.0",
5656
"vinyl": "^2.1.0",
5757
"vinyl-fs": "^3.0.2",
58-
"yargs": "^15.3.1"
58+
"yargs": "^17.2.1"
5959
},
6060
"optionalDependencies": {
6161
"@vue/compiler-sfc": "^3.0.11",

src/commands/shared_options.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ export const sharedInputOptions = {
3737
describe:
3838
"additional extensions to include in require() and import's search algorithm." +
3939
'For instance, adding .es5 would allow require("adder") to find "adder.es5"',
40-
// Ensure that the value is an array
41-
coerce: value => [].concat(value),
40+
type: 'array',
4241
alias: 're'
4342
},
4443
'parse-extension': {
4544
describe: 'additional extensions to parse as source code.',
46-
// Ensure that the value is an array
47-
coerce: value => [].concat(value),
45+
type: 'array',
4846
alias: 'pe'
4947
},
5048
private: {

0 commit comments

Comments
 (0)
0