Skip to content

Commit 11329c0

Browse files
committedMay 27, 2025
Use debugLog in place of logger for unfound arborist nodes
·
v1.0.60v0.15.25
1 parent b2db01a commit 11329c0

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed
 

‎src/commands/fix/npm-fix.mts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ export async function npmFix(
216216
)
217217

218218
if (!oldVersions.length) {
219-
logger.warn(
220-
`Unexpected condition: ${name} not found in node_modules.\n`,
221-
)
219+
debugLog(`${name} not found, skipping.\n`)
222220
// Skip to next package.
223221
logger.dedent()
224222
spinner?.dedent()
@@ -246,11 +244,7 @@ export async function npmFix(
246244

247245
const node = findPackageNode(actualTree, name, oldVersion)
248246
if (!node) {
249-
if (hasAnnouncedWorkspace) {
250-
logger.warn(
251-
`Unexpected condition: Arborist node not found, skipping ${oldId}.`,
252-
)
253-
}
247+
debugLog(`${oldId} not found, skipping.`)
254248
continue oldVersionsLoop
255249
}
256250

‎src/commands/fix/pnpm-fix.mts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ export async function pnpmFix(
312312
)
313313

314314
if (!oldVersions.length) {
315-
logger.warn(
316-
`Unexpected condition: ${name} not found in node_modules.\n`,
317-
)
315+
debugLog(`${name} not found, skipping.\n`)
318316
// Skip to next package.
319317
logger.dedent()
320318
spinner?.dedent()
@@ -350,11 +348,7 @@ export async function pnpmFix(
350348

351349
const node = findPackageNode(actualTree, name, oldVersion)
352350
if (!node) {
353-
if (hasAnnouncedWorkspace) {
354-
logger.warn(
355-
`Unexpected condition: Arborist node not found, skipping ${oldId}.`,
356-
)
357-
}
351+
debugLog(`${oldId} not found, skipping.`)
358352
continue oldVersionsLoop
359353
}
360354
infosLoop: for (const {
@@ -446,7 +440,7 @@ export async function pnpmFix(
446440
)
447441
// eslint-disable-next-line no-await-in-loop
448442
if (!(await editablePkgJson.save({ ignoreWhitespace: true }))) {
449-
debugLog(`${workspace}/package.json not changed, skipping.`)
443+
debugLog(`${workspace}/package.json unchanged, skipping.`)
450444
// Reset things just in case.
451445
if (isCi) {
452446
// eslint-disable-next-line no-await-in-loop

0 commit comments

Comments
 (0)
Please sign in to comment.