socket 0.14.32 → 0.14.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,7 @@ var arborist = {};
|
|
|
43
43
|
var ttyServer$1 = {};
|
|
44
44
|
|
|
45
45
|
var name = "socket";
|
|
46
|
-
var version = "0.14.
|
|
46
|
+
var version = "0.14.33";
|
|
47
47
|
var description = "CLI tool for Socket.dev";
|
|
48
48
|
var homepage = "http://github.com/SocketDev/socket-cli";
|
|
49
49
|
var license = "MIT";
|
|
@@ -882,20 +882,16 @@ async function getPackagesAlerts(safeArb, _registry, pkgs, output) {
|
|
|
882
882
|
});
|
|
883
883
|
// Before we ask about problematic issues, check to see if they
|
|
884
884
|
// already existed in the old version if they did, be quiet.
|
|
885
|
-
const
|
|
886
|
-
if (
|
|
887
|
-
|
|
888
|
-
//
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
// oldIssue => oldIssue.type === type
|
|
896
|
-
// ) === undefined
|
|
897
|
-
// )
|
|
898
|
-
// }
|
|
885
|
+
const existing = pkgs.find(p => p.existing?.startsWith(`${name}@`))?.existing;
|
|
886
|
+
if (existing) {
|
|
887
|
+
const oldArtifact =
|
|
888
|
+
// eslint-disable-next-line no-await-in-loop
|
|
889
|
+
(await batchScan([existing]).next()).value;
|
|
890
|
+
if (oldArtifact?.alerts?.length) {
|
|
891
|
+
alerts = alerts.filter(({
|
|
892
|
+
type
|
|
893
|
+
}) => !oldArtifact.alerts?.find(a => a.type === type));
|
|
894
|
+
}
|
|
899
895
|
}
|
|
900
896
|
}
|
|
901
897
|
}
|
|
@@ -958,23 +954,31 @@ function walk(diff_, needInfoOn = []) {
|
|
|
958
954
|
if (!diff) {
|
|
959
955
|
continue;
|
|
960
956
|
}
|
|
961
|
-
|
|
962
|
-
|
|
957
|
+
const {
|
|
958
|
+
action
|
|
959
|
+
} = diff;
|
|
960
|
+
if (action) {
|
|
961
|
+
const oldNode = diff.actual;
|
|
962
|
+
const oldPkgid = oldNode?.pkgid;
|
|
963
|
+
const pkgNode = diff.ideal;
|
|
964
|
+
const pkgid = pkgNode?.pkgid;
|
|
965
|
+
let existing;
|
|
963
966
|
let keep = false;
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
if (!sameVersion) {
|
|
967
|
-
existing = diff.actual.pkgid;
|
|
967
|
+
if (action === 'CHANGE') {
|
|
968
|
+
if (pkgNode?.package.version !== oldNode?.package.version) {
|
|
968
969
|
keep = true;
|
|
970
|
+
if (oldNode?.package.name && oldNode.package.name === pkgNode?.package.name) {
|
|
971
|
+
existing = oldPkgid;
|
|
972
|
+
}
|
|
969
973
|
}
|
|
970
974
|
} else {
|
|
971
|
-
keep =
|
|
975
|
+
keep = action !== 'REMOVE';
|
|
972
976
|
}
|
|
973
|
-
if (keep &&
|
|
977
|
+
if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
|
|
974
978
|
needInfoOn.push({
|
|
975
979
|
existing,
|
|
976
|
-
pkgid
|
|
977
|
-
repository_url: toRepoUrl(
|
|
980
|
+
pkgid,
|
|
981
|
+
repository_url: toRepoUrl(pkgNode.resolved)
|
|
978
982
|
});
|
|
979
983
|
}
|
|
980
984
|
}
|
|
@@ -42,7 +42,7 @@ var arborist = {};
|
|
|
42
42
|
var ttyServer$1 = {};
|
|
43
43
|
|
|
44
44
|
var name = "socket";
|
|
45
|
-
var version = "0.14.
|
|
45
|
+
var version = "0.14.33";
|
|
46
46
|
var description = "CLI tool for Socket.dev";
|
|
47
47
|
var homepage = "http://github.com/SocketDev/socket-cli";
|
|
48
48
|
var license = "MIT";
|
|
@@ -881,20 +881,16 @@ async function getPackagesAlerts(safeArb, _registry, pkgs, output) {
|
|
|
881
881
|
});
|
|
882
882
|
// Before we ask about problematic issues, check to see if they
|
|
883
883
|
// already existed in the old version if they did, be quiet.
|
|
884
|
-
const
|
|
885
|
-
if (
|
|
886
|
-
|
|
887
|
-
//
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
// oldIssue => oldIssue.type === type
|
|
895
|
-
// ) === undefined
|
|
896
|
-
// )
|
|
897
|
-
// }
|
|
884
|
+
const existing = pkgs.find(p => p.existing?.startsWith(`${name}@`))?.existing;
|
|
885
|
+
if (existing) {
|
|
886
|
+
const oldArtifact =
|
|
887
|
+
// eslint-disable-next-line no-await-in-loop
|
|
888
|
+
(await batchScan([existing]).next()).value;
|
|
889
|
+
if (oldArtifact?.alerts?.length) {
|
|
890
|
+
alerts = alerts.filter(({
|
|
891
|
+
type
|
|
892
|
+
}) => !oldArtifact.alerts?.find(a => a.type === type));
|
|
893
|
+
}
|
|
898
894
|
}
|
|
899
895
|
}
|
|
900
896
|
}
|
|
@@ -957,23 +953,31 @@ function walk(diff_, needInfoOn = []) {
|
|
|
957
953
|
if (!diff) {
|
|
958
954
|
continue;
|
|
959
955
|
}
|
|
960
|
-
|
|
961
|
-
|
|
956
|
+
const {
|
|
957
|
+
action
|
|
958
|
+
} = diff;
|
|
959
|
+
if (action) {
|
|
960
|
+
const oldNode = diff.actual;
|
|
961
|
+
const oldPkgid = oldNode?.pkgid;
|
|
962
|
+
const pkgNode = diff.ideal;
|
|
963
|
+
const pkgid = pkgNode?.pkgid;
|
|
964
|
+
let existing;
|
|
962
965
|
let keep = false;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
if (!sameVersion) {
|
|
966
|
-
existing = diff.actual.pkgid;
|
|
966
|
+
if (action === 'CHANGE') {
|
|
967
|
+
if (pkgNode?.package.version !== oldNode?.package.version) {
|
|
967
968
|
keep = true;
|
|
969
|
+
if (oldNode?.package.name && oldNode.package.name === pkgNode?.package.name) {
|
|
970
|
+
existing = oldPkgid;
|
|
971
|
+
}
|
|
968
972
|
}
|
|
969
973
|
} else {
|
|
970
|
-
keep =
|
|
974
|
+
keep = action !== 'REMOVE';
|
|
971
975
|
}
|
|
972
|
-
if (keep &&
|
|
976
|
+
if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
|
|
973
977
|
needInfoOn.push({
|
|
974
978
|
existing,
|
|
975
|
-
pkgid
|
|
976
|
-
repository_url: toRepoUrl(
|
|
979
|
+
pkgid,
|
|
980
|
+
repository_url: toRepoUrl(pkgNode.resolved)
|
|
977
981
|
});
|
|
978
982
|
}
|
|
979
983
|
}
|