Skip to content

Commit 8cf5f21

Browse files
authored
chore: use svelte 4 (#680)
1 parent ecd191b commit 8cf5f21

File tree

4 files changed

+226
-158
lines changed

4 files changed

+226
-158
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
# pseudo-matrix for convenience, NEVER use more than a single combination
3535
node: [16]
3636
os: [ubuntu-latest]
37-
outputs:
38-
build_successful: ${{ steps.build.outcome == 'success' }}
3937
steps:
4038
- uses: actions/checkout@v3
4139
- uses: actions/setup-node@v3
@@ -77,13 +75,17 @@ jobs:
7775
matrix:
7876
node: [16]
7977
os: [ubuntu-latest, macos-latest, windows-latest]
78+
svelte: [4]
8079
include:
8180
- node: 14
8281
os: ubuntu-latest
82+
svelte: 3
8383
- node: 18
8484
os: ubuntu-latest
85+
svelte: 4
8586
- node: 20
8687
os: ubuntu-latest
88+
svelte: 4
8789
steps:
8890
- uses: actions/checkout@v3
8991
- uses: actions/setup-node@v3
@@ -101,16 +103,20 @@ jobs:
101103
run: |
102104
npm i -g pnpm@^7.33.0
103105
tmppkg="$(jq '.engines.pnpm = "^7.33.0"' package.json)" && echo -E "${tmppkg}" > package.json && tmppkg=""
106+
- name: use svelte 3
107+
if: matrix.svelte == 3
108+
run: |
109+
tmppkg="$(jq '.devDependencies.svelte = "^3.59.2"' package.json)" && echo -E "${tmppkg}" > package.json && tmppkg=""
104110
- uses: actions/setup-node@v3
105111
with:
106112
node-version: ${{ matrix.node }}
107113
cache: 'pnpm'
108114
cache-dependency-path: '**/pnpm-lock.yaml'
109115
- name: install
110-
if: matrix.node != 14
116+
if: matrix.node != 14 && matrix.svelte != 3
111117
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts
112-
- name: install for node14
113-
if: matrix.node == 14
118+
- name: install for node14 or svelte3
119+
if: matrix.node == 14 || matrix.svelte == 3
114120
run: pnpm install --no-frozen-lockfile --prefer-offline --ignore-scripts
115121
- name: install playwright chromium
116122
run: pnpm playwright install chromium
@@ -123,7 +129,7 @@ jobs:
123129
- uses: actions/upload-artifact@v3
124130
if: failure()
125131
with:
126-
name: test-failure-${{github.run_id}}-${{ matrix.os }}-${{ matrix.node }}
132+
name: test-failure-${{github.run_id}}-${{ matrix.os }}-${{ matrix.node }}-${{ matrix.svelte }}
127133
path: |
128134
test-temp.tar
129135
pnpm-debug.log

.pnpmfile.cjs

Lines changed: 0 additions & 12 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"prettier": "^2.8.8",
4545
"prettier-plugin-svelte": "^2.10.1",
4646
"publint": "^0.1.12",
47-
"svelte": "^3.59.2",
47+
"svelte": "^4.0.0",
4848
"typescript": "^5.1.3",
4949
"vite": "^4.3.9",
5050
"vitest": "^0.32.2"
@@ -62,7 +62,10 @@
6262
},
6363
"pnpm": {
6464
"overrides": {
65-
"@sveltejs/vite-plugin-svelte": "workspace:^"
65+
"@sveltejs/vite-plugin-svelte": "workspace:^",
66+
"semver@<7.5.2": ">=7.5.2",
67+
"svelte": "$svelte",
68+
"vite": "$vite"
6669
}
6770
}
6871
}

0 commit comments

Comments
 (0)