socket 0.14.113 → 0.14.115

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.
@@ -917,7 +917,7 @@ function emitBanner(name) {
917
917
  logger.logger.error(getAsciiHeader(name))
918
918
  }
919
919
  function getAsciiHeader(command) {
920
- const cliVersion = '0.14.113:753a37f:8ffbd6ab:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
920
+ const cliVersion = '0.14.115:b2d12c7:12ad560f:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
921
921
  const nodeVersion = process$1.version
922
922
  const apiToken = shadowNpmInject.getDefaultToken()
923
923
  const defaultOrg = shadowNpmInject.getConfigValue('defaultOrg')
@@ -3831,11 +3831,6 @@ async function gitCreateAndPushBranchIfNeeded(
3831
3831
  basename === 'pnpm-lock.yaml'
3832
3832
  )
3833
3833
  })
3834
- debug.debugLog('branch', branch)
3835
- debug.debugLog(
3836
- 'gitCreateAndPushBranchIfNeeded > moddedFilepaths',
3837
- moddedFilepaths
3838
- )
3839
3834
  if (moddedFilepaths.length) {
3840
3835
  await spawn.spawn('git', ['add', ...moddedFilepaths], {
3841
3836
  cwd
@@ -4030,9 +4025,10 @@ async function npmFix(
4030
4025
  pkgEnvDetails,
4031
4026
  { autoMerge, cwd, purls, rangeStyle, spinner, test, testScript }
4032
4027
  ) {
4028
+ const { pkgPath: rootPath } = pkgEnvDetails
4033
4029
  spinner?.start()
4034
4030
  const arb = new shadowNpmInject.SafeArborist({
4035
- path: pkgEnvDetails.pkgPath,
4031
+ path: rootPath,
4036
4032
  ...shadowNpmInject.SAFE_ARBORIST_REIFY_OPTIONS_OVERRIDES
4037
4033
  })
4038
4034
  // Calling arb.reify() creates the arb.diff object and nulls-out arb.idealTree.
@@ -4057,14 +4053,14 @@ async function npmFix(
4057
4053
 
4058
4054
  // Lazily access constants.ENV[CI].
4059
4055
  const isCi = constants.ENV[CI$1]
4060
- const { pkgPath: rootPath } = pkgEnvDetails
4061
4056
  const { 0: isRepo, 1: workspacePkgJsonPaths } = await Promise.all([
4062
4057
  isInGitRepo(cwd),
4063
- shadowNpmPaths.globWorkspace(pkgEnvDetails)
4058
+ shadowNpmInject.globWorkspace(pkgEnvDetails.agent, rootPath)
4064
4059
  ])
4065
4060
  const pkgJsonPaths = [
4066
- pkgEnvDetails.editablePkgJson.filename,
4067
- ...workspacePkgJsonPaths
4061
+ ...workspacePkgJsonPaths,
4062
+ // Process the workspace root last since it will add an override to package.json.
4063
+ pkgEnvDetails.editablePkgJson.filename
4068
4064
  ]
4069
4065
  await arb.buildIdealTree()
4070
4066
  for (const { 0: name, 1: infos } of infoByPkg) {
@@ -4253,6 +4249,8 @@ async function npmFix(
4253
4249
  spinner?.error(`Reverting ${newSpec}${workspaceDetails}`, error)
4254
4250
  }
4255
4251
  }
4252
+ // eslint-disable-next-line no-await-in-loop
4253
+ await shadowNpmInject.removeNodeModules(cwd)
4256
4254
  if (isRepo) {
4257
4255
  // eslint-disable-next-line no-await-in-loop
4258
4256
  await gitHardReset(cwd)
@@ -4435,12 +4433,10 @@ async function pnpmFix(
4435
4433
  pkgEnvDetails,
4436
4434
  { autoMerge, cwd, purls, rangeStyle, spinner, test, testScript }
4437
4435
  ) {
4438
- const lockfile = await vendor.libExports$3.readWantedLockfile(
4439
- pkgEnvDetails.pkgPath,
4440
- {
4441
- ignoreIncompatible: false
4442
- }
4443
- )
4436
+ const { pkgPath: rootPath } = pkgEnvDetails
4437
+ const lockfile = await vendor.libExports$3.readWantedLockfile(rootPath, {
4438
+ ignoreIncompatible: false
4439
+ })
4444
4440
  if (!lockfile) {
4445
4441
  return
4446
4442
  }
@@ -4467,21 +4463,20 @@ async function pnpmFix(
4467
4463
 
4468
4464
  // Lazily access constants.ENV[CI].
4469
4465
  const isCi = constants.ENV[CI]
4470
- const { pkgPath: rootPath } = pkgEnvDetails
4471
4466
  const {
4472
4467
  0: isRepo,
4473
4468
  1: workspacePkgJsonPaths,
4474
4469
  2: initialTree
4475
4470
  } = await Promise.all([
4476
4471
  isInGitRepo(cwd),
4477
- shadowNpmPaths.globWorkspace(pkgEnvDetails),
4472
+ shadowNpmInject.globWorkspace(pkgEnvDetails.agent, rootPath),
4478
4473
  getActualTree(cwd)
4479
4474
  ])
4480
4475
  const pkgJsonPaths = [
4481
- pkgEnvDetails.editablePkgJson.filename,
4482
- ...workspacePkgJsonPaths
4476
+ ...workspacePkgJsonPaths,
4477
+ // Process the workspace root last since it will add an override to package.json.
4478
+ pkgEnvDetails.editablePkgJson.filename
4483
4479
  ]
4484
- debug.debugLog('workspacePkgJsonPaths', workspacePkgJsonPaths)
4485
4480
  let actualTree = initialTree
4486
4481
  for (const { 0: name, 1: infos } of infoByPkg) {
4487
4482
  if (registry.getManifestData(NPM$c, name)) {
@@ -4519,6 +4514,7 @@ async function pnpmFix(
4519
4514
  oldVersion
4520
4515
  )
4521
4516
  if (!node) {
4517
+ debug.debugLog('skipping no node', pkgJsonPath)
4522
4518
  continue
4523
4519
  }
4524
4520
  const availableVersions = Object.keys(packument.versions)
@@ -4637,7 +4633,6 @@ async function pnpmFix(
4637
4633
  rangeStyle
4638
4634
  )
4639
4635
  debug.debugLog('updatePackageJsonFromNode', modded)
4640
- debug.debugLog(branch, editablePkgJson.filename)
4641
4636
  let error
4642
4637
  let errored = false
4643
4638
  let installed = false
@@ -4679,17 +4674,13 @@ async function pnpmFix(
4679
4674
  error = e
4680
4675
  errored = true
4681
4676
  }
4682
- debug.debugLog('check "shouldOpenPr":', shouldOpenPr)
4683
- debug.debugLog('check "errored":', errored)
4684
4677
  if (!errored && shouldOpenPr) {
4685
- debug.debugLog('1: gitCreateAndPushBranchIfNeeded')
4686
4678
  // eslint-disable-next-line no-await-in-loop
4687
4679
  await gitCreateAndPushBranchIfNeeded(
4688
4680
  branch,
4689
4681
  getSocketCommitMessage(oldPurl, newVersion, workspaceName),
4690
4682
  cwd
4691
4683
  )
4692
- debug.debugLog('2: openGitHubPullRequest')
4693
4684
  // eslint-disable-next-line no-await-in-loop
4694
4685
  const prResponse = await openGitHubPullRequest(
4695
4686
  owner,
@@ -4716,6 +4707,8 @@ async function pnpmFix(
4716
4707
  }
4717
4708
  }
4718
4709
  editablePkgJson.update(revertData)
4710
+ // eslint-disable-next-line no-await-in-loop
4711
+ await shadowNpmInject.removeNodeModules(cwd)
4719
4712
  if (isRepo) {
4720
4713
  // eslint-disable-next-line no-await-in-loop
4721
4714
  await gitHardReset(cwd)
@@ -7514,7 +7507,10 @@ async function addOverrides(pkgEnvDetails, pkgPath, options) {
7514
7507
  updated: new Set(),
7515
7508
  updatedInWorkspaces: new Set(),
7516
7509
  warnedPnpmWorkspaceRequiresNpm: false,
7517
- workspacePkgJsonPaths: await shadowNpmPaths.globWorkspace(pkgEnvDetails)
7510
+ workspacePkgJsonPaths: await shadowNpmInject.globWorkspace(
7511
+ agent,
7512
+ rootPath
7513
+ )
7518
7514
  }
7519
7515
  } = {
7520
7516
  __proto__: null,
@@ -12307,7 +12303,7 @@ void (async () => {
12307
12303
  await vendor.updater({
12308
12304
  name: SOCKET_CLI_BIN_NAME,
12309
12305
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
12310
- version: '0.14.113',
12306
+ version: '0.14.115',
12311
12307
  ttl: 86_400_000 /* 24 hours in milliseconds */
12312
12308
  })
12313
12309
  try {
@@ -12375,5 +12371,5 @@ void (async () => {
12375
12371
  await shadowNpmInject.captureException(e)
12376
12372
  }
12377
12373
  })()
12378
- //# debugId=ebd126cb-ef92-4c88-84ec-ac65069cdd10
12374
+ //# debugId=69630122-326f-45e7-bdba-67ec950698be
12379
12375
  //# sourceMappingURL=cli.js.map