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
refactor(npm): Use schema for datasource #22318
refactor(npm): Use schema for datasource #22318
Conversation
Waiting for #22314 |
# Conflicts: # lib/modules/datasource/npm/get.ts
z.object({ | ||
repository: PackageSource, | ||
homepage: z.string().nullish().catch(null), | ||
deprecated: z.string().nullish().catch('Unknown deprecation reason'), |
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.
catch will only be used if it's a wrong type that the expected string?
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.
I'm not sure if deprecated
can be just true
, so if it is, it will be converted to this default string
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.
BTW if it's false
then it will be converted to this string too, but I don't worry about false
as much as I worry about true
.
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.
maybe better allow bool and transform to string if true and log debug if false?
🤔 |
Changes
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: