yarnpkg/yarn

Yarn does not remove old package name from yarn.lock when install from git repo

Open

#2840 aperta il 6 mar 2017

Vedi su GitHub
 (6 commenti) (5 reazioni) (0 assegnatari)JavaScript (2731 fork)batch import
cat-buggood first issuehelp wantedtriaged

Metriche repository

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

Descrizione

yarn version 0.21.3

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

What is the current behavior? When install new package which is the same name as the old one from git repo, the old package in yarn.lock does not disappear.

the steps to reproduce :

npm init -y
yarn add https://github.com/FF-Mercurial/ug
yarn add https://github.com/kokororin/ug

see yarn.lock:

"ug@https://github.com/FF-Mercurial/ug":
  version "1.0.0"
  resolved "https://github.com/FF-Mercurial/ug#5a0400908d4a2b3ad8ce6d9a4c42fd3d3640983c"
  dependencies:
    escodegen "^1.6.1"
    esprima "^2.5.0"
    uglify-js "^2.4.24"

"ug@https://github.com/kokororin/ug":
  version "1.0.0"
  resolved "https://github.com/kokororin/ug#d38db29b6ce10037d235875c3b5b56b97a36877e"
  dependencies:
    escodegen "^1.6.1"
    esprima "^2.5.0"
    uglify-js "^2.4.24"

What is the expected behavior? The old package in yarn.lock should be removed.

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

$ ver
Microsoft Windows [版本 6.1.7601]

$ node -v && yarn --version
v7.5.0
0.21.3

Guida contributor