-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(bootstrap): respect --force-local option #2104
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,7 +161,7 @@ class BootstrapCommand extends Command { | |
chain = chain.then(filteredPackages => { | ||
this.filteredPackages = filteredPackages; | ||
|
||
if (filteredPackages.length !== this.targetGraph.size) { | ||
if (filteredPackages.length !== this.targetGraph.size && !this.options.forceLocal) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Theoretically, this is what the this.targetGraph = new PackageGraph(filteredPackages, "allDependencies", this.options.forceLocal); I'm not sure this is the appropriate change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Here is the problem: (EDITED for more clarity:) When I run the new test I have added in e0b0f99, the one running
Another problem I see in the current implementation: even when I provide
I see. Here is the problem I need to fix: when I run Now my assumption is that If my assumption is not correct and the current behavior of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
this.logger.warn("bootstrap", "Installing local packages that do not match filters from registry"); | ||
|
||
// an explicit --scope, --ignore, or --since should only symlink the targeted packages, no others | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here!
This snapshot shows which dependencies were resolved from the npm registry.
Before my change, the dependency of
packages/package-4
onpackage-3
was resolved from the npm registry.After my change,
package-3
is resolved as a link within monorepo. (See changes in the second snapshot below.)