Update dependencies

This includes eliminating some dependencies that are included in modern Node.js versions.
This commit is contained in:
Domenic Denicola 2020-07-01 14:33:36 -04:00
commit ecdadf8fd9
9 changed files with 653 additions and 667 deletions

View file

@ -1,5 +1,6 @@
language: node_js
node_js:
- 10
- stable
script:
npm run lint

View file

@ -1,4 +1,4 @@
Copyright © 2015 Domenic Denicola <d@domenic.me>
Copyright © Domenic Denicola <d@domenic.me>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,

View file

@ -4,7 +4,7 @@ Scrapes the web serial [_Worm_](https://parahumans.wordpress.com/) into an eBook
## How to use
First you'll need a modern version of [Node.js](https://nodejs.org/en/). Install whatever is current (not LTS); at least v8.x is necessary.
First you'll need a modern version of [Node.js](https://nodejs.org/en/). Install whatever is current (not LTS); at least v10.x is necessary.
Then, open a terminal ([Mac documentation](http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line), [Windows documentation](http://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/)) and install the program by typing

View file

@ -1,6 +1,6 @@
"use strict";
const path = require("path");
const fs = require("mz/fs");
const fs = require("fs").promises;
const throat = require("throat");
const serializeToXML = require("xmlserializer").serializeToString;
const { JSDOM } = require("jsdom");

View file

@ -1,7 +1,6 @@
"use strict";
const path = require("path");
const fs = require("mz/fs");
const mkdirp = require("mkdirp-then");
const fs = require("fs").promises;
const request = require("requisition");
const { JSDOM } = require("jsdom");
@ -35,7 +34,7 @@ async function downloadAllChapters(manifest, startChapterURL, cachePath, manifes
manifest = [];
}
await mkdirp(cachePath);
await fs.mkdir(cachePath, { recursive: true });
while (currentChapter !== null) {
const filename = `${FILENAME_PREFIX}${chapterIndex.toString().padStart(3, "0")}.html`;

View file

@ -1,7 +1,7 @@
"use strict";
const fs = require("mz/fs");
const fs = require("fs").promises;
const path = require("path");
const cpr = require("thenify")(require("cpr"));
const cpr = require("util").promisify(require("cpr"));
const BOOK_TITLE = "Worm";
const BOOK_AUTHOR = "wildbow";

View file

@ -2,8 +2,7 @@
"use strict";
/* eslint-disable no-process-exit */
const path = require("path");
const mkdirp = require("mkdirp-then");
const rimraf = require("rimraf-then");
const fs = require("fs").promises;
const yargs = require("yargs");
const packageJson = require("../package.json");
@ -77,8 +76,8 @@ if (argv._.includes("download")) {
if (argv._.includes("convert")) {
commands.push(() => {
return rimraf(chaptersPath)
.then(() => mkdirp(chaptersPath))
return fs.rmdir(chaptersPath, { recursive: true })
.then(() => fs.mkdir(chaptersPath, { recursive: true }))
.then(() => convert(cachePath, manifestPath, chaptersPath, argv.jobs));
});
}

1282
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load diff

View file

@ -21,19 +21,18 @@
"lint": "eslint lib"
},
"dependencies": {
"archiver": "^3.1.1",
"archiver": "^4.0.1",
"cpr": "^3.0.1",
"jsdom": "^15.1.1",
"mkdirp-then": "^1.0.1",
"mz": "^2.7.0",
"jsdom": "^16.2.2",
"requisition": "^1.5.0",
"rimraf-then": "^1.0.0",
"thenify": "^3.3.0",
"throat": "^5.0.0",
"xmlserializer": "^0.6.1",
"yargs": "^13.3.0"
"yargs": "^15.3.1"
},
"devDependencies": {
"eslint": "6.1.0"
"eslint": "7.3.1"
},
"engines": {
"node": ">=10.0.0"
}
}