Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fixturify-project

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixturify-project - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

12

index.js

@@ -24,7 +24,7 @@ 'use strict';

this.isDependency = true;
this._root = tmp.dirSync({ unsafeCleanup: true }).name;
this._tmp = tmp.dirSync({ unsafeCleanup: true });
}
get root() {
return this._root;
return this._tmp.name;
}

@@ -84,7 +84,7 @@

writeSync(root = this._root) {
writeSync(root = this.root) {
fixturify.writeSync(root, this.toJSON());
}
readSync(root = this._root) {
readSync(root = this.root) {
let files = fixturify.readSync(root)[this.name];

@@ -204,2 +204,6 @@

}
dispose() {
this._tmp.removeCallback();
}
}

@@ -206,0 +210,0 @@

{
"name": "fixturify-project",
"version": "1.3.0",
"version": "1.4.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": "git@github.com:stefanpenner/node-fixturify-project",

@@ -95,1 +95,2 @@ # node-fixturify-project

* `Project.prototype.addDevDependency(name, version)` add a devDependency to the given project
* `Project.prototype.dispose()` immediately delete the given projects tmp directories. If left not invoked, these files will be deleted when the process exists.

@@ -258,2 +258,12 @@ 'use strict';

});
it('has a working dispose to allow early cleanup', function() {
let project = new Project('foo', '123');
project.addDependency('rsvp', '1.2.3');
project.addDevDependency('q', '1.2.4');
project.writeSync();
expect(fs.readdirSync(project.root)).to.eql(["foo"]);
project.dispose();
expect(fs.existsSync(project.root)).to.eql(false);
});
});
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