Skip to content

Commit f3dd06c

Browse files
committed
fix(npm); update mkdrp-promise to mkdirp
mkdirp now supports Promise
1 parent d7af248 commit f3dd06c

File tree

5 files changed

+32
-22
lines changed

5 files changed

+32
-22
lines changed

bin/comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ImageManager = require("./image-manager.js");
66
const fse = require("fs-extra");
77
const path = require("path");
88
const sanitize = require("sanitize-filename");
9-
const mkdirp = require("mkdirp-promise");
9+
const mkdirp = require("mkdirp");
1010

1111
class Comment extends ItemBase {
1212
constructor(obj) {

bin/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
"use strict";
44

5-
const mkdirp = require("mkdirp-promise");
5+
const mkdirp = require("mkdirp");
66

77
const QiitaApi = require("./qiita");
88
const Item = require("./item.js");
@@ -29,9 +29,7 @@ const main = async () => {
2929
console.log(`info: ${items.length} items found.`);
3030

3131
console.log("info: creating image save directory...");
32-
await mkdirp(imageDirectoryPath).catch(er => {
33-
throw er;
34-
});
32+
await mkdirp(imageDirectoryPath);
3533
console.log("info: created.");
3634
const imageManager = new ImageManager(imageDirectoryPath);
3735
console.log("info: Requesting comments/images...");

bin/item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ImageManager = require("./image-manager.js");
99
const fse = require("fs-extra");
1010
const path = require("path");
1111
const sanitize = require("sanitize-filename");
12-
const mkdirp = require("mkdirp-promise");
12+
const mkdirp = require("mkdirp");
1313

1414
class Item extends ItemBase {
1515
constructor(obj) {

package-lock.json

Lines changed: 27 additions & 15 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
@@ -41,7 +41,7 @@
4141
"fs-extra": "^8.1.0",
4242
"gaxios": "^2.3.2",
4343
"mime": "^2.4.4",
44-
"mkdirp-promise": "^5.0.1",
44+
"mkdirp": "^1.0.3",
4545
"parse-link-header": "^1.0.1",
4646
"sanitize-filename": "^1.6.3",
4747
"unescape": "^1.0.1",

0 commit comments

Comments
 (0)