Skip to content

Commit ff051e6

Browse files
authored
Add debug to failed lockfile search (#557)
1 parent a115340 commit ff051e6

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"@socketregistry/is-interactive": "1.0.5",
108108
"@socketregistry/packageurl-js": "1.0.6",
109109
"@socketsecurity/config": "2.1.3",
110-
"@socketsecurity/registry": "1.0.181",
110+
"@socketsecurity/registry": "1.0.182",
111111
"@socketsecurity/sdk": "1.4.35",
112112
"@types/blessed": "0.1.25",
113113
"@types/cmd-shim": "5.0.2",

src/commands/fix/npm-fix.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'node:path'
22

33
import { getManifestData } from '@socketsecurity/registry'
44
import { arrayUnique } from '@socketsecurity/registry/lib/arrays'
5-
import { debugLog } from '@socketsecurity/registry/lib/debug'
5+
import { debugLog, isDebug } from '@socketsecurity/registry/lib/debug'
66
import { logger } from '@socketsecurity/registry/lib/logger'
77
import { runScript } from '@socketsecurity/registry/lib/npm'
88
import {
@@ -173,6 +173,9 @@ export async function npmFix(
173173
logger.warn(
174174
`Unexpected condition: Lockfile entries not found for ${name}.\n`
175175
)
176+
if (isDebug()) {
177+
console.dir(arb.idealTree!, { depth: 999 })
178+
}
176179
continue
177180
}
178181

src/commands/fix/pnpm-fix.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ export async function pnpmFix(
226226
logger.warn(
227227
`Unexpected condition: Lockfile entries not found for ${name}.\n`
228228
)
229+
if (isDebug()) {
230+
console.dir(actualTree, { depth: 999 })
231+
}
229232
continue
230233
}
231234

0 commit comments

Comments
 (0)