{"action":"created","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/4157","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/4157/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/4157/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/4157/events","html_url":"https://github.com/yarnpkg/yarn/issues/4157","id":249773940,"number":4157,"title":"Yarn writes registry.yarnpkg.com to lockfile when private scoped packages is from registry.npmjs.org","user":{"login":"stieg","id":141519,"avatar_url":"https://avatars0.githubusercontent.com/u/141519?v=4","gravatar_id":"","url":"https://api.github.com/users/stieg","html_url":"https://github.com/stieg","followers_url":"https://api.github.com/users/stieg/followers","following_url":"https://api.github.com/users/stieg/following{/other_user}","gists_url":"https://api.github.com/users/stieg/gists{/gist_id}","starred_url":"https://api.github.com/users/stieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stieg/subscriptions","organizations_url":"https://api.github.com/users/stieg/orgs","repos_url":"https://api.github.com/users/stieg/repos","events_url":"https://api.github.com/users/stieg/events{/privacy}","received_events_url":"https://api.github.com/users/stieg/received_events","type":"User","site_admin":false},"labels":[{"id":462978591,"url":"https://api.github.com/repos/yarnpkg/yarn/labels/needs-investigation","name":"needs-investigation","color":"2b313a","default":false}],"state":"open","locked":false,"assignee":{"login":"BYK","id":126780,"avatar_url":"https://avatars3.githubusercontent.com/u/126780?v=4","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"assignees":[{"login":"BYK","id":126780,"avatar_url":"https://avatars3.githubusercontent.com/u/126780?v=4","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2017-08-12T00:04:36Z","updated_at":"2017-09-14T01:41:30Z","closed_at":null,"author_association":"NONE","body":"**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n\r\n**What is the current behavior?**\r\nI have something like the following in my ~/.npmrc file:\r\n```\r\n@mycompany:registry=https://registry.npmjs.org/\r\n//registry.npmjs.org/:_authToken=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\n```\r\nThis is necessary so I can login to my private repo and get the packages I need to build locally. \r\n\r\nWhen I add a new package like @mycompany/foo I would expect an entry in the `yarn.lock` file to look something like this:\r\n```\r\n\"@mycompany/foo@^1.1.0\":\r\n  version \"1.1.0\"\r\n  resolved \"https://registry.npmjs.org/@mycompany/foo/-/foo-1.1.0.tgz#103034ba565c288eb781b1fd1065c9f05dfb90f9\"\r\n```\r\nYeah... not so much.  Instead it looks like this:\r\n```\r\n\"@mycompany/foo@^1.1.0\":\r\n  version \"1.1.0\"\r\n  resolved \"https://registry.yarnpkg.com/@mycompany/foo/-/foo-1.1.0.tgz#103034ba565c288eb781b1fd1065c9f05dfb90f9\"\r\n```\r\nUncool yarn.  This causes my CI to break because it will try and dig up the packages at `registry.yarnpkg.com`.  Since this is a private registry the login will fail (since the registry is hosted on registry.npmjs.org) and thus it will cause other systems to fail to install packages.\r\n\r\nHere is how to reproduce:\r\n\r\n1. Setup a private repo on npm with some namespace\r\n2. Set your .npmrc file to something like the one I provided above (except you replace the scope `mycompany` with your own scope, and set a valid auth token of course), and run `yarn add <your scoped package>`.  You can do this by doing `npm login --registry=https://registry.npmjs.org --scope=@<your scope name>`.  I would use yarn login but that doesn't work :(\r\n3. Add a package from your scope using `yarn add`\r\n4. Push a trivial update to that package in your scope.\r\n5. Tell yarn to upgrade the package.\r\n\r\nYou will see that the URL gets changed in the lock file.\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\nnode: 8.2.1\r\nyarn: 0.28.4\r\nOS: Fedora 26"},"comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments/329344495","html_url":"https://github.com/yarnpkg/yarn/issues/4157#issuecomment-329344495","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/4157","id":329344495,"user":{"login":"BYK","id":126780,"avatar_url":"https://avatars3.githubusercontent.com/u/126780?v=4","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T01:41:30Z","updated_at":"2017-09-14T01:41:30Z","author_association":"OWNER","body":"@stieg - these three PRs: #4350, #4347, #4367 \r\n\r\nThat said 1.0.2 is out with these fixes, so why don't you give that a spin and if it still fails share the full error log with `--verbose`?"}}
{"actor":{"display_login":"BYK"}}