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.2.0 to 1.3.0

28

index.js

@@ -181,14 +181,18 @@ 'use strict';

toJSON() {
return {
[this.name]: Object.assign({
'node_modules': depsAsObject([
...this.devDependencies(),
...this.dependencies()
]),
'package.json': JSON.stringify(Object.assign(this.pkg, {
dependencies: depsToObject(this.dependencies()),
devDependencies: depsToObject(this.devDependencies()),
}), null, 2),
}, this.files),
};
if (arguments.length > 0) {
return this.toJSON()[this.name][arguments[0]];
} else {
return {
[this.name]: Object.assign({
'node_modules': depsAsObject([
...this.devDependencies(),
...this.dependencies()
]),
'package.json': JSON.stringify(Object.assign(this.pkg, {
dependencies: depsToObject(this.dependencies()),
devDependencies: depsToObject(this.devDependencies()),
}), null, 2),
}, this.files),
};
}
}

@@ -195,0 +199,0 @@

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

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

@@ -52,3 +52,3 @@ # node-fixturify-project

### Adanced
### Advanced

@@ -55,0 +55,0 @@ Obviously nested dependencies are common, and are not only supported but somewhat ergonomics:

@@ -239,3 +239,21 @@ 'use strict';

expect(project.pkg.version, '1');
})
});
it('to JSON with 1 arg, is an alias for toJSON()[project.name][arg]', function() {
let project = new Project('foo', '123');
project.addDependency('rsvp', '1.2.3');
project.addDevDependency('q', '1.2.4');
expect(JSON.parse(project.toJSON('package.json'))).to.deep.eql({
name: 'foo',
version: '123',
keywords: [],
dependencies: {
rsvp: '1.2.3'
},
devDependencies: {
q: '1.2.4'
},
});
});
});
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