mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-10 14:06:30 +00:00
Check nodes explicitly to be null instead of relying on fallback
Cleaner, don't check twice and increases cov
This commit is contained in:
parent
9146253594
commit
f0c2dceddc
1 changed files with 6 additions and 6 deletions
|
@ -24,17 +24,17 @@ export function extractPackageFile(
|
|||
|
||||
const flakeLock = flakeLockParsed.data;
|
||||
|
||||
for (const depName of Object.keys(flakeLock.nodes ?? {})) {
|
||||
// skip if there are no inputs
|
||||
if (flakeLock.nodes === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (const depName of Object.keys(flakeLock.nodes)) {
|
||||
// the root input is a magic string for the entrypoint and only references other flake inputs
|
||||
if (depName === 'root') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip if there are no inputs
|
||||
if (flakeLock.nodes === undefined) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip all locked nodes which are not in the flake.nix and cannot be updated
|
||||
if (!(depName in (flakeLock.nodes['root'].inputs ?? []))) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue