Skip to content

fix: update peerDependencies to support Rsbuild v2#30

Merged
chenjiahan merged 1 commit intomainfrom
update_peers_0115
Jan 15, 2026
Merged

fix: update peerDependencies to support Rsbuild v2#30
chenjiahan merged 1 commit intomainfrom
update_peers_0115

Conversation

@chenjiahan
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 15, 2026 03:31
@chenjiahan chenjiahan merged commit b3719ba into main Jan 15, 2026
11 checks passed
@chenjiahan chenjiahan deleted the update_peers_0115 branch January 15, 2026 03:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/core from 1.x to ^1.0.0 || ^2.0.0-0 to 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"
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
"@rsbuild/core": "^1.0.0 || >=2.0.0-0 <3.0.0"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant