Skip to content

Commit d820a5a

Browse files
authored
Merge branch 'main' into main
2 parents ea0279d + fa60127 commit d820a5a

File tree

269 files changed

+15715
-1532
lines changed

Some content is hidden

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

269 files changed

+15715
-1532
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@
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)
4442

4543
"prettier", // waiting for stable choice on ternaries
44+
45+
// plugin-rsc
46+
"react-router",
47+
"@react-router/dev",
4648
],
4749
}

.github/workflows/ci-rsc.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: ci-rsc
2+
3+
permissions: {}
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
paths:
11+
- "packages/plugin-rsc/**"
12+
- "pnpm-lock.yaml"
13+
- ".github/workflows/ci-rsc.yml"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
28+
- run: pnpm i
29+
- run: pnpm build
30+
- run: pnpm -C packages/plugin-rsc tsc
31+
- run: pnpm -C packages/plugin-rsc test
32+
33+
test-e2e:
34+
name: test-rsc (${{ matrix.os }} / ${{ matrix.browser }}) ${{ matrix.rolldown == true && '(rolldown)' || '' }}
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
os: [ubuntu-latest, macos-latest, windows-latest]
39+
browser: [chromium]
40+
rolldown: [false]
41+
include:
42+
- os: ubuntu-latest
43+
browser: firefox
44+
- os: macos-latest
45+
browser: webkit
46+
- os: ubuntu-latest
47+
browser: chromium
48+
rolldown: true
49+
fail-fast: false
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: 22
55+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
56+
- run: pnpm i
57+
- run: pnpm build
58+
- name: install rolldown
59+
if: ${{ matrix.rolldown }}
60+
run: |
61+
sed -i '/^overrides:/a\ vite: "npm:rolldown-vite@latest"' pnpm-workspace.yaml
62+
pnpm i --no-frozen-lockfile
63+
- run: pnpm -C packages/plugin-rsc exec playwright install ${{ matrix.browser }}
64+
- run: pnpm -C packages/plugin-rsc test-e2e-ci --project=${{ matrix.browser }}
65+
env:
66+
TEST_ISOLATED: true
67+
- uses: actions/upload-artifact@v4
68+
if: always()
69+
with:
70+
name: test-results-${{ matrix.os }}-${{ matrix.browser }}${{ matrix.rolldown == true && '-rolldown' || '' }}
71+
path: |
72+
packages/plugin-rsc/test-results

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
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]
32+
node_version: [18, 20, 22, 24]
3333
include:
3434
# Active LTS + other OS
3535
- os: macos-latest
@@ -81,6 +81,9 @@ 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+
8487
- name: Build
8588
run: pnpm run build
8689

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ hoist-pattern[]=eslint-import-resolver-*
55
strict-peer-dependencies=false
66
shell-emulator=true
77
auto-install-peers=false
8+
link-workspace-packages=true
9+
prefer-workspace-packages=true

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ This repo is a monorepo using pnpm workspaces. The package manager used to insta
1313
- Checkout a topic branch from a base branch (e.g. `main`), and merge back against that branch.
1414

1515
- If adding a new feature:
16-
1716
- Add accompanying test case.
1817
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first, and have it approved before working on it.
1918

2019
- If fixing a bug:
21-
2220
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log (e.g. `fix: update entities encoding/decoding (fix #3899)`).
2321
- Provide a detailed description of the bug in the PR. Live demo preferred.
2422
- Add appropriate test coverage if applicable.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515

1616
See [`@vitejs/plugin-react` documentation](packages/plugin-react/README.md) and [`@vitejs/plugin-react-swc` documentation](packages/plugin-react-swc/README.md)
1717

18+
# Vite Plugin RSC
19+
20+
See [`@vitejs/plugin-rsc` documentation](packages/plugin-rsc/README.md)
21+
1822
## Packages
1923

2024
| Package | Version (click for changelogs) |
2125
| ----------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
2226
| [@vitejs/plugin-react](packages/plugin-react) | [![plugin-react version](https://img.shields.io/npm/v/@vitejs/plugin-react.svg?label=%20)](packages/plugin-react/CHANGELOG.md) |
2327
| [@vitejs/plugin-react-oxc](packages/plugin-react-oxc) | [![plugin-react-oxc version](https://img.shields.io/npm/v/@vitejs/plugin-react-oxc.svg?label=%20)](packages/plugin-react-oxc/CHANGELOG.md) |
2428
| [@vitejs/plugin-react-swc](packages/plugin-react-swc) | [![plugin-react-swc version](https://img.shields.io/npm/v/@vitejs/plugin-react-swc.svg?label=%20)](packages/plugin-react-swc/CHANGELOG.md) |
29+
| [@vitejs/plugin-rsc](packages/plugin-rsc) | [![plugin-rsc version](https://img.shields.io/npm/v/@vitejs/plugin-rsc.svg?label=%20)](packages/plugin-rsc/CHANGELOG.md) |
2530

2631
## License
2732

eslint.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import globals from 'globals'
99

1010
export default tseslint.config(
1111
{
12-
ignores: ['**/dist/**', '**/playground-temp/**', '**/temp/**'],
12+
ignores: [
13+
'**/dist/**',
14+
'**/playground-temp/**',
15+
'**/temp/**',
16+
'packages/plugin-rsc/**',
17+
],
1318
},
1419
eslint.configs.recommended,
1520
...tseslint.configs.recommended,

0 commit comments

Comments
 (0)