Skip to content

Commit

Permalink
fix: populate isLockFileMaintenance (#14005)
Browse files Browse the repository at this point in the history
Lock file maintenance was broken as various managers rely on the
`isLockFileMaintenance` update flag to be set. This was not the
case as its config is generated afterwards (without the is*
auto-propagation).
  • Loading branch information
msw-kialo authored Feb 5, 2022
1 parent 5f99028 commit 6752419
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/workers/repository/updates/flatten.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ describe('workers/repository/updates/flatten', () => {
res.filter((update) => update.sourceRepoName)[2].sourceRepoName
).toBe('node');
expect(
res.filter((r) => r.updateType === 'lockFileMaintenance')
res.filter(
(r) =>
r.updateType === 'lockFileMaintenance' && r.isLockFileMaintenance
)
).toHaveLength(2);
expect(res.filter((r) => r.isVulnerabilityAlert)).toHaveLength(1);
});
Expand Down
1 change: 1 addition & 0 deletions lib/workers/repository/updates/flatten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export async function flattenUpdates(
packageFileConfig.lockFileMaintenance
);
lockFileConfig.updateType = 'lockFileMaintenance';
lockFileConfig.isLockFileMaintenance = true;
lockFileConfig = applyPackageRules(lockFileConfig);
// Apply lockFileMaintenance and packageRules again
lockFileConfig = mergeChildConfig(
Expand Down

0 comments on commit 6752419

Please sign in to comment.