Skip to content

Commit e6b3688

Browse files
committed
Merge branch 'main' into test-stable-react-chunks
2 parents bc1b607 + bf512e1 commit e6b3688

File tree

307 files changed

+9337
-5858
lines changed

Some content is hidden

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

307 files changed

+9337
-5858
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ body:
1919
[plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)
2020
- label: |
2121
[plugin-react-oxc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-oxc)
22+
- label: |
23+
[plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)
2224
- type: textarea
2325
id: bug-description
2426
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ body:
1919
[plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc)
2020
- label: |
2121
[plugin-react-oxc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-oxc)
22+
- label: |
23+
[plugin-rsc](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc)
2224
- type: textarea
2325
id: feature-description
2426
attributes:

.github/renovate.json5

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
// manually bumping
3737
"node",
3838

39-
"generouted", // testing lib shipping JSX (new version ship transpiled JS)
40-
4139
// breaking changes
4240
"source-map", // `source-map:v0.7.0+` needs more investigation
4341
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)

.github/workflows/ci-rsc.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: ci-rsc
2+
3+
permissions: {}
4+
25
on:
6+
workflow_dispatch:
37
push:
48
branches:
59
- main
@@ -17,7 +21,7 @@ jobs:
1721
test:
1822
runs-on: ubuntu-latest
1923
steps:
20-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2125
- uses: actions/setup-node@v4
2226
with:
2327
node-version: 22
@@ -28,34 +32,55 @@ jobs:
2832
- run: pnpm -C packages/plugin-rsc test
2933

3034
test-e2e:
31-
name: test-rsc (${{ matrix.os }} / ${{ matrix.browser }})
35+
name: test-rsc (${{ matrix.os }} / ${{ matrix.browser }}) ${{ matrix.rolldown == true && '(rolldown)' || '' }} ${{ matrix.react_version && format('(react-{0})', matrix.react_version) || '' }}
3236
runs-on: ${{ matrix.os }}
3337
strategy:
34-
# TODO: shard?
3538
matrix:
3639
os: [ubuntu-latest, macos-latest, windows-latest]
3740
browser: [chromium]
41+
rolldown: [false]
42+
react_version: [""]
3843
include:
3944
- os: ubuntu-latest
4045
browser: firefox
4146
- os: macos-latest
4247
browser: webkit
48+
- os: ubuntu-latest
49+
browser: chromium
50+
rolldown: true
51+
- os: ubuntu-latest
52+
browser: chromium
53+
react_version: canary
54+
- os: ubuntu-latest
55+
browser: chromium
56+
react_version: experimental
4357
fail-fast: false
4458
steps:
45-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v5
4660
- uses: actions/setup-node@v4
4761
with:
4862
node-version: 22
4963
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
5064
- run: pnpm i
65+
- name: install react
66+
if: ${{ matrix.react_version }}
67+
run: |
68+
sed -i "/^overrides:/a\ react: \"${{ matrix.react_version }}\"" pnpm-workspace.yaml
69+
sed -i "/^overrides:/a\ react-dom: \"${{ matrix.react_version }}\"" pnpm-workspace.yaml
70+
sed -i "/^overrides:/a\ react-server-dom-webpack: \"${{ matrix.react_version }}\"" pnpm-workspace.yaml
71+
pnpm i --no-frozen-lockfile
5172
- run: pnpm build
73+
- name: install rolldown
74+
if: ${{ matrix.rolldown }}
75+
run: |
76+
sed -i '/^overrides:/a\ vite: "npm:rolldown-vite@latest"' pnpm-workspace.yaml
77+
pnpm i --no-frozen-lockfile
5278
- run: pnpm -C packages/plugin-rsc exec playwright install ${{ matrix.browser }}
5379
- run: pnpm -C packages/plugin-rsc test-e2e-ci --project=${{ matrix.browser }}
54-
env:
55-
TEST_ISOLATED: true
5680
- uses: actions/upload-artifact@v4
5781
if: always()
5882
with:
59-
name: test-results-${{ matrix.os }}-${{ matrix.browser }}
83+
name: test-results-${{ matrix.os }}-${{ matrix.browser }}${{ matrix.rolldown == true && '-rolldown' || '' }}${{ matrix.react_version && format('-react-{0}', matrix.react_version) || '' }}
6084
path: |
6185
packages/plugin-rsc/test-results
86+
if-no-files-found: ignore

