chore: declare version range for peer dependencies#19979
Merged
sapphi-red merged 1 commit intovitejs:mainfrom May 16, 2025
Merged
chore: declare version range for peer dependencies#19979sapphi-red merged 1 commit intovitejs:mainfrom
sapphi-red merged 1 commit intovitejs:mainfrom
Conversation
patak-cat
approved these changes
May 1, 2025
moonlitusun
pushed a commit
to moonlitusun/vite
that referenced
this pull request
May 25, 2025
Hdoc1509
added a commit
to Hdoc1509/dev-challenges
that referenced
this pull request
Jan 4, 2026
- `@vitejs/plugin-react` added support for `vite@v7` since `v4.5.2`.
- required adding `react` as peer dependency of `@lib/components` to prevent
resolve import errors of `react/jsx-runtime` on `build`
- `typescript` to `v5.5+` due to changes of `@vitejs/plugin-react` in
`v5.0.0`
- similar issue: vitejs/vite-plugin-react#985
- change: vitejs/vite-plugin-react@b9efa3f#diff-d1f942b9a74f586a80bca3733150b7c692a6460e8350bc19cbbad1d53f95b356
- `sass` to `1.70.0+` due to changes in peer deps of `[email protected]`
- pr: vitejs/vite#19979
- `@use` rule instead of `@import`. `@import` is deprecated since `v1.80.0`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Specified the peer dependencies version range.
Previously, we used
*, which didn't clearly communicate which versions were actually supported. For example, #19977 requires sass 1.45.0+ and #19978 requires sass 1.70.0+, but this isn't obvious from the currentpackage.jsonand it wasn't clear whether relying on which feature would require a major version.Here's the reasoning behind the chosen ranges for each peer dependency:
^4.0.0^3.8.0 || ^4.0.0becauserewriteUrlsfeature was introduced in 3.8.0 which we might use in the future2020-12-18), I guess it's fine to require that^1.70.0>=0.54.8>=so that we don't need to keep adding|| ^0.xto the range>=5.0.0^3.0.0 || ^4.0.0 || ^5.0.0without much burden. But the breaking changes between them are only dropping Node versions older than 16, so probably ok to simply go with^5.0.0