[babel 8] Remove make-dir polyfill for fs.mkdirSync (#13828)
* [babel 8] Remove `make-dir` polyfill for `fs.makeDitSync` * `yarn` * fix * Inject polyfills in jest tests when needed
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
"convert-source-map": "^1.1.0",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"glob": "^7.0.0",
|
||||
"make-dir": "^2.1.0",
|
||||
"make-dir": "condition:BABEL_8_BREAKING ? : ^2.1.0",
|
||||
"slash": "condition:BABEL_8_BREAKING ? ^3.0.0 : ^2.0.0",
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import readdir from "fs-readdir-recursive";
|
||||
import * as helper from "@babel/helper-fixtures";
|
||||
import rimraf from "rimraf";
|
||||
import { sync as makeDirSync } from "make-dir";
|
||||
import child from "child_process";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
@@ -22,7 +21,7 @@ const fileFilter = function (x) {
|
||||
};
|
||||
|
||||
const outputFileSync = function (filePath, data) {
|
||||
makeDirSync(path.dirname(filePath));
|
||||
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
||||
fs.writeFileSync(filePath, data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user