npm dedupe

减少重复

概要

npm dedupe
npm ddp

aliases: ddp

描述

搜索本地包树并尝试通过将依赖关系移到树上更远的位置来简化整体结构,这样它们可以更有效地被多个依赖包共享。

例如,考虑这个依赖图:

a
+-- b <-- depends on c@1.0.x
|   `-- c@1.0.3
`-- d <-- depends on c@~1.0.9
    `-- c@1.0.10

在这种情况下,npm dedupe 会将树转换为:

a
+-- b
+-- d
`-- c@1.0.10

由于 node 模块查找的分层特性,b 和 d 都将通过树根级别的单个 c 包来满足它们的依赖关系。

qJHvvW7o4Hx4NUMMtuWsN80ofacSOh215ppL7YKIAO08EdhfRlyaUg1n9Jpl6WxxA2rKgYy9TZVuilW1wCXRhA==

a
+-- b <-- depends on c@1.0.x
+-- c@1.0.3
`-- d <-- depends on c@1.x
    `-- c@1.9.9

yaDfDjR+WrHl3N3U6Cqmcju8nkxFWXzNl2D1rMunJwD5kaxFUeJsflrnjdYd1AClBMitiXi8VxM2PDDSbLzi5Lq1MbYb7zzKN2aslR44dF4j46cIMdHUFd0P+69UpmYH7hfDLu3qwk6TUaA8uFsmGQvwsDyMjv4Oc3JPtysmoiv9rJCMkREav1qal97xE6NNIFHIshTMsgtW/xeFwMOKePq4cD3erzkZpWsUEVvmnjn4yTxsV9eh7tcmClGJmnjv+ZkOmHr4eAXm6eLzRZPH9BY5GKj7+pZmCsmgcWn91ou4iEUE4ZIk0yqa3qZ5BQsA5ngnec3hTBAf8z7JQDDbWGeUqo99s3BWyOWqu5gWND9+cbyFefaAB+xM2+Y4EEKogw9McBrzQty/lciyT00iclY8JkFsSxE3r+hJJMSwso4=

e0OsdflK7drlUEr4Iv3xDkFhmn1V91T/AEMKMR8Bzhpu+xpStOScsjuQp+fwU507ebEZR6TBL8nimcpZ2EwYWLE+65Lf2PFzqzSJG+dTUJjtLa5LR0XYMXablBVL/bSeMHDYrRzvrRAer+1B+aQC+0Y0e832kIDStdZArHaDAX7TtcC3i1bNMJkWoc9vyQRP1+FwvK2s1HfRJwS0FRmUaQ==

z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