Skip to content
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

install --save should dedupe if new dependency satisfies package.json constrains #79

Closed
bestander opened this issue Jun 24, 2016 · 3 comments
Assignees

Comments

@bestander
Copy link
Member

bestander commented Jun 24, 2016

Test is implemented in #76 install --save with new dependency should be deterministic 2.

Scenario:

  1. Install
    mime-types@2.0.0 -> mime-db@~1.0.1
    Both deps get hoisted on top level
  2. install --save mime-db@1.0.3
    1.0.3 should satisfy mime-types dependency on mime-db but instead mime-db@1.0.1 gets hoisted on second level.
@sebmck
Copy link
Contributor

sebmck commented Jun 24, 2016

I think the only way we can do this is if we completely ignore the lockfile when adding new packages...

@bestander
Copy link
Member Author

Would it download all packages from the node repo again?
Yeah, that would not be very good.

@sebmck
Copy link
Contributor

sebmck commented Oct 5, 2016

Closing this as this would require modifying the lockfile for transitive dependencies of other dependencies.

It'd result in lots of merge conflicts in the lockfile since we'd be touching different parts of the lockfile than what is directly relevant (ie. when adding a new dependency we'd modify the dependencies of other modules which would produce more conflicts when others do the same).

I can also forsee this having potential issues since if a package doesn't strictly follow semver and we change another dependency to use our new one with undesirable behaviour it'd break a previously functional dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants