yarnpkg/yarn

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

Open

#2,840 opened on Mar 6, 2017

View on GitHub
 (6 comments) (5 reactions) (0 assignees)JavaScript (41,514 stars) (2,731 forks)batch import
cat-buggood first issuehelp wantedtriaged

Description

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

Contributor guide