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

socket

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket - npm Package Compare versions

Comparing version 0.14.32 to 0.14.33

54

dist/module-sync/npm-injection.js

@@ -46,3 +46,3 @@ 'use strict';

var name = "socket";
var version = "0.14.32";
var version = "0.14.33";
var description = "CLI tool for Socket.dev";

@@ -886,16 +886,12 @@ var homepage = "http://github.com/SocketDev/socket-cli";

// already existed in the old version if they did, be quiet.
const pkg = pkgs.find(p => p.pkgid === id && p.existing?.startsWith(`${name}@`));
if (pkg?.existing) {
// const oldArtifact: SocketArtifact =
// // eslint-disable-next-line no-await-in-loop
// (await batchScan([pkg.existing]).next()).value
// console.log('oldArtifact', oldArtifact)
// if (oldArtifact.type === 'success') {
// issues = issues.filter(
// ({ type }) =>
// oldPkgData.value.issues.find(
// oldIssue => oldIssue.type === type
// ) === undefined
// )
// }
const existing = pkgs.find(p => p.existing?.startsWith(`${name}@`))?.existing;
if (existing) {
const oldArtifact =
// eslint-disable-next-line no-await-in-loop
(await batchScan([existing]).next()).value;
if (oldArtifact?.alerts?.length) {
alerts = alerts.filter(({
type
}) => !oldArtifact.alerts?.find(a => a.type === type));
}
}

@@ -963,19 +959,27 @@ }

}
if (diff.action) {
const sameVersion = diff.actual?.package.version === diff.ideal?.package.version;
const {
action
} = diff;
if (action) {
const oldNode = diff.actual;
const oldPkgid = oldNode?.pkgid;
const pkgNode = diff.ideal;
const pkgid = pkgNode?.pkgid;
let existing;
let keep = false;
let existing = null;
if (diff.action === 'CHANGE') {
if (!sameVersion) {
existing = diff.actual.pkgid;
if (action === 'CHANGE') {
if (pkgNode?.package.version !== oldNode?.package.version) {
keep = true;
if (oldNode?.package.name && oldNode.package.name === pkgNode?.package.name) {
existing = oldPkgid;
}
}
} else {
keep = diff.action !== 'REMOVE';
keep = action !== 'REMOVE';
}
if (keep && diff.ideal?.pkgid && diff.ideal.resolved && (!diff.actual || diff.actual.resolved)) {
if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
needInfoOn.push({
existing,
pkgid: diff.ideal.pkgid,
repository_url: toRepoUrl(diff.ideal.resolved)
pkgid,
repository_url: toRepoUrl(pkgNode.resolved)
});

@@ -982,0 +986,0 @@ }

@@ -45,3 +45,3 @@ 'use strict';

var name = "socket";
var version = "0.14.32";
var version = "0.14.33";
var description = "CLI tool for Socket.dev";

@@ -885,16 +885,12 @@ var homepage = "http://github.com/SocketDev/socket-cli";

// already existed in the old version if they did, be quiet.
const pkg = pkgs.find(p => p.pkgid === id && p.existing?.startsWith(`${name}@`));
if (pkg?.existing) {
// const oldArtifact: SocketArtifact =
// // eslint-disable-next-line no-await-in-loop
// (await batchScan([pkg.existing]).next()).value
// console.log('oldArtifact', oldArtifact)
// if (oldArtifact.type === 'success') {
// issues = issues.filter(
// ({ type }) =>
// oldPkgData.value.issues.find(
// oldIssue => oldIssue.type === type
// ) === undefined
// )
// }
const existing = pkgs.find(p => p.existing?.startsWith(`${name}@`))?.existing;
if (existing) {
const oldArtifact =
// eslint-disable-next-line no-await-in-loop
(await batchScan([existing]).next()).value;
if (oldArtifact?.alerts?.length) {
alerts = alerts.filter(({
type
}) => !oldArtifact.alerts?.find(a => a.type === type));
}
}

@@ -962,19 +958,27 @@ }

}
if (diff.action) {
const sameVersion = diff.actual?.package.version === diff.ideal?.package.version;
const {
action
} = diff;
if (action) {
const oldNode = diff.actual;
const oldPkgid = oldNode?.pkgid;
const pkgNode = diff.ideal;
const pkgid = pkgNode?.pkgid;
let existing;
let keep = false;
let existing = null;
if (diff.action === 'CHANGE') {
if (!sameVersion) {
existing = diff.actual.pkgid;
if (action === 'CHANGE') {
if (pkgNode?.package.version !== oldNode?.package.version) {
keep = true;
if (oldNode?.package.name && oldNode.package.name === pkgNode?.package.name) {
existing = oldPkgid;
}
}
} else {
keep = diff.action !== 'REMOVE';
keep = action !== 'REMOVE';
}
if (keep && diff.ideal?.pkgid && diff.ideal.resolved && (!diff.actual || diff.actual.resolved)) {
if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
needInfoOn.push({
existing,
pkgid: diff.ideal.pkgid,
repository_url: toRepoUrl(diff.ideal.resolved)
pkgid,
repository_url: toRepoUrl(pkgNode.resolved)
});

@@ -981,0 +985,0 @@ }

{
"name": "socket",
"version": "0.14.32",
"version": "0.14.33",
"description": "CLI tool for Socket.dev",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/SocketDev/socket-cli",

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