-
Notifications
You must be signed in to change notification settings - Fork 350
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
fix(monorepo): ignore unnessary react peers from antd #3487
Conversation
🦋 Changeset detectedLatest commit: 0f88b7b The changes in this PR will be included in the next version bump. This PR includes changesets to release 212 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@JSerFeng CI is failed |
0a616e5
to
e3eb104
Compare
snapshot failed~ |
* fix(app-tools): can not disable cleanDistPath * chore: update test case * chore: add changeset
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3487 +/- ##
==========================================
+ Coverage 57.59% 57.88% +0.28%
==========================================
Files 672 653 -19
Lines 17794 17175 -619
Branches 3876 3745 -131
==========================================
- Hits 10249 9942 -307
+ Misses 6934 6634 -300
+ Partials 611 599 -12
... and 119 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Summary
antd
dependency has peer dependencies for react andreact-dom
, however sometimes we just needantd
to be resolved, instead of using it directly, so we don't need to install its peer deps.Vitest based tests that don't really need antd, using spyOn to mock the require of
antd
.Playwright test in e2e don't have mock API, so install react for it.
🤖 Generated by Copilot at 1f915f5
Removed
antd
from the dependencies of three builder packages and usedvitest
to mock its presence in the tests. Addedreact
andreact-dom
to the test cases that import different versions ofantd
. This is to avoid dependency conflicts and test the compatibility of the packages with variousantd
versions.Details
🤖 Generated by Copilot at 1f915f5
antd
dependency frompackages/builder/builder-rspack-provider/package.json
,packages/builder/builder-webpack-provider/package.json
, andpackages/builder/plugin-swc/package.json
to avoid conflicts with different versions ofantd
in the tests (link, link, link)require
andrequire.resolve
functions intests/setup.ts
files of the above packages usingvi
object fromvitest
to simulate the presence ofantd
version 4 in the node_modules of the test cases that use these packages, without actually installing it as a dependency (link, link, link)react
andreact-dom
dependencies totests/e2e/builder/cases/import-antd-v4/package.json
andtests/e2e/builder/cases/import-antd-v5/package.json
because they are peer dependencies ofantd
version 4 and 5 respectively and they are needed to run the test cases (link, link)Related Issue
Checklist
pnpm run change
.