Publish npm packages in topological order.#595
Conversation
6af21d0 to
ced8b32
Compare
|
Thanks @loganfsmyth, this is an important improvement. I actually wonder if it should even be an option. Is there ever a time when publishing out of dependency order is appropriate? |
|
Happy to remove the option usage, I only included it to be consistent with the other PR. |
|
Yeah, I guess there's value in just being consistent across commands. At least the default is to sort. Incidentally noticed that the sort option is only supported on the command-line. Added #596 for durable config via |
|
Cool. Let me know if there's anything else I need to do. |
|
Tested in the Babel 6.23 (npm link) release so, seems like it worked!! (and not much celebration since we had a different regression) |
|
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. |
Expanding on the work done in #412 by @seansfkelley.
This makes the
publishcommand publish packages to npm in topological order so that there is never a time where npm could have a package whose dependencies do not yet exist in the registry. There's already somedist-tagstoggling going on, but that doesn't have any effect on users who already have dependencies on a version range in their deps.Feedback welcome. Main questions:
If you have dependency cycles in your repo, this means Lerna will start logging
"Encountered a cycle in the dependency graph. This may cause instability!"on every call tolerna publishwhere it wouldn't have before, is that cool?