-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(npm): include credentials without host type for lock file generation #34267
base: main
Are you sure you want to change the base?
fix(npm): include credentials without host type for lock file generation #34267
Conversation
.getAll() | ||
.filter((rule) => rule.hostType === null || rule.hostType === undefined); | ||
const effectiveHostRules = npmHostRules.concat(noTypeHostRules); | ||
logger.debug(`Found ${effectiveHostRules.length} npm host rule(s)`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you log how many were found with hostType=npm and then how many were found with empty hostType?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be resolved already?
f8a262a
to
027c653
Compare
token: 'sometoken', | ||
}); | ||
const res = processHostRules(); | ||
expect(res).toMatchInlineSnapshot( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no snapshot, use toEqual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Changed now.
So far, the post-update task for generating the NPM lock file did not pick up credentials from `hostRules`` that lacked a `hostType`. This was inconsistent to the way renovate had previously determined updatable dependencies. The code path there also included `ruleRules` without a `hostType` defined. As a result, PRs would potentially fail because the lock file generation did not have the same set of credentials available as the trigger for creating a PR at all. Now, lock file generation also picks up credentials without a defined `hostType`. Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
6e1b0bd
to
e18d1b0
Compare
please avoid force push |
Changes
So far, the post-update task for generating the NPM lock file did not pick up credentials from
hostRules
that lacked ahostType
. This was inconsistent to the way renovate had previously determined updatable dependencies. The code path there also includedruleRules
without ahostType
defined. As a result, PRs would potentially fail because the lock file generation did not have the same set of credentials available as the trigger for creating a PR at all.Now, lock file generation also picks up credentials without a defined
hostType
.Context
Related discussion: #34203
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: