New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

truffle-box

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

truffle-box - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

11

lib/utils/unbox.js

@@ -15,7 +15,10 @@ var fs = require("fs-extra");

return Promise.resolve().then(function() {
var config_path = path.join(destination, "truffle.js");
var alternate_path = path.join(destination, "truffle-config.js");
if (fs.existsSync(config_path) || fs.existsSync(alternate_path)) {
throw new Error("A Truffle project already exists at the destination. Stopping to prevent overwriting data.");
var contents = fs.readdirSync(destination);
if (contents.length) {
var err = "Something already exists at the destination. " +
"Please unbox in an empty folder. " +
"Stopping to prevent overwriting data."
throw new Error(err);
}

@@ -22,0 +25,0 @@ })

{
"name": "truffle-box",
"version": "1.0.4",
"version": "1.0.5",
"description": "Truffle project boilerplate utility",

@@ -5,0 +5,0 @@ "main": "box.js",

@@ -43,3 +43,3 @@ var path = require("path");

it("won't re-init if truffle.js file exists", function(done) {
it("won't re-init if anything exists in the destination folder", function(done) {
this.timeout(5000);

@@ -64,3 +64,3 @@

.catch(function(e) {
if (e.message.indexOf("A Truffle project already exists at the destination.") >= 0) {
if (e.message.indexOf("Something already exists at the destination.") >= 0) {
done();

@@ -67,0 +67,0 @@ } else {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc