@socketsecurity/cli-with-sentry 0.14.116 → 0.14.117
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/instrument-with-sentry.js +2 -2
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/module-sync/cli.js +3 -3
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/semver.d.ts +2 -1
- package/dist/module-sync/shadow-npm-inject.js +31 -31
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/require/cli.js +3 -3
- package/dist/require/cli.js.map +1 -1
- package/dist/require/shadow-npm-inject.js +31 -31
- package/dist/require/shadow-npm-inject.js.map +1 -1
- package/package.json +1 -1
|
@@ -627,7 +627,7 @@ async function setupSdk(
|
|
|
627
627
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_NAME']".
|
|
628
628
|
name: '@socketsecurity/cli',
|
|
629
629
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
630
|
-
version: '0.14.
|
|
630
|
+
version: '0.14.117',
|
|
631
631
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_HOMEPAGE']".
|
|
632
632
|
homepage: 'https://github.com/SocketDev/socket-cli'
|
|
633
633
|
})
|
|
@@ -663,6 +663,17 @@ function applyRange(refRange, version, style = 'preserve') {
|
|
|
663
663
|
return version
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
+
function getMajor(version) {
|
|
667
|
+
const coerced = vendor.semverExports.coerce(version)
|
|
668
|
+
if (coerced) {
|
|
669
|
+
try {
|
|
670
|
+
return vendor.semverExports.major(coerced)
|
|
671
|
+
} catch (e) {
|
|
672
|
+
debug.debugLog(`Error parsing '${version}'`, e)
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return null
|
|
676
|
+
}
|
|
666
677
|
|
|
667
678
|
const DiffAction = /*#__PURE__*/ (function (DiffAction) {
|
|
668
679
|
DiffAction['add'] = 'ADD'
|
|
@@ -1428,39 +1439,28 @@ function findBestPatchVersion(
|
|
|
1428
1439
|
const manifestData = registry.getManifestData(NPM$2, node.name)
|
|
1429
1440
|
let eligibleVersions
|
|
1430
1441
|
if (manifestData && manifestData.name === manifestData.package) {
|
|
1431
|
-
const major =
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
return vendor.semverExports.major(coerced) === major
|
|
1437
|
-
} catch (e) {
|
|
1438
|
-
debug.debugLog(`Error parsing '${v}'`, e)
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
return false
|
|
1442
|
-
})
|
|
1442
|
+
const major = getMajor(manifestData.version)
|
|
1443
|
+
if (typeof major !== 'number') {
|
|
1444
|
+
return null
|
|
1445
|
+
}
|
|
1446
|
+
eligibleVersions = availableVersions.filter(v => getMajor(v) === major)
|
|
1443
1447
|
} else {
|
|
1444
|
-
const major =
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
+
const major = getMajor(node.version)
|
|
1449
|
+
if (typeof major !== 'number') {
|
|
1450
|
+
return null
|
|
1451
|
+
}
|
|
1452
|
+
eligibleVersions = availableVersions.filter(
|
|
1453
|
+
v =>
|
|
1448
1454
|
// Filter for versions that are within the current major version and
|
|
1449
1455
|
// are NOT in the vulnerable range.
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
!vendor.semverExports.satisfies(v, vulnerableVersionRange))
|
|
1455
|
-
)
|
|
1456
|
-
}
|
|
1457
|
-
} catch (e) {
|
|
1458
|
-
debug.debugLog(`Error parsing '${v}'`, e)
|
|
1459
|
-
}
|
|
1460
|
-
return false
|
|
1461
|
-
})
|
|
1456
|
+
getMajor(v) === major &&
|
|
1457
|
+
(!vulnerableVersionRange ||
|
|
1458
|
+
!vendor.semverExports.satisfies(v, vulnerableVersionRange))
|
|
1459
|
+
)
|
|
1462
1460
|
}
|
|
1463
|
-
return
|
|
1461
|
+
return eligibleVersions
|
|
1462
|
+
? vendor.semverExports.maxSatisfying(eligibleVersions, '*')
|
|
1463
|
+
: null
|
|
1464
1464
|
}
|
|
1465
1465
|
function findPackageNode(tree, name, version) {
|
|
1466
1466
|
const queue = [tree]
|
|
@@ -2612,5 +2612,5 @@ exports.supportedConfigKeys = supportedConfigKeys
|
|
|
2612
2612
|
exports.updateConfigValue = updateConfigValue
|
|
2613
2613
|
exports.updateNode = updateNode
|
|
2614
2614
|
exports.updatePackageJsonFromNode = updatePackageJsonFromNode
|
|
2615
|
-
//# debugId=
|
|
2615
|
+
//# debugId=c33a5f3f-cb68-45a8-970f-41e2f2463ce9
|
|
2616
2616
|
//# sourceMappingURL=shadow-npm-inject.js.map
|