Skip to content

Commit 9552041

Browse files
committed
chore: merge main
2 parents ccfcb28 + d14f31d commit 9552041

File tree

299 files changed

+16502
-1492
lines changed

Some content is hidden

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

299 files changed

+16502
-1492
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: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:base", "schedule:weekly", "group:allNonMajor"],
3+
"extends": ["config:recommended", "schedule:weekly", "group:allNonMajor"],
44
"labels": ["dependencies"],
55
"ignorePaths": ["**/__tests__/**"],
66
"rangeStrategy": "bump",
77
"packageRules": [
88
{
9-
"depTypeList": ["peerDependencies"],
9+
"matchDepTypes": ["peerDependencies"],
1010
"enabled": false,
1111
},
1212
{
1313
"matchFileNames": ["**/react-18/**", "**/compiler-react-18/**"],
1414
"ignoreDeps": ["react", "react-dom", "@types/react", "@types/react-dom"],
1515
},
16+
{
17+
"extends": ["monorepo:swc"],
18+
"groupName": "swc monorepo",
19+
"separateMajorMinor": false,
20+
},
1621
// renovate doesn't properly handle x.x.x-beta-hash-yyyymm version schema
1722
{
1823
"matchPackageNames": [
@@ -23,20 +28,22 @@
2328
},
2429
{
2530
"matchDepTypes": ["action"],
26-
"excludePackagePrefixes": ["actions/", "github/"],
2731
"pinDigests": true,
32+
"matchPackageNames": ["!actions/{/,}**", "!github/{/,}**"],
2833
},
2934
],
3035
"ignoreDeps": [
3136
// manually bumping
3237
"node",
3338

34-
"generouted", // testing lib shipping JSX (new version ship transpiled JS)
35-
3639
// breaking changes
3740
"source-map", // `source-map:v0.7.0+` needs more investigation
3841
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)
3942

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

.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: 7 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,
@@ -127,6 +132,7 @@ export default tseslint.config(
127132
{
128133
name: 'disables/playground',
129134
files: [
135+
'packages/**/*.test.?([cm])[jt]s?(x)',
130136
'playground/**/*.?([cm])[jt]s?(x)',
131137
'packages/plugin-react-swc/playground/**/*.?([cm])[jt]s?(x)',
132138
],

0 commit comments

Comments
 (0)