{"action":"opened","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/2011","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2011/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2011/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2011/events","html_url":"https://github.com/yarnpkg/yarn/issues/2011","id":191351830,"number":2011,"title":"`yarn add` of NPM registry module followed by Git URL results in duplicate yarn.lock entries","user":{"login":"markstos","id":25829,"avatar_url":"https://avatars.githubusercontent.com/u/25829?v=3","gravatar_id":"","url":"https://api.github.com/users/markstos","html_url":"https://github.com/markstos","followers_url":"https://api.github.com/users/markstos/followers","following_url":"https://api.github.com/users/markstos/following{/other_user}","gists_url":"https://api.github.com/users/markstos/gists{/gist_id}","starred_url":"https://api.github.com/users/markstos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstos/subscriptions","organizations_url":"https://api.github.com/users/markstos/orgs","repos_url":"https://api.github.com/users/markstos/repos","events_url":"https://api.github.com/users/markstos/events{/privacy}","received_events_url":"https://api.github.com/users/markstos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-23T18:42:47Z","updated_at":"2016-11-23T18:42:47Z","closed_at":null,"body":"**Do you want to request a *feature* or report a *bug*?**\r\n\r\nBug.\r\n**What is the current behavior?**\r\n\r\nTo reproduce the issue:\r\n\r\n   1. yarn add mocha-jenkins-reporter@0.2.5\r\n   2. yarn add 'juhovh/mocha-jenkins-reporter#e87c20655e2737205b76793e379154c953ab2b26'\r\n   3. Review `yarn.lock` and observe two entries for the package, one for the NPM repo version that is not used and one for the Github-hosted version that is us.\r\n\r\n```\r\n$ grep mocha-jenkins yarn.lock \r\nmocha-jenkins-reporter@0.2.5:\r\n  resolved \"https://registry.yarnpkg.com/mocha-jenkins-reporter/-/mocha-jenkins-reporter-0.2.5.tgz#7a2dd89da596c1dc0f1d041f24219110a4b0b887\"\r\nmocha-jenkins-reporter@juhovh/mocha-jenkins-reporter#e87c20655e2737205b76793e379154c953ab2b26:\r\n  resolved \"https://codeload.github.com/juhovh/mocha-jenkins-reporter/tar.gz/e87c20655e2737205b76793e379154c953ab2b26\"\r\n```\r\n\r\n**What is the expected behavior?**\r\n\r\nI would expect the same behavior if I had installed one npm-repo version followed by another package version hosted on the main NPM repo. For example, if I install the latest package version then downgrade it, I end up with one entry for the module in `yarn.lock`:\r\n\r\n 1. yarn add mocha-jenkins-reporter@0.3.1\r\n 2. yarn add mocha-jenkins-reporter@0.2.5\r\n\r\n```\r\n$ grep mocha-jenkins yarn.lock \r\nmocha-jenkins-reporter@0.2.5:\r\n  resolved \"https://registry.yarnpkg.com/mocha-jenkins-reporter/-/mocha-jenkins-reporter-0.2.5.tgz#7a2dd89da596c1dc0f1d041f24219110a4b0b887\"\r\n```\r\n  \r\nI tried to compare my results against detailed technical documentation for the data structure in yarn.lock, but found no such detailed documentation.\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\n\r\n* yarn 0.17.8\r\n* Node 4.4.1\r\n* Ubuntu  Linux 16.04\r\n"}}
{"actor":{"display_login":"markstos"}}