Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(npm): add detection for overrides block #15351

Merged
merged 19 commits into from
May 17, 2022
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added eslint ignore fix problem
  • Loading branch information
hasanwhitesource committed May 16, 2022
commit 74aa510c94464da23328b84e38e458b14f39707a
3 changes: 2 additions & 1 deletion lib/modules/manager/npm/update/dependency/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export function updateDependency({
}
}
} else {
// eslint-disable @typescript-eslint/no-unnecessary-type-assertion
oldVersion = parsedContents[depType as NpmDepType]![depName] as string;
}
if (oldVersion === newValue) {
Expand Down Expand Up @@ -279,7 +280,7 @@ function overrideDepPosition(

function isOverrideObject(upgrade: Upgrade<NpmManagerData>): boolean {
return (
!is.undefined(upgrade.managerData?.parents) &&
is.array(upgrade.managerData?.parents, is.nonEmptyStringAndNotWhitespace) &&
upgrade.depType === 'overrides'
);
}