Skip to content

Commit

Permalink
chore: upgrade vite to latest (close #9443) (#9452)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
florian-lefebvre and ematipico committed Dec 20, 2023
1 parent 7ae4928 commit e83b509
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 51 deletions.
11 changes: 11 additions & 0 deletions .changeset/eleven-hairs-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@astrojs/tailwind': patch
'@astrojs/markdoc': patch
'@astrojs/svelte': patch
'@astrojs/react': patch
'@astrojs/mdx': patch
'@astrojs/vue': patch
'astro': patch
---

Upgrades vite to latest
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"tsconfck": "^3.0.0",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
"vite": "^5.0.0",
"vite": "^5.0.10",
"vitefu": "^0.2.5",
"which-pm": "^2.1.1",
"yargs-parser": "^21.1.1",
Expand Down
8 changes: 5 additions & 3 deletions packages/astro/test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ describe('astro cli', () => {
const proc = cli('dev', '--root', fileURLToPath(projectRootURL));
const { messages } = await parseCliDevStart(proc);

expect(messages[0]).to.contain('astro');
expect(messages[0]).to.contain(pkgVersion);
expect(messages[0]).to.contain('ready in');
const index = messages[0].includes("[vite]") ? 1 : 0

expect(messages[index]).to.contain('astro');
expect(messages[index]).to.contain(pkgVersion);
expect(messages[index]).to.contain('ready in');
});

['dev', 'preview'].forEach((cmd) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"devalue": "^4.3.2",
"linkedom": "^0.16.4",
"mocha": "^10.2.0",
"vite": "^5.0.0"
"vite": "^5.0.10"
},
"engines": {
"node": ">=18.14.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"remark-shiki-twoslash": "^3.1.3",
"remark-toc": "^9.0.0",
"unified": "^11.0.4",
"vite": "^5.0.0"
"vite": "^5.0.10"
},
"engines": {
"node": ">=18.14.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"cheerio": "1.0.0-rc.12",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"vite": "^5.0.0",
"vite": "^5.0.10",
"mocha": "^10.2.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"svelte": "^4.2.5",
"vite": "^5.0.0"
"vite": "^5.0.10"
},
"peerDependencies": {
"astro": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"tailwindcss": "^3.3.5",
"vite": "^5.0.0"
"vite": "^5.0.10"
},
"peerDependencies": {
"astro": "^3.0.0 || ^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/tailwind/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function getPostCssConfig(
async function getViteConfiguration(
tailwindConfigPath: string | undefined,
viteConfig: UserConfig
) {
): Promise<Partial<UserConfig>> {
// We need to manually load postcss config files because when inlining the tailwind and autoprefixer plugins,
// that causes vite to ignore postcss config files
const postcssConfigResult = await getPostCssConfig(viteConfig.root, viteConfig.css?.postcss);
Expand All @@ -38,7 +38,7 @@ async function getViteConfiguration(
return {
css: {
postcss: {
options: postcssOptions,
...postcssOptions,
plugins: postcssPlugins,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"cheerio": "1.0.0-rc.12",
"linkedom": "^0.16.4",
"mocha": "^10.2.0",
"vite": "^5.0.0",
"vite": "^5.0.10",
"vue": "^3.3.8"
},
"peerDependencies": {
Expand Down
91 changes: 52 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e83b509

Please sign in to comment.