yarnpkg/yarn

[feature] improve resolution deduping

Open

#3.778 geöffnet am 30. Juni 2017

Auf GitHub ansehen
 (22 Kommentare) (31 Reaktionen) (0 zugewiesene Personen)JavaScript (41.514 Stars) (2.731 Forks)batch import
cat-featuregood first issuehelp wantedhigh-prioritytriaged

Beschreibung

Do you want to request a feature or report a bug? feature

Tentative about making it into 1.0 release because I think it is an important improvement over the existing experience.

What is the current behavior?

  1. Final deduping

As described in https://github.com/yarnpkg/yarn/issues/3775 whether Yarn will download 2 different versions of left-pad depends on the order dependencies are resolved (it's alphabetic BFS).

Instead we should have a post resolution step that would try to dedupe all versions of a single package to the minimum after the dependency tree was resolved.

I started this https://github.com/yarnpkg/yarn/pull/3563/files#diff-80a032b8112ef9aa0ea41ee304a6024aR453 but never have finished.

  1. Turn off deduping

At the same time we probably could have the opposite option - force Yarn to use latest dependencies everywhere and not optimize resolution at all.

  1. Don't dedupe lockfiles on install

Another aspect - we don't want to dedupe dependencies if they are already in the lockfile because Yarn guarantees same node_modules for the same lockfile.

Please mention your node.js, yarn and operating system version. Yarn 0.27

Contributor Guide