Skip to content

Commit d2e73a6

Browse files
feat: Add support for Vite V6 (#230)
1 parent 6c4a0ce commit d2e73a6

File tree

92 files changed

+5442
-4149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+5442
-4149
lines changed

.changeset/neat-beans-yell.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@codecov/nextjs-webpack-plugin": minor
3+
"@codecov/bundler-plugin-core": minor
4+
"@codecov/remix-vite-plugin": minor
5+
"@codecov/solidstart-plugin": minor
6+
"@codecov/sveltekit-plugin": minor
7+
"@codecov/bundle-analyzer": minor
8+
"@codecov/webpack-plugin": minor
9+
"@codecov/rollup-plugin": minor
10+
"@codecov/astro-plugin": minor
11+
"@codecov/nuxt-plugin": minor
12+
"@codecov/vite-plugin": minor
13+
---
14+
15+
Add in support for Vite V6, Astro V5, and update related dependencies

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ jobs:
285285
example:
286286
[
287287
"astro",
288+
"astro-5",
288289
"bundle-analyzer-cli",
289290
"bundle-analyzer-lib-cjs",
290291
"bundle-analyzer-lib-esm",
@@ -349,6 +350,8 @@ jobs:
349350
BASE_SHA: ${{ github.event.pull_request.base.sha }}
350351
ASTRO_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
351352
ASTRO_API_URL: ${{ secrets.CODECOV_API_URL }}
353+
ASTRO_5_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
354+
ASTRO_5_API_URL: ${{ secrets.CODECOV_API_URL }}
352355
BUNDLE_ANALYZER_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
353356
BUNDLE_ANALYZER_API_URL: ${{ secrets.CODECOV_API_URL }}
354357
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
@@ -382,6 +385,7 @@ jobs:
382385
example:
383386
[
384387
"astro",
388+
"astro-5",
385389
"bundle-analyzer-cli",
386390
"bundle-analyzer-lib-cjs",
387391
"bundle-analyzer-lib-esm",
@@ -446,6 +450,8 @@ jobs:
446450
BASE_SHA: ${{ github.event.pull_request.base.sha }}
447451
ASTRO_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
448452
ASTRO_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
453+
ASTRO_5_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
454+
ASTRO_5_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
449455
BUNDLE_ANALYZER_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
450456
BUNDLE_ANALYZER_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }}
451457
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
File renamed without changes.

examples/astro-5/README.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Astro Starter Kit: Basics
2+
3+
```sh
4+
npm create astro@latest -- --template basics
5+
```
6+
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
8+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
9+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
10+
11+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
12+
13+
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
14+
15+
## 🚀 Project Structure
16+
17+
Inside of your Astro project, you'll see the following folders and files:
18+
19+
```text
20+
/
21+
├── public/
22+
│ └── favicon.svg
23+
├── src/
24+
│ ├── layouts/
25+
│ │ └── Layout.astro
26+
│ └── pages/
27+
│ └── index.astro
28+
└── package.json
29+
```
30+
31+
To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
32+
33+
## 🧞 Commands
34+
35+
All commands are run from the root of the project, from a terminal:
36+
37+
| Command | Action |
38+
| :------------------------ | :----------------------------------------------- |
39+
| `npm install` | Installs dependencies |
40+
| `npm run dev` | Starts local dev server at `localhost:4321` |
41+
| `npm run build` | Build your production site to `./dist/` |
42+
| `npm run preview` | Preview your build locally, before deploying |
43+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
44+
| `npm run astro -- --help` | Get help using the Astro CLI |
45+
46+
## 👀 Want to learn more?
47+
48+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

examples/astro-5/astro.config.mjs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
4+
import react from "@astrojs/react";
5+
6+
import node from "@astrojs/node";
7+
8+
import codecovAstroPlugin from "@codecov/astro-plugin";
9+
// https://astro.build/config
10+
export default defineConfig({
11+
output: "server",
12+
adapter: node({
13+
mode: "standalone",
14+
}),
15+
integrations: [
16+
react(),
17+
codecovAstroPlugin({
18+
enableBundleAnalysis: true,
19+
bundleName: "@codecov/example-astro-5-app",
20+
uploadToken: process.env.ASTRO_5_UPLOAD_TOKEN,
21+
apiUrl: process.env.ASTRO_5_API_URL,
22+
gitService: "github",
23+
debug: true,
24+
}),
25+
],
26+
});

examples/astro-5/package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "astro-5",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"build": "astro build",
8+
"preview": "astro preview",
9+
"astro": "astro"
10+
},
11+
"dependencies": {
12+
"@astrojs/node": "^9.0.0",
13+
"@astrojs/react": "^4.1.1",
14+
"@codecov/astro-plugin": "workspace:*",
15+
"@types/react": "^19.0.1",
16+
"@types/react-dom": "^19.0.2",
17+
"astro": "^5.0.9",
18+
"react": "^19.0.0",
19+
"react-dom": "^19.0.0"
20+
}
21+
}

