-
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --force-local to link command #1082
Conversation
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.
Looking good so far, thanks for your patience!
README.md
Outdated
#### --ignore-semver | ||
|
||
```sh | ||
$ lerna link --ignore-semver=<boolean> |
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.
Can we rename this --force-local
, please? Even though it does ignore semver, in practice, I don't want to implicitly condone ignoring semver. It's pure semantics, yes, but I think --force-local
better describes what is actually being accomplished, rather that how it is implemented.
Also, for boolean CLI options, it's not necessary to pass a value:
$ lerna link --force-local
(omitting the flag entirely is the equivalent of false
, the default)
src/commands/BootstrapCommand.js
Outdated
@@ -521,6 +521,7 @@ export default class BootstrapCommand extends Command { | |||
* @param {Function} callback | |||
*/ | |||
symlinkPackages(callback) { | |||
PackageUtilities.symlinkPackages(this.filteredPackages, this.packageGraph, this.logger, callback); | |||
const { filteredPackages, packageGraph, logger } = this; | |||
PackageUtilities.symlinkPackages(filteredPackages, packageGraph, logger, false, callback); |
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.
Can you label the false
please? I dislike long lists of arguments with sudden literals in the middle.
+const forceLocal = false;
const { filteredPackages, packageGraph, logger } = this;
-PackageUtilities.symlinkPackages(filteredPackages, packageGraph, logger, false callback);
+PackageUtilities.symlinkPackages(filteredPackages, packageGraph, logger, forceLocal, callback);
README.md
Outdated
$ lerna link --ignore-semver=<boolean> | ||
``` | ||
|
||
This flag signifies whether or not the `link` command should ignore semantic version validation. Its default value is `false`. |
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.
Renaming to --force-local
, a better description would be
When passed, this flag causes the `link` command to always symlink local dependencies regardless of matching version range.
Force local makes more sense appreciate the feed back. |
Just waiting for the gummed-up CI to finish, then I'll merge. Thanks for responding quickly! |
one thing, because |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Add ignore sem versioning. Addresses #425, #908, and #928.
Description
Add in
--force-local
option for linking only.Motivation and Context
Being able to switch branches during dev mode as well as using local packages. As well as using git subtree instead of mono repos.
How Has This Been Tested?
Yes added in integration tests.
Types of changes
Checklist: