@socketsecurity/cli 0.14.9 → 0.14.11
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.
- package/dist/cli.js +10 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1054,7 +1054,7 @@ async function detect({
|
|
|
1054
1054
|
if ((0, _strings.isNonEmptyString)(nodeRange)) {
|
|
1055
1055
|
node = MAINTAINED_NODE_VERSIONS.some(v => {
|
|
1056
1056
|
const coerced = _semver$1.coerce(nodeRange);
|
|
1057
|
-
coerced && _semver$1.satisfies(coerced, `^${v}`);
|
|
1057
|
+
return coerced && _semver$1.satisfies(coerced, `^${v}`);
|
|
1058
1058
|
});
|
|
1059
1059
|
}
|
|
1060
1060
|
const browserslistQuery = (0, _objects$1.getOwn)(pkgJson, 'browserslist');
|
|
@@ -1165,11 +1165,11 @@ const getOverridesDataByAgent = {
|
|
|
1165
1165
|
// pnpm overrides documentation:
|
|
1166
1166
|
// https://pnpm.io/package_json#pnpmoverrides
|
|
1167
1167
|
pnpm: pkgJson => {
|
|
1168
|
-
const overrides = pkgJson?.pnpm?.overrides ??
|
|
1169
|
-
return
|
|
1168
|
+
const overrides = pkgJson?.pnpm?.overrides ?? {};
|
|
1169
|
+
return {
|
|
1170
1170
|
type: 'pnpm',
|
|
1171
1171
|
overrides
|
|
1172
|
-
}
|
|
1172
|
+
};
|
|
1173
1173
|
},
|
|
1174
1174
|
// Yarn resolutions documentation:
|
|
1175
1175
|
// https://yarnpkg.com/configuration/manifest#resolutions
|
|
@@ -1191,10 +1191,11 @@ const lockIncludesByAgent = {
|
|
|
1191
1191
|
const escapedName = (0, _regexps.escapeRegExp)(name);
|
|
1192
1192
|
return new RegExp(
|
|
1193
1193
|
// Detects the package name in the following cases:
|
|
1194
|
-
// /name/
|
|
1195
|
-
// 'name'
|
|
1196
|
-
// name:
|
|
1197
|
-
|
|
1194
|
+
// /name/
|
|
1195
|
+
// 'name'
|
|
1196
|
+
// name:
|
|
1197
|
+
// name@
|
|
1198
|
+
`(?<=^\\s*)(?:(['/])${escapedName}\\1|${escapedName}(?=[:@]))`, 'm').test(lockSrc);
|
|
1198
1199
|
},
|
|
1199
1200
|
yarn: (lockSrc, name) => {
|
|
1200
1201
|
const escapedName = (0, _regexps.escapeRegExp)(name);
|
|
@@ -1266,10 +1267,7 @@ async function addOverrides({
|
|
|
1266
1267
|
}) => o);
|
|
1267
1268
|
const overridesDataObjects = [];
|
|
1268
1269
|
if (isPrivate || isWorkspace) {
|
|
1269
|
-
|
|
1270
|
-
if (data) {
|
|
1271
|
-
overridesDataObjects.push(data);
|
|
1272
|
-
}
|
|
1270
|
+
overridesDataObjects.push(getOverridesDataByAgent[agent](editablePkgJson.content));
|
|
1273
1271
|
} else {
|
|
1274
1272
|
overridesDataObjects.push(getOverridesDataByAgent['npm'](editablePkgJson.content), getOverridesDataByAgent['yarn'](editablePkgJson.content));
|
|
1275
1273
|
}
|