fix: update peerDependencies to support Rsbuild v2#30
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the peerDependencies specification for @rsbuild/core to support both Rsbuild v1 and the upcoming v2 release. This enables the plugin to work with both major versions of Rsbuild without breaking existing users on v1 while preparing for users who want to adopt v2.
Changes:
- Updated peerDependencies range for
@rsbuild/corefrom1.xto^1.0.0 || ^2.0.0-0to support both v1 and v2
Comments suppressed due to low confidence (1)
package.json:43
- The devDependency still references Rsbuild v1.6.10, which means tests only run against v1. To properly support v2 in the peerDependency range, consider adding a CI matrix that tests against both v1 and v2 versions, or at minimum test against a v2 pre-release version locally to ensure the plugin APIs remain compatible.
"@rsbuild/core": "1.6.10",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "peerDependencies": { | ||
| "@rsbuild/core": "1.x" | ||
| "@rsbuild/core": "^1.0.0 || ^2.0.0-0" |
There was a problem hiding this comment.
The version range ^2.0.0-0 will match any v2 pre-release version (2.0.0-alpha.0, 2.0.0-beta.1, etc.) and all v2 stable versions. However, this approach is risky without testing against actual v2 releases, as major version bumps typically include breaking changes. Consider using a more conservative range like ^1.0.0 || >=2.0.0-0 <3.0.0 or testing with v2 pre-releases before adding support. Alternatively, update the devDependency @rsbuild/core to a v2 pre-release version and run the test suite to verify compatibility.
| "@rsbuild/core": "^1.0.0 || ^2.0.0-0" | |
| "@rsbuild/core": "^1.0.0 || >=2.0.0-0 <3.0.0" |
No description provided.