Skip to content

Commit ca49ba3

Browse files
Add rolldown-vite support (#128)
* Add rolldown-vite support * Allow modified `package.json` install * Update CI node version to 22 --------- Co-authored-by: David R. Myers <[email protected]>
1 parent 001ec8a commit ca49ba3

File tree

5 files changed

+248
-113
lines changed

5 files changed

+248
-113
lines changed

.github/actions/install-dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
- name: Setup Node.js
1313
uses: actions/setup-node@v4
1414
with:
15-
node-version: 18
15+
node-version: 22
1616
cache: pnpm
1717
- name: Install dependencies
1818
shell: bash

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ jobs:
2222
- run: pnpm build:shims
2323
- run: pnpm playwright install --with-deps
2424
- run: pnpm -r test:e2e
25+
test-e2e-rolldown-vite:
26+
runs-on: ubuntu-22.04
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: ./.github/actions/install-dependencies
30+
- run: pnpm build:core
31+
- run: pnpm build:shims
32+
- run: pnpm playwright install --with-deps
33+
- name: update overrides to use rolldown-vite and re-install
34+
run: |
35+
jq '.pnpm.overrides.vite = "npm:rolldown-vite@^7.0.1"' package.json > package.tmp.json
36+
mv package.tmp.json package.json
37+
pnpm i --no-frozen-lockfile
38+
- run: pnpm -r test:e2e
2539
test-unit:
2640
runs-on: ubuntu-latest
2741
steps:

examples/vanilla/test/e2e/main.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test('logs the correct values', async ({ page }) => {
2525

2626
if (isBuild) {
2727
expect(logs).toEqual([
28-
'class Symbol {\n }',
28+
expect.stringMatching(/^class (Symbol )?\{\s*\}$/),
2929
'{Volume: , vol: Volume, createFsFromVolume: , fs: Object, memfs: }',
3030
'function fetch() { [native code] }',
3131
'/',
@@ -44,8 +44,8 @@ test('logs the correct values', async ({ page }) => {
4444
expect(logs).toEqual([
4545
'[vite] connecting...',
4646
'[vite] connected.',
47-
'class Symbol {\n}',
48-
'{Volume: , vol: _Volume, createFsFromVolume: , fs: Object, memfs: }',
47+
expect.stringMatching(/^class Symbol \{\s*\}$/),
48+
expect.stringMatching(/^\{Volume: , vol: _?Volume, createFsFromVolume: , fs: Object, memfs: \}$/),
4949
'function fetch() { [native code] }',
5050
'/',
5151
'{nextTick: , title: browser, browser: true, env: Object, argv: Array(0)}',

0 commit comments

Comments
 (0)