Repository navigation
Add support for exact flag in lerna.json - #661
Conversation
| "exact": true | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
I am not very sure where I am supposed to add this.
There was a problem hiding this comment.
We already describe the lerna.json "durable" config pattern elsewhere, I think this is implied (much like #598, which only made a single line change and no docs updated).
evocateur
left a comment
There was a problem hiding this comment.
Cache the value outside the forEach loop, and I'd say we're good to go with this. Thanks @yasserkaddour !
| "exact": true | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
We already describe the lerna.json "durable" config pattern elsewhere, I think this is implied (much like #598, which only made a single line change and no docs updated).
|
|
||
| if (deps[depName] && version) { | ||
| deps[depName] = this.flags.exact ? version : "^" + version; | ||
| deps[depName] = this.getOptions().exact ? version : ("^" + version); |
There was a problem hiding this comment.
I think we should cache this getOptions() result outside of the forEach, since it will never change. I appreciate the disambiguating parentheses on the concatenation ternary.
| }); | ||
| }); | ||
|
|
||
| /** ========================================================================= |
There was a problem hiding this comment.
I appreciate test cases, although I think in this case we've already covered the ability for "durable" getOptions() config to bubble up through the various levels (lerna.json vs CLI flags, etc).
I won't say "no" to more tests, though. ^_^
There was a problem hiding this comment.
gigabo said in #426 test would be nice, so I did just that 😄
|
Thanks for merging |
|
Thanks @yasserkaddour! |
|
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. |
Fixes #511