examples/astro-5/src/assets/astro.svg

+1
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
import astroLogo from '../assets/astro.svg';
3+
import background from '../assets/background.svg';
4+
---
5+
6+
<div id="container">
7+
<img id="background" src={background.src} alt="" fetchpriority="high" />
8+
<main>
9+
<section id="hero">
10+
<a href="https://astro.build"
11+
><img src={astroLogo.src} width="115" height="48" alt="Astro Homepage" /></a
12+
>
13+
<h1>
14+
To get started, open the <code><pre>src/pages</pre></code> directory in your project.
15+
</h1>
16+
<section id="links">
17+
<a class="button" href="https://docs.astro.build">Read our docs</a>
18+
<a href="https://astro.build/chat"
19+
>Join our Discord <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"
20+
><path
21+
fill="currentColor"
22+
d="M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z"
23+
></path></svg
24+
>
25+
</a>
26+
</section>
27+
</section>
28+
</main>
29+
30+
<a href="https://astro.build/blog/astro-5/" id="news" class="box">
31+
<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"
32+
><path
33+
d="M24.667 12c1.333 1.414 2 3.192 2 5.334 0 4.62-4.934 5.7-7.334 12C18.444 28.567 18 27.456 18 26c0-4.642 6.667-7.053 6.667-14Zm-5.334-5.333c1.6 1.65 2.4 3.43 2.4 5.333 0 6.602-8.06 7.59-6.4 17.334C13.111 27.787 12 25.564 12 22.666c0-4.434 7.333-8 7.333-16Zm-6-5.333C15.111 3.555 16 5.556 16 7.333c0 8.333-11.333 10.962-5.333 22-3.488-.774-6-4-6-8 0-8.667 8.666-10 8.666-20Z"
34+
fill="#111827"></path></svg
35+
>
36+
<h2>What's New in Astro 5.0?</h2>
37+
<p>
38+
From content layers to server islands, click to learn more about the new features and
39+
improvements in Astro 5.0
40+
</p>
41+
</a>
42+
</div>
43+
44+
<style>
45+
#background {
46+
position: fixed;
47+
top: 0;
48+
left: 0;
49+
width: 100%;
50+
height: 100%;
51+
z-index: -1;
52+
filter: blur(100px);
53+
}
54+
55+
#container {
56+
font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
57+
height: 100%;
58+
}
59+
60+
main {
61+
height: 100%;
62+
display: flex;
63+
justify-content: center;
64+
}
65+
66+
#hero {
67+
display: flex;
68+
align-items: start;
69+
flex-direction: column;
70+
justify-content: center;
71+
padding: 16px;
72+
}
73+
74+
h1 {
75+
font-size: 22px;
76+
margin-top: 0.25em;
77+
}
78+
79+
#links {
80+
display: flex;
81+
gap: 16px;
82+
}
83+
84+
#links a {
85+
display: flex;
86+
align-items: center;
87+
padding: 10px 12px;
88+
color: #111827;
89+
text-decoration: none;
90+
transition: color 0.2s;
91+
}
92+
93+
#links a:hover {
94+
color: rgb(78, 80, 86);
95+
}
96+
97+
#links a svg {
98+
height: 1em;
99+
margin-left: 8px;
100+
}
101+
102+
#links a.button {
103+
color: white;
104+
background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
105+
box-shadow:
106+
inset 0 0 0 1px rgba(255, 255, 255, 0.12),
107+
inset 0 -2px 0 rgba(0, 0, 0, 0.24);
108+
border-radius: 10px;
109+
}
110+
111+
#links a.button:hover {
112+
color: rgb(230, 230, 230);
113+
box-shadow: none;
114+
}
115+
116+
pre {
117+
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas,
118+
'DejaVu Sans Mono', monospace;
119+
font-weight: normal;
120+
background: linear-gradient(14deg, #d83333 0%, #f041ff 100%);
121+
-webkit-background-clip: text;
122+
-webkit-text-fill-color: transparent;
123+
background-clip: text;
124+
margin: 0;
125+
}
126+
127+
h2 {
128+
margin: 0 0 1em;
129+
font-weight: normal;
130+
color: #111827;
131+
font-size: 20px;
132+
}
133+
134+
p {
135+
color: #4b5563;
136+
font-size: 16px;
137+
line-height: 24px;
138+
letter-spacing: -0.006em;
139+
margin: 0;
140+
}
141+
142+
code {
143+
display: inline-block;
144+
background:
145+
linear-gradient(66.77deg, #f3cddd 0%, #f5cee7 100%) padding-box,
146+
linear-gradient(155deg, #d83333 0%, #f041ff 18%, #f5cee7 45%) border-box;
147+
border-radius: 8px;
148+
border: 1px solid transparent;
149+
padding: 6px 8px;
150+
}
151+
152+
.box {
153+
padding: 16px;
154+
background: rgba(255, 255, 255, 1);
155+
border-radius: 16px;
156+
border: 1px solid white;
157+
}
158+
159+
#news {
160+
position: absolute;
161+
bottom: 16px;
162+
right: 16px;
163+
max-width: 300px;
164+
text-decoration: none;
165+
transition: background 0.2s;
166+
backdrop-filter: blur(50px);
167+
}
168+
169+
#news:hover {
170+
background: rgba(255, 255, 255, 0.55);
171+
}
172+
173+
@media screen and (max-height: 368px) {
174+
#news {
175+
display: none;
176+
}
177+
}
178+
179+
@media screen and (max-width: 768px) {
180+
#container {
181+
display: flex;
182+
flex-direction: column;
183+
}
184+
185+
#hero {
186+
display: block;
187+
padding-top: 10%;
188+
}
189+
190+
#links {
191+
flex-wrap: wrap;
192+
}
193+
194+
#links a.button {
195+
padding: 14px 18px;
196+
}
197+
198+
#news {
199+
right: 16px;
200+
left: 16px;
201+
bottom: 2.5rem;
202+
max-width: 100%;
203+
}
204+
205+
h1 {
206+
line-height: 1.5;
207+
}
208+
}
209+
</style>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width" />
6+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7+
<meta name="generator" content={Astro.generator} />
8+
<title>Astro Basics</title>
9+
</head>
10+
<body>
11+
<slot />
12+
</body>
13+
</html>
14+
15+
<style>
16+
html,
17+
body {
18+
margin: 0;
19+
width: 100%;
20+
height: 100%;
21+
}
22+
</style>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import Welcome from '../components/Welcome.astro';
3+
import Layout from '../layouts/Layout.astro';
4+
5+
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
6+
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
7+
---
8+
9+
<Layout>
10+
<Welcome />
11+
</Layout>

0 commit comments

Comments
 (0)