-
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(builder-cli): load provider based on package.json #4797
Conversation
🦋 Changeset detectedLatest commit: be1b8ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 255 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 |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4797 +/- ##
==========================================
- Coverage 57.59% 50.76% -6.84%
==========================================
Files 672 669 -3
Lines 17794 18622 +828
Branches 3876 4303 +427
==========================================
- Hits 10249 9453 -796
- Misses 6934 8444 +1510
- Partials 611 725 +114 ☔ View full report in Codecov by Sentry. |
Summary
The
isPackageInstalled
method may get incorrect result in monorepo, so we prefer to load provider based on package.json.🤖 Generated by Copilot at be1b8ef
This pull request fixes the provider type detection for the
builder-cli
module in the@modern-js/builder
package. It changes thegetProviderType
function in theprovider.ts
file to use thepackage.json
file as the primary source of truth, and adds a changeset file to document the patch update.Details
🤖 Generated by Copilot at be1b8ef
@modern-js/builder
package (link)getProviderType
function in theprovider.ts
file to load the provider type based on thepackage.json
file instead of checking the installed packages (link)package.json
file is not found or does not have the provider dependencies (link)Related Issue
Checklist
pnpm run change
.