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

snyk

Package Overview
Dependencies
Maintainers
2
Versions
1964
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk - npm Package Compare versions

Comparing version 1.8.2-alpha1 to 1.8.2

.nyc_output/2835.json

13

lib/index.js

@@ -36,3 +36,14 @@ module.exports = snyk;

snyk.id = require('./config').id;
snyk.api = require('./api-key')();
var apikey = require('./api-key');
// make snyk.api *always* get the latest api key from the config store
Object.defineProperty(snyk, 'api', {
enumerable: true,
configurable: true,
get: function () {
return apikey();
},
});
snyk.modules = require('./modules');

@@ -39,0 +50,0 @@ snyk.test = require('./test');

13

lib/protect.js

@@ -520,10 +520,9 @@ var protect = module.exports = {

function generatePolicy(policy, tasks, live) {
var promises = ['ignore', 'update', 'patch'].filter(function (task) {
return tasks[task].length;
}).map(function (task) {
return protect[task](tasks[task], live);
});
var promises = [
protect.ignore(tasks.ignore, live),
protect.update(tasks.update, live),
protect.patch(tasks.patch, live),
log(tasks, live),
];
promises.push(log(tasks, live));
return Promise.all(promises).then(function (res) {

@@ -530,0 +529,0 @@ // we're squashing the arrays of arrays into a flat structure

@@ -6,2 +6,3 @@ module.exports = test;

var request = require('./request');
var path = require('path');
var fs = require('then-fs');

@@ -48,2 +49,6 @@ var protect = require('./protect');

p = snyk.modules(root, options).then(function (pkg) {
// if there's no package name, let's get it from the root dir
if (!pkg.name) {
pkg.name = path.basename(path.resolve(root));
}
analytics.add('package', pkg.name + '@' + pkg.version);

@@ -50,0 +55,0 @@ policyLocations = policyLocations.concat(pluckPolicies(pkg));

@@ -5,3 +5,2 @@ {

"main": "lib/index.js",
"version": "1.8.2-alpha1",
"directories": {

@@ -64,3 +63,4 @@ "test": "test"

"url": "https://github.com/Snyk/snyk.git"
}
}
},
"version": "1.8.2"
}

Sorry, the diff of this file is not supported yet

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