Skip to content

Commit 0f058a9

Browse files
authored
ci: update react-swc plugin version in create-vite by renovate (#19394)
1 parent 367cec1 commit 0f058a9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/renovate.json5

+9
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,13 @@
2828
// breaking changes
2929
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)
3030
],
31+
"customManagers": [
32+
{
33+
"customType": "regex",
34+
"fileMatch": ["packages\/create-vite\/src\/index\\.ts$"],
35+
"matchStrings": [
36+
"\/\/\\s*renovate:\\s+datasource=(?<datasource>\\S+)\\s+depName=(?<depName>\\S+)\\s+(?:var|let|const)\\s+\\S+\\s*=\\s*[\"'](?<currentValue>[^\"']+)[\"']",
37+
],
38+
},
39+
],
3140
}

packages/create-vite/src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,13 @@ function pkgFromUserAgent(userAgent: string | undefined): PkgInfo | undefined {
593593
}
594594

595595
function setupReactSwc(root: string, isTs: boolean) {
596+
// renovate: datasource=npm depName=@vitejs/plugin-react-swc
597+
const reactSwcPluginVersion = '3.7.2'
598+
596599
editFile(path.resolve(root, 'package.json'), (content) => {
597600
return content.replace(
598601
/"@vitejs\/plugin-react": ".+?"/,
599-
`"@vitejs/plugin-react-swc": "^3.7.2"`,
602+
`"@vitejs/plugin-react-swc": "^${reactSwcPluginVersion}"`,
600603
)
601604
})
602605
editFile(

0 commit comments

Comments
 (0)