{"action":"closed","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/1762","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1762/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1762/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1762/events","html_url":"https://github.com/yarnpkg/yarn/issues/1762","id":188377074,"number":1762,"title":"Allow upgrade for local/git packages by used name","user":{"login":"whitecolor","id":736697,"avatar_url":"https://avatars.githubusercontent.com/u/736697?v=3","gravatar_id":"","url":"https://api.github.com/users/whitecolor","html_url":"https://github.com/whitecolor","followers_url":"https://api.github.com/users/whitecolor/followers","following_url":"https://api.github.com/users/whitecolor/following{/other_user}","gists_url":"https://api.github.com/users/whitecolor/gists{/gist_id}","starred_url":"https://api.github.com/users/whitecolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitecolor/subscriptions","organizations_url":"https://api.github.com/users/whitecolor/orgs","repos_url":"https://api.github.com/users/whitecolor/repos","events_url":"https://api.github.com/users/whitecolor/events{/privacy}","received_events_url":"https://api.github.com/users/whitecolor/received_events","type":"User","site_admin":false},"labels":[{"id":461730541,"url":"https://api.github.com/repos/yarnpkg/yarn/labels/needs%20triage","name":"needs triage","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-09T23:11:48Z","updated_at":"2016-11-17T18:27:14Z","closed_at":"2016-11-17T18:27:14Z","body":"If I have local package  with package.json name: 'my-local-package'\r\n\r\nif I do `yarn add file:./path/to/my/local/package` it will add in projects package.json\r\n```\r\n\"my-local-package\": \"file:./path/to/my/local/package\"\r\n```\r\nand will place (copy) it in `node_modules/my-local-package`\r\n\r\nBut I can also manually add in project's package.json\r\n```\r\n\"my-local-package-custom-name\": \"file:./path/to/my/local/package\"\r\n```\r\n\r\nand run `yarn` and it will place local package in `node_modules/my-local-package-custom-name`\r\n\r\nThe same is valid for git repo sources. I think this is a good feature, but **npm doesn't allow such thing**, it will in any case place installed package in the canonical name `node_modules/my-local-package` if we have `my-local-package-custom-name` in package.json (it won't modify package.json though).\r\n\r\nSo the problem is that if `yarn` is still going to allow this feature with custom dest package folder name, it is not possible make targeted upgrade by name `my-local-package` or by `my-local-package-custom-name` only by `file:./path/to/my/local/package`.\r\n\r\nhttps://github.com/yarnpkg/rfcs/issues/23"}}
{"actor":{"display_login":"whitecolor"}}