Skip to content

Commit e83b509

Browse files
florian-lefebvreematipico
andauthoredDec 20, 2023
chore: upgrade vite to latest (close #9443) (#9452)
* chore: upgrade vite to latest * chore: add changeset * fix: enforce type * fix: postcss * chore: log messages * fix: take vite re-optimizing message into account --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
1 parent 7ae4928 commit e83b509

File tree

11 files changed

+77
-51
lines changed

11 files changed

+77
-51
lines changed
 

‎.changeset/eleven-hairs-peel.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@astrojs/tailwind': patch
3+
'@astrojs/markdoc': patch
4+
'@astrojs/svelte': patch
5+
'@astrojs/react': patch
6+
'@astrojs/mdx': patch
7+
'@astrojs/vue': patch
8+
'astro': patch
9+
---
10+
11+
Upgrades vite to latest

‎packages/astro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
"tsconfck": "^3.0.0",
169169
"unist-util-visit": "^5.0.0",
170170
"vfile": "^6.0.1",
171-
"vite": "^5.0.0",
171+
"vite": "^5.0.10",
172172
"vitefu": "^0.2.5",
173173
"which-pm": "^2.1.1",
174174
"yargs-parser": "^21.1.1",

‎packages/astro/test/cli.test.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ describe('astro cli', () => {
104104
const proc = cli('dev', '--root', fileURLToPath(projectRootURL));
105105
const { messages } = await parseCliDevStart(proc);
106106

107-
expect(messages[0]).to.contain('astro');
108-
expect(messages[0]).to.contain(pkgVersion);
109-
expect(messages[0]).to.contain('ready in');
107+
const index = messages[0].includes("[vite]") ? 1 : 0
108+
109+
expect(messages[index]).to.contain('astro');
110+
expect(messages[index]).to.contain(pkgVersion);
111+
expect(messages[index]).to.contain('ready in');
110112
});
111113

112114
['dev', 'preview'].forEach((cmd) => {

‎packages/integrations/markdoc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"devalue": "^4.3.2",
9090
"linkedom": "^0.16.4",
9191
"mocha": "^10.2.0",
92-
"vite": "^5.0.0"
92+
"vite": "^5.0.10"
9393
},
9494
"engines": {
9595
"node": ">=18.14.1"

‎packages/integrations/mdx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"remark-shiki-twoslash": "^3.1.3",
7676
"remark-toc": "^9.0.0",
7777
"unified": "^11.0.4",
78-
"vite": "^5.0.0"
78+
"vite": "^5.0.10"
7979
},
8080
"engines": {
8181
"node": ">=18.14.1"

‎packages/integrations/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"cheerio": "1.0.0-rc.12",
5959
"react": "^18.1.0",
6060
"react-dom": "^18.1.0",
61-
"vite": "^5.0.0",
61+
"vite": "^5.0.10",
6262
"mocha": "^10.2.0"
6363
},
6464
"peerDependencies": {

‎packages/integrations/svelte/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"astro": "workspace:*",
5050
"astro-scripts": "workspace:*",
5151
"svelte": "^4.2.5",
52-
"vite": "^5.0.0"
52+
"vite": "^5.0.10"
5353
},
5454
"peerDependencies": {
5555
"astro": "^4.0.0",

‎packages/integrations/tailwind/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"astro": "workspace:*",
4141
"astro-scripts": "workspace:*",
4242
"tailwindcss": "^3.3.5",
43-
"vite": "^5.0.0"
43+
"vite": "^5.0.10"
4444
},
4545
"peerDependencies": {
4646
"astro": "^3.0.0 || ^4.0.0",

‎packages/integrations/tailwind/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function getPostCssConfig(
2424
async function getViteConfiguration(
2525
tailwindConfigPath: string | undefined,
2626
viteConfig: UserConfig
27-
) {
27+
): Promise<Partial<UserConfig>> {
2828
// We need to manually load postcss config files because when inlining the tailwind and autoprefixer plugins,
2929
// that causes vite to ignore postcss config files
3030
const postcssConfigResult = await getPostCssConfig(viteConfig.root, viteConfig.css?.postcss);
@@ -38,7 +38,7 @@ async function getViteConfiguration(
3838
return {
3939
css: {
4040
postcss: {
41-
options: postcssOptions,
41+
...postcssOptions,
4242
plugins: postcssPlugins,
4343
},
4444
},

‎packages/integrations/vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"cheerio": "1.0.0-rc.12",
5454
"linkedom": "^0.16.4",
5555
"mocha": "^10.2.0",
56-
"vite": "^5.0.0",
56+
"vite": "^5.0.10",
5757
"vue": "^3.3.8"
5858
},
5959
"peerDependencies": {

‎pnpm-lock.yaml

+52-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.