-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(fvm): Support v3 config file #27216
feat(fvm): Support v3 config file #27216
Conversation
Signed-off-by: provokateurin <kate@provokateurin.de>
export function extractPackageFile( | ||
content: string, | ||
packageFile: string, | ||
): PackageFileContent | null { | ||
let fvmConfig: FvmConfig; | ||
let fvmConfig: any; |
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 any! use zod Schema
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, can you elaborate? I have little experience Typescript and none with zod.
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.
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.
We also have some developer documentation for Zod here:
https://github.com/renovatebot/renovate/blob/main/docs/development/zod.md
@@ -6,6 +6,6 @@ export { extractPackageFile } from './extract'; | |||
export const supportedDatasources = [FlutterVersionDatasource.id]; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)\\.fvm/fvm_config\\.json$'], | |||
fileMatch: ['(^|/)\\.fvm(?:/fvm_config\\.json|rc)$'], |
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.
Split this in two different regexes for better readability:
fileMatch: ['(^|/)\\.fvm(?:/fvm_config\\.json|rc)$'], | |
fileMatch: [ | |
'(^|/)\\.fvm/fvm_config\\.json$', | |
'(^|/)\\.fvmrc$' | |
], |
export function extractPackageFile( | ||
content: string, | ||
packageFile: string, | ||
): PackageFileContent | null { | ||
let fvmConfig: FvmConfig; | ||
let fvmConfig: any; |
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.
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 I didn't have the time to work on this. I will try to have a look again soon. |
Changes
fvm v3 has a new config file at
.fvmrc
and uses a slightly different syntax in the config file.Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: