Skip to content

Commit d2e73a6

Browse files
authored
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

Lines changed: 15 additions & 0 deletions
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

Lines changed: 6 additions & 0 deletions
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 }}

examples/astro-5/README.md

Lines changed: 48 additions & 0 deletions
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

Lines changed: 26 additions & 0 deletions
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

Lines changed: 21 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)