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.
package/dist/module-sync/cli.js
CHANGED
|
@@ -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'
|
|
233
|
+
await spawn(execPath$1, [wrapperPath, 'install'], {
|
|
234
234
|
signal: abortSignal$3,
|
|
235
|
-
stdio: '
|
|
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: '
|
|
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'
|
|
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', '--
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
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 &&
|
|
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/dist/require/cli.js
CHANGED
|
@@ -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'
|
|
229
|
+
await spawn(execPath$1, [wrapperPath, 'install'], {
|
|
230
230
|
signal: abortSignal$3,
|
|
231
|
-
stdio: '
|
|
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: '
|
|
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'
|
|
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', '--
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
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 &&
|
|
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
|
}
|