socket 0.14.40-alpha.5 → 0.14.40-alpha.7

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.
@@ -230,9 +230,9 @@ const fix = {
230
230
  const wrapperPath = path.join(rootBinPath$1, 'npm-cli.js');
231
231
  const spinner$1 = new spinner.Spinner().start();
232
232
  try {
233
- await spawn(execPath$1, [wrapperPath, 'install', '--silent'], {
233
+ await spawn(execPath$1, [wrapperPath, 'install'], {
234
234
  signal: abortSignal$3,
235
- stdio: 'ignore',
235
+ stdio: 'inherit',
236
236
  env: {
237
237
  ...process.env,
238
238
  [SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]: '1'
@@ -1724,17 +1724,17 @@ const optimize = {
1724
1724
  const wrapperPath = path.join(rootBinPath, 'npm-cli.js');
1725
1725
  const npmSpawnOptions = {
1726
1726
  signal: abortSignal$2,
1727
- stdio: 'ignore',
1727
+ stdio: 'inherit',
1728
1728
  env: {
1729
1729
  ...process.env,
1730
1730
  [SOCKET_CLI_UPDATE_OVERRIDES_IN_PACKAGE_LOCK_FILE]: '1'
1731
1731
  }
1732
1732
  };
1733
- await spawn(execPath, [wrapperPath, 'install', '--silent'], npmSpawnOptions);
1733
+ await spawn(execPath, [wrapperPath, 'install'], npmSpawnOptions);
1734
1734
  // TODO: This is a temporary workaround for a `npm ci` bug where it
1735
1735
  // will error out after Socket Optimize generates a lock file. More
1736
1736
  // investigation is needed.
1737
- await spawn(execPath, [wrapperPath, 'install', '--silent', '--ignore-scripts', '--package-lock-only'], npmSpawnOptions);
1737
+ await spawn(execPath, [wrapperPath, 'install', '--ignore-scripts', '--package-lock-only'], npmSpawnOptions);
1738
1738
  } else {
1739
1739
  // All package managers support the "install" command.
1740
1740
  await spawn(agentExecPath, ['install'], {
@@ -511,9 +511,12 @@ function walk(diff_) {
511
511
  actual: oldNode,
512
512
  ideal: pkgNode
513
513
  } = diff;
514
- const {
515
- pkgid
516
- } = pkgNode;
514
+ if (!oldNode) {
515
+ console.log('oldNode', oldNode);
516
+ }
517
+ if (!pkgNode) {
518
+ console.log('pkgNode', pkgNode);
519
+ }
517
520
  let existing;
518
521
  let keep = false;
519
522
  if (action === 'CHANGE') {
@@ -526,10 +529,10 @@ function walk(diff_) {
526
529
  } else {
527
530
  keep = action !== 'REMOVE';
528
531
  }
529
- if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
532
+ if (keep && pkgNode?.resolved && (!oldNode || oldNode.resolved)) {
530
533
  needInfoOn.push({
531
534
  existing,
532
- pkgid,
535
+ pkgid: pkgNode.pkgid,
533
536
  repository_url: toRepoUrl(pkgNode.resolved)
534
537
  });
535
538
  }
@@ -226,9 +226,9 @@ const fix = {
226
226
  const wrapperPath = path.join(rootBinPath$1, 'npm-cli.js');
227
227
  const spinner$1 = new spinner.Spinner().start();
228
228
  try {
229
- await spawn(execPath$1, [wrapperPath, 'install', '--silent'], {
229
+ await spawn(execPath$1, [wrapperPath, 'install'], {
230
230
  signal: abortSignal$3,
231
- stdio: 'ignore',
231
+ stdio: 'inherit',
232
232
  env: {
233
233
  ...process.env,
234
234
  [SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]: '1'
@@ -1720,17 +1720,17 @@ const optimize = {
1720
1720
  const wrapperPath = path.join(rootBinPath, 'npm-cli.js');
1721
1721
  const npmSpawnOptions = {
1722
1722
  signal: abortSignal$2,
1723
- stdio: 'ignore',
1723
+ stdio: 'inherit',
1724
1724
  env: {
1725
1725
  ...process.env,
1726
1726
  [SOCKET_CLI_UPDATE_OVERRIDES_IN_PACKAGE_LOCK_FILE]: '1'
1727
1727
  }
1728
1728
  };
1729
- await spawn(execPath, [wrapperPath, 'install', '--silent'], npmSpawnOptions);
1729
+ await spawn(execPath, [wrapperPath, 'install'], npmSpawnOptions);
1730
1730
  // TODO: This is a temporary workaround for a `npm ci` bug where it
1731
1731
  // will error out after Socket Optimize generates a lock file. More
1732
1732
  // investigation is needed.
1733
- await spawn(execPath, [wrapperPath, 'install', '--silent', '--ignore-scripts', '--package-lock-only'], npmSpawnOptions);
1733
+ await spawn(execPath, [wrapperPath, 'install', '--ignore-scripts', '--package-lock-only'], npmSpawnOptions);
1734
1734
  } else {
1735
1735
  // All package managers support the "install" command.
1736
1736
  await spawn(agentExecPath, ['install'], {
@@ -511,9 +511,12 @@ function walk(diff_) {
511
511
  actual: oldNode,
512
512
  ideal: pkgNode
513
513
  } = diff;
514
- const {
515
- pkgid
516
- } = pkgNode;
514
+ if (!oldNode) {
515
+ console.log('oldNode', oldNode);
516
+ }
517
+ if (!pkgNode) {
518
+ console.log('pkgNode', pkgNode);
519
+ }
517
520
  let existing;
518
521
  let keep = false;
519
522
  if (action === 'CHANGE') {
@@ -526,10 +529,10 @@ function walk(diff_) {
526
529
  } else {
527
530
  keep = action !== 'REMOVE';
528
531
  }
529
- if (keep && pkgid && pkgNode.resolved && (!oldNode || oldNode.resolved)) {
532
+ if (keep && pkgNode?.resolved && (!oldNode || oldNode.resolved)) {
530
533
  needInfoOn.push({
531
534
  existing,
532
- pkgid,
535
+ pkgid: pkgNode.pkgid,
533
536
  repository_url: toRepoUrl(pkgNode.resolved)
534
537
  });
535
538
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket",
3
- "version": "0.14.40-alpha.5",
3
+ "version": "0.14.40-alpha.7",
4
4
  "description": "CLI tool for Socket.dev",
5
5
  "homepage": "http://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",