{"action":"opened","number":5979,"pull_request":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979","id":194403612,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NDAzNjEy","html_url":"https://github.com/yarnpkg/yarn/pull/5979","diff_url":"https://github.com/yarnpkg/yarn/pull/5979.diff","patch_url":"https://github.com/yarnpkg/yarn/pull/5979.patch","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/5979","number":5979,"state":"open","locked":false,"title":"fix(pack): higher priority to .npmignore over .gitignore on windows","user":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"body":"<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->\r\n\r\n**Summary**\r\n\r\nThis fixes `yarn pack` not ignoring `.gitignore` when `.npmignore` is avaialable on Windows. Initial fix was done in https://github.com/yarnpkg/yarn/pull/3538, but it used string concatenation to join paths which make it unfortunately fail for Windows which uses different path separator than other systems. It was reported as not fixed in https://github.com/yarnpkg/yarn/issues/685#issuecomment-329895660 (OS: Windows) in initial issue after issue was closed as fixed.\r\n\r\n<!-- Is the feature a substantial feature request? Please use https://github.com/yarnpkg/rfcs -->\r\n\r\n<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->\r\n\r\n**Test plan**\r\n\r\nFirst I tested if tarball created by `yarn pack` is correct (so it ignores `.gitignore` when I have `.npmignore`). \r\n\r\nTo demonstrate here, I added extra console output here https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/pack.js#L89 logging `dotIgnoreFiles` and here's before / after:\r\n\r\n**Before:**\r\n\r\n```\r\nD:\\dev\\yarn-test>yarn pack\r\nyarn pack v1.7.0\r\ndotIgnoreFiles [ { relative: '.gitignore',\r\n    basename: '.gitignore',\r\n    absolute: 'D:\\\\dev\\\\yarn-test\\\\.gitignore',\r\n    mtime: 1528836250698 },\r\n  { relative: '.npmignore',\r\n    basename: '.npmignore',\r\n    absolute: 'D:\\\\dev\\\\yarn-test\\\\.npmignore',\r\n    mtime: 1528836254147 } ]\r\nsuccess Wrote tarball to \"D:\\\\dev\\\\yarn-test\\\\yarn-test-v1.0.0.tgz\".\r\nDone in 0.45s.\r\n```\r\n\r\n**After:**\r\n\r\n```\r\nD:\\dev\\yarn-test>yarn pack\r\nyarn pack v1.7.0\r\ndotIgnoreFiles [ { relative: '.npmignore',\r\n    basename: '.npmignore',\r\n    absolute: 'D:\\\\dev\\\\yarn-test\\\\.npmignore',\r\n    mtime: 1528836254147 } ]\r\nsuccess Wrote tarball to \"D:\\\\dev\\\\yarn-test\\\\yarn-test-v1.0.0.tgz\".\r\nDone in 0.06s.\r\n```\r\n\r\n`.gitignore` is correctly omitted if `.npmignore` is present\r\n\r\n<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->\r\n","created_at":"2018-06-12T20:49:01Z","updated_at":"2018-06-12T20:49:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979/commits","review_comments_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979/comments","review_comment_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/5979/comments","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/4f8eb55474d69354f65d7f493b39108f6d35b441","head":{"label":"pieh:patch-1","ref":"patch-1","sha":"4f8eb55474d69354f65d7f493b39108f6d35b441","user":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"repo":{"id":137122852,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcxMjI4NTI=","name":"yarn","full_name":"pieh/yarn","owner":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pieh/yarn","description":"📦🐈 Fast, reliable, and secure dependency management.","fork":true,"url":"https://api.github.com/repos/pieh/yarn","forks_url":"https://api.github.com/repos/pieh/yarn/forks","keys_url":"https://api.github.com/repos/pieh/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pieh/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pieh/yarn/teams","hooks_url":"https://api.github.com/repos/pieh/yarn/hooks","issue_events_url":"https://api.github.com/repos/pieh/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/pieh/yarn/events","assignees_url":"https://api.github.com/repos/pieh/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/pieh/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/pieh/yarn/tags","blobs_url":"https://api.github.com/repos/pieh/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pieh/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pieh/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/pieh/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pieh/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/pieh/yarn/languages","stargazers_url":"https://api.github.com/repos/pieh/yarn/stargazers","contributors_url":"https://api.github.com/repos/pieh/yarn/contributors","subscribers_url":"https://api.github.com/repos/pieh/yarn/subscribers","subscription_url":"https://api.github.com/repos/pieh/yarn/subscription","commits_url":"https://api.github.com/repos/pieh/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/pieh/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/pieh/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/pieh/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/pieh/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/pieh/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pieh/yarn/merges","archive_url":"https://api.github.com/repos/pieh/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pieh/yarn/downloads","issues_url":"https://api.github.com/repos/pieh/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/pieh/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/pieh/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/pieh/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pieh/yarn/labels{/name}","releases_url":"https://api.github.com/repos/pieh/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/pieh/yarn/deployments","created_at":"2018-06-12T20:15:08Z","updated_at":"2018-06-12T20:15:16Z","pushed_at":"2018-06-12T20:23:16Z","git_url":"git://github.com/pieh/yarn.git","ssh_url":"git@github.com:pieh/yarn.git","clone_url":"https://github.com/pieh/yarn.git","svn_url":"https://github.com/pieh/yarn","homepage":"https://yarnpkg.com","size":116832,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yarnpkg:master","ref":"master","sha":"ed76c6a8979983049dce409b735a051091fe61b7","user":{"login":"yarnpkg","id":22247014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjQ3MDE0","avatar_url":"https://avatars3.githubusercontent.com/u/22247014?v=4","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"repo":{"id":49970642,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk3MDY0Mg==","name":"yarn","full_name":"yarnpkg/yarn","owner":{"login":"yarnpkg","id":22247014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjQ3MDE0","avatar_url":"https://avatars3.githubusercontent.com/u/22247014?v=4","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yarnpkg/yarn","description":"📦🐈 Fast, reliable, and secure dependency management.","fork":false,"url":"https://api.github.com/repos/yarnpkg/yarn","forks_url":"https://api.github.com/repos/yarnpkg/yarn/forks","keys_url":"https://api.github.com/repos/yarnpkg/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarnpkg/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarnpkg/yarn/teams","hooks_url":"https://api.github.com/repos/yarnpkg/yarn/hooks","issue_events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/yarnpkg/yarn/events","assignees_url":"https://api.github.com/repos/yarnpkg/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/yarnpkg/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/yarnpkg/yarn/tags","blobs_url":"https://api.github.com/repos/yarnpkg/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarnpkg/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarnpkg/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarnpkg/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/yarnpkg/yarn/languages","stargazers_url":"https://api.github.com/repos/yarnpkg/yarn/stargazers","contributors_url":"https://api.github.com/repos/yarnpkg/yarn/contributors","subscribers_url":"https://api.github.com/repos/yarnpkg/yarn/subscribers","subscription_url":"https://api.github.com/repos/yarnpkg/yarn/subscription","commits_url":"https://api.github.com/repos/yarnpkg/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarnpkg/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarnpkg/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/yarnpkg/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarnpkg/yarn/merges","archive_url":"https://api.github.com/repos/yarnpkg/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarnpkg/yarn/downloads","issues_url":"https://api.github.com/repos/yarnpkg/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/yarnpkg/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/yarnpkg/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/yarnpkg/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarnpkg/yarn/labels{/name}","releases_url":"https://api.github.com/repos/yarnpkg/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/yarnpkg/yarn/deployments","created_at":"2016-01-19T17:39:16Z","updated_at":"2018-06-12T16:55:15Z","pushed_at":"2018-06-12T17:36:18Z","git_url":"git://github.com/yarnpkg/yarn.git","ssh_url":"git@github.com:yarnpkg/yarn.git","clone_url":"https://github.com/yarnpkg/yarn.git","svn_url":"https://github.com/yarnpkg/yarn","homepage":"https://yarnpkg.com","size":116832,"stargazers_count":31973,"watchers_count":31973,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1804,"mirror_url":null,"archived":false,"open_issues_count":1199,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1804,"open_issues":1199,"watchers":31973,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/5979"},"issue":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/5979"},"comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/5979/comments"},"review_comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979/comments"},"review_comment":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/5979/commits"},"statuses":{"href":"https://api.github.com/repos/yarnpkg/yarn/statuses/4f8eb55474d69354f65d7f493b39108f6d35b441"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"pieh"}}