Skip to content

Commit 8430805

Browse files
authored
Skip to next package when not found in lockfile (#574)
1 parent f07c8dd commit 8430805

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/commands/fix/npm-fix.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export async function npmFix(
164164
const availableVersions = Object.keys(packument.versions)
165165
const warningsForAfter = new Set<string>()
166166

167+
// eslint-disable-next-line no-unused-labels
167168
pkgJsonPathsLoop: for (const pkgJsonPath of pkgJsonPaths) {
168169
const pkgPath = path.dirname(pkgJsonPath)
169170
const isWorkspaceRoot =
@@ -188,7 +189,8 @@ export async function npmFix(
188189
logger.warn(
189190
`Unexpected condition: Lockfile entries not found for ${name}.\n`,
190191
)
191-
continue pkgJsonPathsLoop
192+
// Skip to next package.
193+
continue infoEntriesLoop
192194
}
193195

194196
// Always re-read the editable package.json to avoid stale mutations

src/commands/fix/pnpm-fix.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ export async function pnpmFix(
217217
const availableVersions = Object.keys(packument.versions)
218218
const warningsForAfter = new Set<string>()
219219

220+
// eslint-disable-next-line no-unused-labels
220221
pkgJsonPathsLoop: for (const pkgJsonPath of pkgJsonPaths) {
221222
const pkgPath = path.dirname(pkgJsonPath)
222223
const isWorkspaceRoot =
@@ -241,7 +242,8 @@ export async function pnpmFix(
241242
logger.warn(
242243
`Unexpected condition: Lockfile entries not found for ${name}.\n`,
243244
)
244-
continue pkgJsonPathsLoop
245+
// Skip to next package.
246+
continue infoEntriesLoop
245247
}
246248

247249
// Always re-read the editable package.json to avoid stale mutations

0 commit comments

Comments
 (0)