@socketsecurity/cli-with-sentry 1.0.45 → 1.0.47

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 CHANGED
@@ -3405,14 +3405,14 @@ async function cleanupPrs(owner, repo, options) {
3405
3405
  pull_number: prNum,
3406
3406
  state: 'closed'
3407
3407
  });
3408
- debug.debugFn('notice', `close: ${prRef} for ${prToVersion}`);
3408
+ debug.debugFn('notice', `pr: closing ${prRef} for ${prToVersion}`);
3409
3409
  // Remove entry from parent object.
3410
3410
  context.parent.splice(context.index, 1);
3411
3411
  // Mark cache to be saved.
3412
3412
  cachesToSave.set(context.cacheKey, context.data);
3413
3413
  return null;
3414
3414
  } catch (e) {
3415
- debug.debugFn('error', `fail: close ${prRef} for ${prToVersion}\n`, e?.message || 'unknown error');
3415
+ debug.debugFn('error', `pr: failed to close ${prRef} for ${prToVersion}\n`, e?.message || 'unknown error');
3416
3416
  }
3417
3417
  }
3418
3418
  // Update stale PRs.
@@ -3425,7 +3425,7 @@ async function cleanupPrs(owner, repo, options) {
3425
3425
  base: match.headRefName,
3426
3426
  head: match.baseRefName
3427
3427
  });
3428
- debug.debugFn('notice', 'update: stale', prRef);
3428
+ debug.debugFn('notice', `pr: updating stale ${prRef}`);
3429
3429
  // Update entry entry.
3430
3430
  if (context.apiType === 'graphql') {
3431
3431
  context.entry.mergeStateStatus = 'CLEAN';
@@ -3436,7 +3436,7 @@ async function cleanupPrs(owner, repo, options) {
3436
3436
  cachesToSave.set(context.cacheKey, context.data);
3437
3437
  } catch (e) {
3438
3438
  const message = e?.message || 'Unknown error';
3439
- debug.debugFn('error', `fail: update ${prRef} - ${message}`);
3439
+ debug.debugFn('error', `pr: failed to update ${prRef} - ${message}`);
3440
3440
  }
3441
3441
  }
3442
3442
  return match;
@@ -4019,14 +4019,14 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4019
4019
  }
4020
4020
  const pr = prCheck ? prs.find(p => p.headRefName === branch) : undefined;
4021
4021
  if (pr) {
4022
- debug.debugFn('notice', `skip: PR #${pr.number} for ${name} exists`);
4022
+ debug.debugFn('notice', `skip: PR #${pr.number} for ${name}@${newVersion} exists`);
4023
4023
  seenBranches.add(branch);
4024
4024
  continue infosLoop;
4025
4025
  }
4026
4026
  if (fixEnv.isCi && (
4027
4027
  // eslint-disable-next-line no-await-in-loop
4028
4028
  await gitRemoteBranchExists(branch, cwd))) {
4029
- debug.debugFn('notice', `skip: remote branch "${branch}" exists`);
4029
+ debug.debugFn('notice', `skip: remote branch "${branch}" for ${name}@${newVersion} exists`);
4030
4030
  seenBranches.add(branch);
4031
4031
  continue infosLoop;
4032
4032
  }
@@ -4055,7 +4055,8 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4055
4055
 
4056
4056
  // eslint-disable-next-line no-await-in-loop
4057
4057
  if (!(await hasModifiedFiles(cwd))) {
4058
- debug.debugFn('notice', 'skip: nothing to commit, skipping PR creation');
4058
+ debug.debugFn('notice', `skip: nothing to commit for ${name}@${newVersion} PR`);
4059
+ seenVersions.add(newVersion);
4059
4060
  // Reset things just in case.
4060
4061
  if (fixEnv.isCi) {
4061
4062
  // eslint-disable-next-line no-await-in-loop
@@ -4105,6 +4106,7 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4105
4106
 
4106
4107
  // Check repoInfo to make TypeScript happy.
4107
4108
  if (!errored && fixEnv.isCi && fixEnv.repoInfo) {
4109
+ debug.debugFn('notice', 'pr: creating');
4108
4110
  try {
4109
4111
  if (
4110
4112
  // eslint-disable-next-line no-await-in-loop
@@ -4176,6 +4178,8 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4176
4178
  error = e;
4177
4179
  errored = true;
4178
4180
  }
4181
+ } else if (fixEnv.isCi) {
4182
+ debug.debugFn('notice', 'skip: PR creation');
4179
4183
  }
4180
4184
  if (fixEnv.isCi) {
4181
4185
  spinner?.start();
@@ -14310,5 +14314,5 @@ void (async () => {
14310
14314
  await utils.captureException(e);
14311
14315
  }
14312
14316
  })();
14313
- //# debugId=54a399b0-5fc6-4a0b-ac22-11952f37b9d5
14317
+ //# debugId=2722f924-d472-409c-b963-52b32c1b6daa
14314
14318
  //# sourceMappingURL=cli.js.map