yarnpkg/yarn

`yarn upgrade` breaks dependencies

Open

#3202 aperta il 20 apr 2017

Vedi su GitHub
 (17 commenti) (24 reazioni) (0 assegnatari)JavaScript (2731 fork)batch import
cat-bughelp wantedtriaged

Metriche repository

Star
 (41.514 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Bug.

What is the current behavior?

yarn upgrade updates the version of npmlog, but does not check its dependencies.

If the current behavior is a bug, please provide the steps to reproduce.

Suppose you have a very simple package.json file like following:

{
  "dependencies": {
    "npm": "^3.10.5"
  }
}

Run yarn. You will find the folder structure is like:

node_modules
├─npm@3.10.10
│  ├─npmlog@4.0.0
│  │  ├─gauge@2.6.0

Then yarn upgrade.

node_modules
├─npm@3.10.10
│  ├─npmlog@4.0.2 // it is updated, but it requires "gauge": "~2.7.1"
│  │  ├─gauge@2.6.0

What is the expected behavior?

Not only update the version of npmlog, but also inner dependencies like gauge.

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

node v6.9.1, OSX 0.11.6

Guida contributor