Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: not override rslib's rsbuild version when test plugins #10

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

9aoy
Copy link
Collaborator

@9aoy 9aoy commented Jan 3, 2025

not override rslib's rsbuild version when test plugins.

web-infra-dev/rslib#633

@9aoy 9aoy changed the title chore: not override rsbuild version of rslib when test plugins chore: not override rslib's rsbuild version when test plugins Jan 3, 2025
@9aoy 9aoy requested a review from chenjiahan January 3, 2025 06:10
@@ -74,6 +74,10 @@ export async function test(options: RunOptions) {
await $`pnpm exec playwright install --with-deps`
}
},
overrides: {
// not override rslib's rsbuild version
'@rslib/core>@rsbuild/core': 'latest',
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the original version instead of using latest? Using latest can break Rslib in some cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know how to configure it here to keep the original version. Do you have any ideas? Don't want to write pnpmfile file which will complicate this matter. 😢

Copy link
Member

Choose a reason for hiding this comment

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

How about:

const rslibPkg = require('@rslib/core/package.json');
rslibPkg.dependencies['@rsbuild/core'] || 'latest'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The rslib version needs to be obtained after install, or determined based on lock. But plugin build is during install (prepare stage).

@chenjiahan chenjiahan merged commit 42ff957 into main Jan 3, 2025
3 of 5 checks passed
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.

2 participants