Skip to content

[Feature] Syncing external dependencies across packages #259

Closed

Description

@christophercliff

Suppose all of my packages depend on Lodash. Does Lerna provide a mechanism for ensuring the same version of Lodash is used in every package?

Activity

  1. jamiebuilds commented on Jun 29, 2016

    @jamiebuilds
    Contributor

    You mean making sure that package-a and package-b both depend on the same semver range of lodash (i.e. "^1.0.0" === "^1.0.0")?

  2. christophercliff commented on Jun 29, 2016

    @christophercliff
    Author

    Yes.

  3. jamiebuilds commented on Jun 29, 2016

    @jamiebuilds
    Contributor

    Hmm... if there is enough utility in it. I feel like lerna exec -- npm outdated would be what most people actually wanted

  4. rygine commented on Jun 29, 2016

    @rygine
    Contributor

    @christophercliff PR #237 does exactly this

    it scans your packages and finds common external dependencies, which it then installs at the root node_modules folder. node will walk the directory tree and find the modules it needs there for your packages. this can potentially cause other issues though.

  5. christophercliff commented on Jun 29, 2016

    @christophercliff
    Author

    @thejameskyle thanks, that's useful.

    But suppose my dependency is deliberately out of date--where I can't update it or haven't gotten around to it yet--but I want to make sure it's consistent across packages. It would be useful to have a command with output like:

    $ lerna version lodash
    
    package-a/
      [email protected]
    package-b/
      [email protected]
    
  6. gigabo commented on Jun 29, 2016

    @gigabo
    Contributor

    We have a pin-dependency command in our internal lerna-like tool at Redfin that's invaluable for managing external dependencies.

    How about something like this?

    $ lerna pin lodash@^1.0.0
  7. christophercliff commented on Aug 4, 2016

    @christophercliff
    Author

    For just listing versions, lerna exec -- npm outdated lodash does the trick.

    Might be nice if lerna exec output each package name before running the command.

  8. changed the title [-]Syncing external dependencies across packages[/-] [+][Feature] Syncing external dependencies across packages[/+] on Nov 16, 2016
  9. zouxuoz commented on Dec 4, 2017

    @zouxuoz

    @thejameskyle what the status of this feature? Can I try to do it and send PR? 🙂

  10. Aghassi commented on Mar 23, 2018

    @Aghassi

    @gigabo That pin command would be nice. Would you mind giving a rough example of what that may look like?

    @zouxuoz You most definitely should try and send a PR if the feature doesn't exist. Open source and all 😄

  11. flux627 commented on Apr 18, 2018

    @flux627

    Just here to add a 👍 for the pin command.

  12. evocateur commented on Apr 19, 2018

    @evocateur
    Member

    I have stubs for lerna upgrade and lerna remove in master right now (complementing the existing lerna add), I'm just trying to find time to implement them (as well as a graceful lerna outdated).

  13. stale commented on Dec 27, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  14. lock commented on Apr 3, 2019

    @lock

    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.

  15. locked as resolved and limited conversation to collaborators on Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions