@socketsecurity/cli-with-sentry 0.14.104 → 0.14.105

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.
@@ -391,7 +391,7 @@ async function setupSdk(
391
391
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_NAME']".
392
392
  name: '@socketsecurity/cli',
393
393
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
394
- version: '0.14.104',
394
+ version: '0.14.105',
395
395
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_HOMEPAGE']".
396
396
  homepage: 'https://github.com/SocketDev/socket-cli'
397
397
  })
@@ -1415,6 +1415,7 @@ function updatePackageJsonFromNode(
1415
1415
  targetVersion,
1416
1416
  rangeStyle
1417
1417
  ) {
1418
+ let result = false
1418
1419
  if (isTopLevel(tree, node)) {
1419
1420
  const { name } = node
1420
1421
  for (const depField of [
@@ -1422,20 +1423,25 @@ function updatePackageJsonFromNode(
1422
1423
  'optionalDependencies',
1423
1424
  'peerDependencies'
1424
1425
  ]) {
1425
- const oldValue = editablePkgJson.content[depField]
1426
- if (oldValue) {
1427
- const refRange = oldValue[name]
1428
- if (refRange) {
1429
- editablePkgJson.update({
1430
- [depField]: {
1431
- ...oldValue,
1432
- [name]: applyRange(refRange, targetVersion, rangeStyle)
1433
- }
1434
- })
1426
+ const depObject = editablePkgJson.content[depField]
1427
+ if (depObject) {
1428
+ const oldRange = depObject[name]
1429
+ if (oldRange) {
1430
+ const newRange = applyRange(oldRange, targetVersion, rangeStyle)
1431
+ if (oldRange !== newRange) {
1432
+ result = true
1433
+ editablePkgJson.update({
1434
+ [depField]: {
1435
+ ...depObject,
1436
+ [name]: newRange
1437
+ }
1438
+ })
1439
+ }
1435
1440
  }
1436
1441
  }
1437
1442
  }
1438
1443
  }
1444
+ return result
1439
1445
  }
1440
1446
 
1441
1447
  const {
@@ -2347,5 +2353,5 @@ exports.supportedConfigKeys = supportedConfigKeys
2347
2353
  exports.updateConfigValue = updateConfigValue
2348
2354
  exports.updateNode = updateNode
2349
2355
  exports.updatePackageJsonFromNode = updatePackageJsonFromNode
2350
- //# debugId=3e95ade4-7c46-4ebf-8b3a-87daba9d5c80
2356
+ //# debugId=a27fccc9-01d0-4c29-9aa2-77fb60ed46dc
2351
2357
  //# sourceMappingURL=shadow-npm-inject.js.map