Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

questions about flatten-packages. #22

Open
lzl124631x opened this issue Nov 28, 2017 · 2 comments
Open

questions about flatten-packages. #22

lzl124631x opened this issue Nov 28, 2017 · 2 comments

Comments

@lzl124631x
Copy link

lzl124631x commented Nov 28, 2017

I'm new to flatten-packages and have a few questions. Looking forward to your kind reply. Thanks.

  1. node v3 (search keyword flat) already flat the packages maximally. Do I still need to use flatten-packages?
  2. What's the difference between flatten-packages and npm dedupe?

npm dedup: The deduplication algorithm walks the tree, moving each dependency as far up in the tree as possible, even if duplicates are not found. This will result in both a flat and deduplicated tree.

I think npm dedupe is doing the same thing? How does flatten-packages handle conflict packages?

@arifsetiawan
Copy link
Owner

flatten-packages created before npm@3 flat dependencies.

If you use npm@3, you don't need to use this.

flatten-packages don't handle conflict packages as it will just delete older version. npm dedupe did better that it respect semver version range to avoid conflict.

@lzl124631x
Copy link
Author

@arifsetiawan Thanks!

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

No branches or pull requests

2 participants