Skip to content

Commit ff27b6d

Browse files
committed
feature #45 [Vite][Rsbuild] Narrow peer dependency ranges to supported versions (Kocal)
This PR was merged into the main branch. Discussion ---------- [Vite][Rsbuild] Narrow peer dependency ranges to supported versions | Q | A | -------------- | --- | Bug fix? | no | New feature? | yes <!-- please update CHANGELOG.md file --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and CHANGELOG.md files --> | Documentation? | no <!-- required for new features, or documentation updates --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 859060b [Vite][Rsbuild] Narrow peer dependency ranges to supported versions
2 parents a6eb132 + 859060b commit ff27b6d

3 files changed

Lines changed: 47 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,46 @@ jobs:
6969
- name: Test
7070
run: pnpm test
7171

72+
bundler-versions:
73+
name: ${{ matrix.name }}
74+
runs-on: ubuntu-latest
75+
permissions:
76+
contents: read
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
include:
81+
# `vite`/`@rsbuild/core` are optional peers; prove both ends of every supported major
82+
# (the exact floor and the latest in range). `@vitejs/plugin-react@6` only peers Vite 8,
83+
# so the Vite 7 rows pull `@vitejs/plugin-react@5` (covers 6/7/8) for the React HMR test.
84+
- { name: 'Vite 7.0.0', add: 'vite@7.0.0 @vitejs/plugin-react@5' }
85+
- { name: 'Vite ^7.0', add: 'vite@^7.0 @vitejs/plugin-react@5' }
86+
- { name: 'Vite 8.0.0', add: 'vite@8.0.0' }
87+
- { name: 'Vite ^8.0', add: 'vite@^8.0' }
88+
- { name: 'Rsbuild 1.7.0', add: '@rsbuild/core@1.7.0' }
89+
- { name: 'Rsbuild ^1.7', add: '@rsbuild/core@^1.7' }
90+
- { name: 'Rsbuild 2.0.0', add: '@rsbuild/core@2.0.0' }
91+
- { name: 'Rsbuild ^2.0', add: '@rsbuild/core@^2.0' }
92+
steps:
93+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
94+
with:
95+
persist-credentials: false
96+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
97+
- name: Set node
98+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
99+
with:
100+
node-version-file: .nvmrc
101+
cache: pnpm
102+
cache-dependency-path: pnpm-lock.yaml
103+
- name: Install
104+
run: pnpm install --frozen-lockfile
105+
- name: Pin ${{ matrix.name }}
106+
run: pnpm --filter @symfony/reprise add -D ${{ matrix.add }}
107+
- name: Build
108+
run: pnpm build
109+
- name: Test
110+
run: pnpm test
111+
72112
php:
73113
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
74114
runs-on: ${{ matrix.os || 'ubuntu-latest' }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## 0.5.0
4+
5+
- Require Vite `^7.0` or `^8.0`; Vite 7 is now the minimum supported version
6+
- Require Rsbuild `^1.7` or `^2.0`; Rsbuild 1.7 is now the minimum supported version
7+
38
## 0.4.0
49

510
- Support React Fast Refresh (HMR) with Vite by rendering the `@vitejs/plugin-react` preamble in dev

assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
},
6767
"peerDependencies": {
6868
"@hotwired/stimulus": ">=3",
69-
"@rsbuild/core": ">=1",
70-
"vite": ">=3"
69+
"@rsbuild/core": "^1.7.0 || ^2.0.0",
70+
"vite": "^7.0.0 || ^8.0.0"
7171
},
7272
"peerDependenciesMeta": {
7373
"@hotwired/stimulus": {

0 commit comments

Comments
 (0)