Skip to content

Commit

Permalink
Move IPC object resolution higher
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Feb 3, 2025
1 parent 45bee05 commit 21f3cf1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shadow/arborist/lib/arborist/reify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,17 +364,20 @@ export async function reify(
this: SafeArborist,
...args: Parameters<InstanceType<ArboristClass>['reify']>
): Promise<SafeNode> {
const IPC = await getIPC()
// We are assuming `this[_diffTrees]()` has been called by `super.reify(...)`:
// https://github.com/npm/cli/blob/v11.0.0/workspaces/arborist/lib/arborist/reify.js#L141
let needInfoOn = getPackagesToQueryFromDiff(this.diff)
let needInfoOn = getPackagesToQueryFromDiff(this.diff, {
includeUnchanged: IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]
})
if (!needInfoOn.length) {
// Nothing to check, hmmm already installed or all private?
return await this[kRiskyReify](...args)
}
const {
[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]: bypassConfirms,
[SOCKET_CLI_UPDATE_OVERRIDES_IN_PACKAGE_LOCK_FILE]: bypassAlerts
} = await getIPC()
} = IPC
const { stderr: output, stdin: input } = process
let alerts: SocketPackageAlert[] = bypassAlerts
? []
Expand Down

0 comments on commit 21f3cf1

Please sign in to comment.