Skip to content

Commit 297cd29

Browse files
authored
feat: Add BA support for SvelteKit (#126)
Add new plugin to handle SvelteKit specific cases. GH #94
1 parent ddcd055 commit 297cd29

File tree

95 files changed

+38642
-6671
lines changed

Some content is hidden

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

95 files changed

+38642
-6671
lines changed

.changeset/light-ants-thank.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@codecov/bundler-plugin-core": patch
3+
"@codecov/nuxt-plugin": patch
4+
"@codecov/rollup-plugin": patch
5+
"@codecov/sveltekit-plugin": patch
6+
"@codecov/vite-plugin": patch
7+
"@codecov/webpack-plugin": patch
8+
---
9+
10+
Add in support for bundle analysis for SvelteKit through new SvelteKit plugin

.changeset/orange-lemons-run.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@codecov/bundler-plugin-core": patch
3+
"@codecov/sveltekit-plugin": patch
4+
"@codecov/webpack-plugin": patch
5+
"@codecov/rollup-plugin": patch
6+
"@codecov/nuxt-plugin": patch
7+
"@codecov/vite-plugin": patch
8+
---
9+
10+
Update license to 2024

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const config = {
2929
"./packages/bundler-plugin-core/tsconfig.json",
3030
"./packages/nuxt-plugin/tsconfig.json",
3131
"./packages/rollup-plugin/tsconfig.json",
32+
"./packages/sveltekit-plugin/tsconfig.json",
3233
"./packages/vite-plugin/tsconfig.json",
3334
"./packages/webpack-plugin/tsconfig.json",
3435
],

.github/workflows/ci.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install pnpm
3030
uses: pnpm/action-setup@v2
3131
with:
32-
version: 8
32+
version: 9
3333
run_install: false
3434

3535
- name: Get pnpm store directory
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install pnpm
7070
uses: pnpm/action-setup@v2
7171
with:
72-
version: 8
72+
version: 9
7373
run_install: false
7474

7575
- name: Get pnpm store directory
@@ -115,7 +115,7 @@ jobs:
115115
- name: Install pnpm
116116
uses: pnpm/action-setup@v2
117117
with:
118-
version: 8
118+
version: 9
119119
run_install: false
120120

121121
- name: Get pnpm store directory
@@ -161,7 +161,7 @@ jobs:
161161
- name: Install pnpm
162162
uses: pnpm/action-setup@v2
163163
with:
164-
version: 8
164+
version: 9
165165
run_install: false
166166

167167
- name: Get pnpm store directory
@@ -218,7 +218,7 @@ jobs:
218218
url: ${{ secrets.CODECOV_STAGING_URL }}
219219

220220
integration-test:
221-
name: Run Integration Tests (Node ${{ matrix.node-version }})
221+
name: Run integration tests (Node ${{ matrix.node-version }})
222222
needs: install
223223
runs-on: ubuntu-latest
224224
services:
@@ -244,7 +244,7 @@ jobs:
244244
- name: Install pnpm
245245
uses: pnpm/action-setup@v2
246246
with:
247-
version: 8
247+
version: 9
248248
run_install: false
249249

250250
- name: Get pnpm store directory
@@ -279,7 +279,7 @@ jobs:
279279
strategy:
280280
fail-fast: false
281281
matrix:
282-
example: ["next-js", "nuxt", "rollup", "vite", "webpack"]
282+
example: ["next-js", "nuxt", "rollup", "sveltekit", "vite", "webpack"]
283283
steps:
284284
- name: Checkout
285285
uses: actions/checkout@v4
@@ -294,7 +294,7 @@ jobs:
294294
- name: Install pnpm
295295
uses: pnpm/action-setup@v2
296296
with:
297-
version: 8
297+
version: 9
298298
run_install: false
299299

300300
- name: Get pnpm store directory
@@ -342,7 +342,7 @@ jobs:
342342
strategy:
343343
fail-fast: false
344344
matrix:
345-
example: ["next-js", "nuxt", "rollup", "vite", "webpack"]
345+
example: ["next-js", "nuxt", "rollup", "sveltekit", "vite", "webpack"]
346346
steps:
347347
- name: Checkout
348348
uses: actions/checkout@v4
@@ -357,7 +357,7 @@ jobs:
357357
- name: Install pnpm
358358
uses: pnpm/action-setup@v2
359359
with:
360-
version: 8
360+
version: 9
361361
run_install: false
362362

363363
- name: Get pnpm store directory
@@ -410,6 +410,7 @@ jobs:
410410
"bundler-plugin-core",
411411
"nuxt-plugin",
412412
"rollup-plugin",
413+
"sveltekit-plugin",
413414
"vite-plugin",
414415
"webpack-plugin",
415416
]
@@ -427,7 +428,7 @@ jobs:
427428
- name: Install pnpm
428429
uses: pnpm/action-setup@v2
429430
with:
430-
version: 8
431+
version: 9
431432
run_install: false
432433

433434
- name: Get pnpm store directory
@@ -474,6 +475,7 @@ jobs:
474475
"bundler-plugin-core",
475476
"nuxt-plugin",
476477
"rollup-plugin",
478+
"sveltekit-plugin",
477479
"vite-plugin",
478480
"webpack-plugin",
479481
]
@@ -491,7 +493,7 @@ jobs:
491493
- name: Install pnpm
492494
uses: pnpm/action-setup@v2
493495
with:
494-
version: 8
496+
version: 9
495497
run_install: false
496498

497499
- name: Get pnpm store directory

.github/workflows/prepare-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup pnpm & install dependencies
2222
uses: pnpm/action-setup@v2
2323
with:
24-
version: 8
24+
version: 9
2525
run_install: true
2626

2727
- name: Create Release Pull Request

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup pnpm
3131
uses: pnpm/action-setup@v2
3232
with:
33-
version: 8
33+
version: 9
3434
run_install: false
3535

3636
- name: Get pnpm store directory
@@ -97,7 +97,7 @@ jobs:
9797
- name: Setup pnpm
9898
uses: pnpm/action-setup@v2
9999
with:
100-
version: 8
100+
version: 9
101101
run_install: false
102102

103103
- name: Get pnpm store directory

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Codecov
3+
Copyright (c) 2023-2024 Codecov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/sveltekit/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
.vercel
10+
.output
11+
vite.config.js.timestamp-*
12+
vite.config.ts.timestamp-*

examples/sveltekit/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

examples/sveltekit/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npm create svelte@latest
12+
13+
# create a new project in my-app
14+
npm create svelte@latest my-app
15+
```
16+
17+
## Developing
18+
19+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
21+
```bash
22+
npm run dev
23+
24+
# or start the server and open the app in a new browser tab
25+
npm run dev -- --open
26+
```
27+
28+
## Building
29+
30+
To create a production version of your app:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
You can preview the production build with `npm run preview`.
37+
38+
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

0 commit comments

Comments
 (0)