Skip to content

Commit

Permalink
feat: drop mkdirp (#1743)
Browse files Browse the repository at this point in the history
Removes `mkdirp` and uses the built in `recursive` flag node provides
(since 10.x).
  • Loading branch information
43081j authored Jun 11, 2024
1 parent 2d3d1d3 commit 2f90c74
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"glob": "~7.2.0",
"lodash": "~4.17.21",
"magic-string": "~0.30.0",
"mkdirp": "~3.0.0",
"moment": "~2.30.1",
"package-name-regex": "~2.0.6",
"spdx-expression-validate": "~2.0.0",
Expand Down
3 changes: 1 addition & 2 deletions src/license-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import fs from 'fs';
import path from 'path';
import { mkdirp } from 'mkdirp';
import _ from 'lodash';
import moment from 'moment';
import MagicString from 'magic-string';
Expand Down Expand Up @@ -588,7 +587,7 @@ class LicensePlugin {
this.debug(`use encoding: ${encoding}`);

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

fs.writeFileSync(file, (text || '').trim(), {
encoding,
Expand Down

0 comments on commit 2f90c74

Please sign in to comment.