{"action":"closed","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/5407","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/5407/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/5407/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/5407/events","html_url":"https://github.com/yarnpkg/yarn/issues/5407","id":300038003,"number":5407,"title":"Subdirectory's .gitignore ignores root directory files when packaging project","user":{"login":"padarom","id":3678770,"avatar_url":"https://avatars3.githubusercontent.com/u/3678770?v=4","gravatar_id":"","url":"https://api.github.com/users/padarom","html_url":"https://github.com/padarom","followers_url":"https://api.github.com/users/padarom/followers","following_url":"https://api.github.com/users/padarom/following{/other_user}","gists_url":"https://api.github.com/users/padarom/gists{/gist_id}","starred_url":"https://api.github.com/users/padarom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/padarom/subscriptions","organizations_url":"https://api.github.com/users/padarom/orgs","repos_url":"https://api.github.com/users/padarom/repos","events_url":"https://api.github.com/users/padarom/events{/privacy}","received_events_url":"https://api.github.com/users/padarom/received_events","type":"User","site_admin":false},"labels":[{"id":594046112,"url":"https://api.github.com/repos/yarnpkg/yarn/labels/triaged","name":"triaged","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":{"login":"torifat","id":208544,"avatar_url":"https://avatars2.githubusercontent.com/u/208544?v=4","gravatar_id":"","url":"https://api.github.com/users/torifat","html_url":"https://github.com/torifat","followers_url":"https://api.github.com/users/torifat/followers","following_url":"https://api.github.com/users/torifat/following{/other_user}","gists_url":"https://api.github.com/users/torifat/gists{/gist_id}","starred_url":"https://api.github.com/users/torifat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torifat/subscriptions","organizations_url":"https://api.github.com/users/torifat/orgs","repos_url":"https://api.github.com/users/torifat/repos","events_url":"https://api.github.com/users/torifat/events{/privacy}","received_events_url":"https://api.github.com/users/torifat/received_events","type":"User","site_admin":false},"assignees":[{"login":"torifat","id":208544,"avatar_url":"https://avatars2.githubusercontent.com/u/208544?v=4","gravatar_id":"","url":"https://api.github.com/users/torifat","html_url":"https://github.com/torifat","followers_url":"https://api.github.com/users/torifat/followers","following_url":"https://api.github.com/users/torifat/following{/other_user}","gists_url":"https://api.github.com/users/torifat/gists{/gist_id}","starred_url":"https://api.github.com/users/torifat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torifat/subscriptions","organizations_url":"https://api.github.com/users/torifat/orgs","repos_url":"https://api.github.com/users/torifat/repos","events_url":"https://api.github.com/users/torifat/events{/privacy}","received_events_url":"https://api.github.com/users/torifat/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-02-25T16:08:49Z","updated_at":"2018-02-26T18:29:26Z","closed_at":"2018-02-26T18:29:26Z","author_association":"NONE","body":"**Do you want to request a *feature* or report a *bug*?**\r\nReport a bug\r\n\r\n**What is the current behavior?**\r\nWhen packaging a project via yarn (for publishing, or just using `yarn pack`), .gitignore globs from subdirectories extend to the root directory.\r\n\r\nThe file `logs/.gitignore` below contains:\r\n```gitignore\r\n*\r\n!.gitignore\r\n```\r\nFor git, this means to ignore every file _within the `logs` directory_, except `.gitignore`. Yarn interprets it as _ignore every file_ (except the ones that are always included). As such, the `src` directory is not included in the package:\r\n\r\n```\r\nλ tar -tvf yarn-issue-5407-v1.0.0.tgz\r\ndrwxr-xr-x  0 0      0           0 25 Feb 16:29 package\r\n-rw-r--r--  0 0      0         142 23 Jan 18:24 package/README.md\r\ndrwxr-xr-x  0 0      0           0 24 Feb 20:47 package/logs\r\n-rw-r--r--  0 0      0        1755 24 Feb 23:13 package/package.json\r\n-rw-r--r--  0 0      0          14 25 Jan 17:08 package/logs/.gitignore\r\n```\r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\n1. Clone this repository: http://github.com/padarom/yarn-issue-5407\r\n2. Run `yarn pack`\r\n3. Run `tar -tvf yarn-issue-5407-v1.0.0.tgz`\r\n\r\n**What is the expected behavior?**\r\n```\r\nλ tar -tvf yarn-issue-5407-v1.0.0.tgz\r\ndrwxr-xr-x  0 0      0           0 25 Feb 16:29 package\r\n-rw-r--r--  0 0      0        1877 24 Feb 20:11 package/.gitignore\r\n-rw-r--r--  0 0      0         142 23 Jan 18:24 package/README.md\r\ndrwxr-xr-x  0 0      0           0 24 Feb 20:47 package/logs\r\n-rw-r--r--  0 0      0        1755 24 Feb 23:13 package/package.json\r\ndrwxr-xr-x  0 0      0           0 24 Feb 20:11 package/src\r\n-rw-r--r--  0 0      0          14 25 Jan 17:08 package/logs/.gitignore\r\n-rw-r--r--  0 0      0           0 24 Feb 20:11 package/src/index.js\r\n-rw-r--r--  0 0      0           0 24 Feb 20:11 package/src/a.js\r\n-rw-r--r--  0 0      0           0 24 Feb 20:11 package/src/b.js\r\n```\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\nNode: v9.4.0\r\nYarn: 1.5.0\r\nOS: macOS 10.13.1 (and reproducible on Ubuntu 16.04)\r\n"}}
{"actor":{"display_login":"kaylieEB"}}