Skip to content

Commit a7dd8a0

Browse files
committed
Cleanup IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE] use
1 parent 21f3cf1 commit a7dd8a0

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Diff for: src/shadow/arborist/lib/arborist/diff.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import constants from '../../../../constants'
33
import type { Diff } from './types'
44
import type { SafeNode } from '../node'
55

6-
const { LOOP_SENTINEL, NPM_REGISTRY_URL, SOCKET_CLI_FIX_PACKAGE_LOCK_FILE } =
7-
constants
6+
const { LOOP_SENTINEL, NPM_REGISTRY_URL } = constants
87

98
function getUrlOrigin(input: string): string {
109
try {
@@ -28,11 +27,9 @@ export function getPackagesToQueryFromDiff(
2827
diff_: Diff | null,
2928
options?: GetPackagesToQueryFromDiffOptions
3029
): PackageDetail[] {
31-
const {
32-
// Lazily access constants.IPC.
33-
includeUnchanged = constants.IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE],
34-
includeUnknownOrigin = false
35-
} = <GetPackagesToQueryFromDiffOptions>{
30+
const { includeUnchanged = false, includeUnknownOrigin = false } = <
31+
GetPackagesToQueryFromDiffOptions
32+
>{
3633
__proto__: null,
3734
...options
3835
}

Diff for: src/shadow/arborist/lib/arborist/reify.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export async function reify(
368368
// We are assuming `this[_diffTrees]()` has been called by `super.reify(...)`:
369369
// https://github.com/npm/cli/blob/v11.0.0/workspaces/arborist/lib/arborist/reify.js#L141
370370
let needInfoOn = getPackagesToQueryFromDiff(this.diff, {
371-
includeUnchanged: IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]
371+
includeUnchanged: !!IPC[SOCKET_CLI_FIX_PACKAGE_LOCK_FILE]
372372
})
373373
if (!needInfoOn.length) {
374374
// Nothing to check, hmmm already installed or all private?

0 commit comments

Comments
 (0)