Skip to content

Commit 2f90c74

Browse files
authored
feat: drop mkdirp (#1743)
Removes `mkdirp` and uses the built in `recursive` flag node provides (since 10.x).
1 parent 2d3d1d3 commit 2f90c74

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"glob": "~7.2.0",
4242
"lodash": "~4.17.21",
4343
"magic-string": "~0.30.0",
44-
"mkdirp": "~3.0.0",
4544
"moment": "~2.30.1",
4645
"package-name-regex": "~2.0.6",
4746
"spdx-expression-validate": "~2.0.0",

src/license-plugin.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import fs from 'fs';
2626
import path from 'path';
27-
import { mkdirp } from 'mkdirp';
2827
import _ from 'lodash';
2928
import moment from 'moment';
3029
import MagicString from 'magic-string';
@@ -588,7 +587,7 @@ class LicensePlugin {
588587
this.debug(`use encoding: ${encoding}`);
589588

590589
// Create directory if it does not already exist.
591-
mkdirp.sync(path.parse(file).dir);
590+
fs.mkdirSync(path.parse(file).dir, { recursive: true });
592591

593592
fs.writeFileSync(file, (text || '').trim(), {
594593
encoding,

0 commit comments

Comments
 (0)