Skip to content

Commit

Permalink
chore: remove output-file-sync dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Aug 25, 2020
1 parent ba2edad commit a424b00
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -52,7 +52,6 @@
"lerna-changelog": "^0.5.0",
"lint-staged": "^9.2.0",
"mergeiterator": "^1.2.5",
"output-file-sync": "^2.0.0",
"prettier": "^2.0.5",
"pump": "^3.0.0",
"rimraf": "^2.6.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-plugin-transform-runtime/package.json
Expand Up @@ -37,6 +37,7 @@
"@babel/runtime": "workspace:^7.11.0",
"@babel/runtime-corejs3": "workspace:^7.11.0",
"@babel/template": "workspace:^7.10.4",
"@babel/types": "workspace:^7.11.0"
"@babel/types": "workspace:^7.11.0",
"make-dir": "^2.1.0"
}
}
@@ -1,7 +1,8 @@
"use strict";

const path = require("path");
const outputFile = require("output-file-sync");
const fs = require("fs");
const makeDirSync = require("make-dir").sync;
const helpers = require("@babel/helpers");
const babel = require("@babel/core");
const template = require("@babel/template");
Expand All @@ -13,6 +14,11 @@ const runtimeVersion = require("@babel/runtime/package.json").version;
const corejs2Definitions = require("../lib/runtime-corejs2-definitions").default();
const corejs3Definitions = require("../lib/runtime-corejs3-definitions").default();

function outputFile(filePath, data) {
makeDirSync(path.dirname(filePath));
fs.writeFileSync(filePath, data);
}

writeHelpers("@babel/runtime");
writeHelpers("@babel/runtime-corejs2", { corejs: 2 });
writeHelpers("@babel/runtime-corejs3", {
Expand Down
13 changes: 1 addition & 12 deletions yarn.lock
Expand Up @@ -2653,6 +2653,7 @@ __metadata:
"@babel/runtime-corejs3": "workspace:^7.11.0"
"@babel/template": "workspace:^7.10.4"
"@babel/types": "workspace:^7.11.0"
make-dir: ^2.1.0
resolve: ^1.8.1
semver: ^5.5.1
peerDependencies:
Expand Down Expand Up @@ -5680,7 +5681,6 @@ __metadata:
lerna-changelog: ^0.5.0
lint-staged: ^9.2.0
mergeiterator: ^1.2.5
output-file-sync: ^2.0.0
prettier: ^2.0.5
pump: ^3.0.0
rimraf: ^2.6.3
Expand Down Expand Up @@ -12793,17 +12793,6 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"output-file-sync@npm:^2.0.0":
version: 2.0.1
resolution: "output-file-sync@npm:2.0.1"
dependencies:
graceful-fs: ^4.1.11
is-plain-obj: ^1.1.0
mkdirp: ^0.5.1
checksum: 62a33b53891429fbcaeb62144e50da6e9e3dfed2fdb60c9dfe66df815a2358d26e2975f38470373b11c62abaa181bcec2e4fead35a8cd1ddd7ebba332e0edf18
languageName: node
linkType: hard

"p-each-series@npm:^1.0.0":
version: 1.0.0
resolution: "p-each-series@npm:1.0.0"
Expand Down

0 comments on commit a424b00

Please sign in to comment.