.github/workflows/ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
matrix:
3131
os: [ubuntu-latest]
32-
node_version: [18, 20, 22, 24]
32+
node_version: [20, 22, 24]
3333
include:
3434
# Active LTS + other OS
3535
- os: macos-latest
@@ -41,7 +41,7 @@ jobs:
4141
name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v5
4545

4646
- name: Install pnpm
4747
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
@@ -81,9 +81,6 @@ jobs:
8181
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
8282
run: pnpm playwright install chromium
8383

84-
- if: matrix.node_version == '18'
85-
run: pnpm i -D [email protected] -w
86-
8784
- name: Build
8885
run: pnpm run build
8986

@@ -96,13 +93,24 @@ jobs:
9693
- name: Test SWC
9794
run: pnpm --filter ./packages/plugin-react-swc run test
9895

96+
- name: Setup rolldown-vite
97+
run: |
98+
sed -i"" -e "s/overrides:/overrides:\n vite: catalog:rolldown-vite/" pnpm-workspace.yaml
99+
pnpm i --no-frozen-lockfile
100+
101+
- name: Test serve (rolldown-vite)
102+
run: pnpm run test-serve
103+
104+
- name: Test build (rolldown-vite)
105+
run: pnpm run test-build
106+
99107
lint:
100108
if: github.repository == 'vitejs/vite-plugin-react'
101109
timeout-minutes: 10
102110
runs-on: ubuntu-latest
103111
name: "Lint: node-20, ubuntu-latest"
104112
steps:
105-
- uses: actions/checkout@v4
113+
- uses: actions/checkout@v5
106114
with:
107115
fetch-depth: 0
108116

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
2+
3+
name: "Copilot Setup Steps"
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
copilot-setup-steps:
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
- uses: actions/checkout@v5
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
27+
- run: pnpm i
28+
- run: pnpm exec playwright install chromium

.github/workflows/issue-close-require.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write # for actions-cool/issues-helper to update PRs
1414
steps:
1515
- name: need reproduction
16-
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
16+
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3
1717
with:
1818
actions: "close-issues"
1919
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/issue-labeled.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: contribution welcome
1616
if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted'
17-
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
17+
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3
1818
with:
1919
actions: "create-comment, remove-labels"
2020
token: ${{ secrets.GITHUB_TOKEN }}
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: remove pending
2727
if: (github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'pending triage')
28-
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
28+
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3
2929
with:
3030
actions: "remove-labels"
3131
token: ${{ secrets.GITHUB_TOKEN }}
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: need reproduction
3636
if: github.event.label.name == 'need reproduction'
37-
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3
37+
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3
3838
with:
3939
actions: "create-comment, remove-labels"
4040
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
environment: Release
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818

1919
- name: Install pnpm
2020
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
@@ -55,8 +55,17 @@ jobs:
5555
env:
5656
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5757

58-
- if: steps.tag.outputs.isAlpha == 'false'
58+
- if: steps.tag.outputs.isAlpha == 'false' && steps.tag.outputs.pkgName != 'plugin-rsc'
5959
uses: ArnaudBarre/github-release@4fa6eafe8e2449c7c1c5a91ae50de4ee34db0b40 # v1.5.0
6060
with:
6161
path: packages/${{ steps.tag.outputs.pkgName }}/CHANGELOG.md
6262
tag-name: ${{ github.ref_name }}
63+
64+
- if: steps.tag.outputs.isAlpha == 'false' && steps.tag.outputs.pkgName == 'plugin-rsc'
65+
uses: yyx990803/release-tag@master
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
with:
69+
tag_name: ${{ github.ref }}
70+
body: |
71+
Please refer to [CHANGELOG.md](https://github.com/vitejs/vite-plugin-react/blob/${{ github.ref_name }}/packages/${{ steps.tag.outputs.pkgName }}/CHANGELOG.md) for details.

.github/workflows/release-continuous.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Install pnpm
2424
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

0 commit comments

Comments
 (0)