Skip to content

Commit 21f3cf1

Browse files
committed
Move IPC object resolution higher
1 parent 45bee05 commit 21f3cf1

File tree

1 file changed

+5
-2
lines changed
  • src/shadow/arborist/lib/arborist

1 file changed

+5
-2
lines changed

src/shadow/arborist/lib/arborist/reify.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -364,17 +364,20 @@ export async function reify(
364364
this: SafeArborist,
365365
...args: Parameters<InstanceType<ArboristClass>['reify']>
366366
): Promise<SafeNode> {
367+
const IPC = await getIPC()
367368
// We are assuming `this[_diffTrees]()` has been called by `super.reify(...)`:
368369
// https://github.com/npm/cli/blob/v11.0.0/workspaces/arborist/lib/arborist/reify.js#L141
369-
let needInfoOn = getPackagesToQueryFromDiff(this.diff)
370+
let needInfoOn = getPackagesToQueryFromDiff(this.diff, {
371+
includeUnchanged: IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]
372+
})
370373
if (!needInfoOn.length) {
371374
// Nothing to check, hmmm already installed or all private?
372375
return await this[kRiskyReify](...args)
373376
}
374377
const {
375378
[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]: bypassConfirms,
376379
[SOCKET_CLI_UPDATE_OVERRIDES_IN_PACKAGE_LOCK_FILE]: bypassAlerts
377-
} = await getIPC()
380+
} = IPC
378381
const { stderr: output, stdin: input } = process
379382
let alerts: SocketPackageAlert[] = bypassAlerts
380383
? []

0 commit comments

Comments
 (0)