Skip to content

Commit

Permalink
Removes dependency on fs-extra.
Browse files Browse the repository at this point in the history
This should remove ~16 of the 25 dependencies of this project, which reduces the attack surface area and gets us down to only direct dependencies I believe.

See ethereum#361 (comment) for additional discussion.

I went ahead and removed the path check per thought from @chriseth, but I'm happy to put it back in if desired.
  • Loading branch information
MicahZoltu committed Dec 19, 2021
1 parent ee86329 commit eef6271
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solcjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// hold on to any exception handlers that existed prior to this script running, we'll be adding them back at the end
var originalUncaughtExceptionListeners = process.listeners("uncaughtException");

var fs = require('fs-extra');
var fs = require('fs');
var os = require('os');
var path = require('path');
var solc = require('./index.js');
Expand Down Expand Up @@ -223,7 +223,7 @@ if (!output) {
}
}

fs.ensureDirSync (destination);
fs.mkdirSync(destination, { mode: 0o777, recursive: true });

function writeFile (file, content) {
file = path.join(destination, file);
Expand Down

0 comments on commit eef6271

Please sign in to comment.