Skip to content

Commit 1ff483d

Browse files
authored
Update dependencies and dev dependencies
The new yargs release requires raising our minimum Node.js version.
1 parent 2dc3b2f commit 1ff483d

File tree

3 files changed

+404
-299
lines changed

3 files changed

+404
-299
lines changed

lib/worm-scraper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const path = require("path");
44
const fs = require("fs").promises;
55
const yargs = require("yargs");
6+
const { hideBin } = require("yargs/helpers");
67

78
const packageJson = require("../package.json");
89
const download = require("./download.js");
@@ -12,7 +13,7 @@ const zip = require("./zip.js");
1213

1314
const books = ["worm", "glow-worm", "ward"];
1415

15-
const { argv } = yargs
16+
const argv = yargs(hideBin(process.argv))
1617
.usage(`${packageJson.description}\n\n${packageJson.name}[ <command1> [<command2> [<command3> ...]]]\n\n` +
1718
"Each command will fail if the previously-listed one has not yet been run (with matching options).\n\n" +
1819
"Running with no commands is equivalent to running download convert scaffold zip.")
@@ -62,7 +63,8 @@ const { argv } = yargs
6263
})
6364
.recommendCommands()
6465
.help()
65-
.version();
66+
.version()
67+
.parse();
6668

6769
const bookData = require(`../book-data/${argv.book}.js`);
6870
const substitutionsPath = path.resolve(__dirname, `../substitutions/${argv.book}.subs`);

0 commit comments

Comments
 (0)