Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2992 from trufflesuite/bump-mkdirp
Browse files Browse the repository at this point in the history
Dependency update: Get rid of mkdirp
  • Loading branch information
gnidan authored Apr 22, 2020
2 parents d894197 + a309516 commit 95408a9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 596 deletions.
13 changes: 9 additions & 4 deletions packages/core/lib/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const mkdirp = require("mkdirp");
const fse = require("fs-extra");
const del = require("del");
const Contracts = require("@truffle/workflow-compile");
const BuildError = require("./errors/builderror");
Expand Down Expand Up @@ -50,9 +50,14 @@ const Build = {
const contracts_build_directory = options.contracts_build_directory;

// Clean first.
del([destination + "/*", "!" + contracts_build_directory]).then(() => {
mkdirp(destination, callback);
});
del([destination + "/*", "!" + contracts_build_directory])
.then(() => {
fse.ensureDirSync(destination);
callback();
})
.catch(error => {
callback(error);
});
},

build: function(options, callback) {
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"ganache-core": "2.10.2",
"glob": "^7.1.4",
"hdkey": "^1.1.0",
"mkdirp": "^0.5.1",
"mocha": "5.2.0",
"node-emoji": "^1.8.1",
"node-ipc": "^9.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var Box = require("@truffle/box");
var fs = require("fs-extra");
var glob = require("glob");
var path = require("path");
var mkdirp = require("mkdirp");
var fse = require("fs-extra");
var async = require("async");
var Resolver = require("@truffle/resolver");
var Artifactor = require("@truffle/artifactor");
Expand Down Expand Up @@ -46,7 +46,7 @@ describe("NPM integration", function() {

async.series(
[
mkdirp.bind(mkdirp, fake_source_path),
fse.ensureDir.bind(fse.ensureDir, fake_source_path),
fs.writeFile.bind(
fs,
path.join(fake_source_path, "Module.sol"),
Expand Down
5 changes: 2 additions & 3 deletions packages/workflow-compile/legacy/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const debug = require("debug")("workflow-compile");
const mkdirp = require("mkdirp");
const { promisify } = require("util");
const fse = require("fs-extra");
const externalCompile = require("@truffle/external-compile");
const solcCompile = require("@truffle/compile-solidity/legacy");
const vyperCompile = require("@truffle/compile-vyper");
Expand Down Expand Up @@ -115,7 +114,7 @@ const Contracts = {
reportNothingToCompile,

writeContracts: async (contracts, options) => {
await promisify(mkdirp)(options.contracts_build_directory);
fse.ensureDirSync(options.contracts_build_directory);
await options.artifactor.saveAll(contracts);
}
};
Expand Down
33 changes: 16 additions & 17 deletions packages/workflow-compile/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"name": "@truffle/workflow-compile",
"version": "2.1.30",
"description": "Core workflow behavior for `truffle compile` command",
"license": "MIT",
"author": "Truffle Suite <inquiry@trufflesuite.com>",
"homepage": "https://github.com/trufflesuite/truffle/tree/master/packages/workflow-compile#readme",
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/workflow-compile",
"bugs": {
"url": "https://github.com/trufflesuite/truffle/issues"
},
"version": "2.1.30",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"dependencies": {
"@truffle/artifactor": "^4.0.56",
"@truffle/compile-solidity": "^4.3.1",
Expand All @@ -10,25 +21,13 @@
"@truffle/expect": "^0.0.13",
"@truffle/external-compile": "^1.0.29",
"@truffle/resolver": "^5.1.10",
"fs-extra": "^8.1.0",
"mkdirp": "^0.5.1"
},
"main": "index.js",
"scripts": {
"test": "mocha"
},
"repository": "https://github.com/trufflesuite/truffle/tree/master/packages/workflow-compile",
"author": "Truffle Suite <inquiry@trufflesuite.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/trufflesuite/truffle/issues"
},
"homepage": "https://github.com/trufflesuite/truffle/tree/master/packages/workflow-compile#readme",
"publishConfig": {
"access": "public"
"fs-extra": "^8.1.0"
},
"devDependencies": {
"debug": "^4.1.1",
"mocha": "5.2.0"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 95408a9

Please sign in to comment.