{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/13884","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/13884/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/13884/comments","events_url":"https://api.github.com/repos/npm/npm/issues/13884/events","html_url":"https://github.com/npm/npm/issues/13884","id":175365759,"number":13884,"title":"Links under a folder set in package.json's `files` are not included","user":{"login":"espadrine","id":100689,"avatar_url":"https://avatars.githubusercontent.com/u/100689?v=3","gravatar_id":"","url":"https://api.github.com/users/espadrine","html_url":"https://github.com/espadrine","followers_url":"https://api.github.com/users/espadrine/followers","following_url":"https://api.github.com/users/espadrine/following{/other_user}","gists_url":"https://api.github.com/users/espadrine/gists{/gist_id}","starred_url":"https://api.github.com/users/espadrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espadrine/subscriptions","organizations_url":"https://api.github.com/users/espadrine/orgs","repos_url":"https://api.github.com/users/espadrine/repos","events_url":"https://api.github.com/users/espadrine/events{/privacy}","received_events_url":"https://api.github.com/users/espadrine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T22:19:59Z","updated_at":"2016-09-06T23:50:49Z","closed_at":null,"body":"#### I'm opening this issue because:\r\n\r\n  - [ ] npm is crashing.\r\n  - [x] npm is producing an incorrect install.\r\n  - [ ] npm is doing something I don't understand.\r\n  - [ ] Other (_see below for feature requests_):\r\n\r\n#### What's going wrong?\r\n\r\nThe [documentation](https://docs.npmjs.com/files/package.json#files) for the `files` field in package.json indicates:\r\n\r\n>  If you name a folder in the array, then it will also include the files inside that folder.\r\n\r\nHowever, when a folder specified under `files` contains a link pointing to a file that is also included in the `files` field (for instance, inside of that folder), that link file is not included, even though it is a file under the folder specified under `files`.\r\n\r\n#### How can the CLI team reproduce the problem?\r\n\r\n```bash\r\nmkdir test\r\ncd test\r\nmkdir folder\r\ncd folder\r\necho content > target\r\nln -s target link\r\ncd ..\r\ncat <<EOF > package.json\r\n{\r\n  \"name\": \"test\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"main\": \"index.js\",\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\",\r\n  \"files\": [\"folder\"]\r\n}\r\nEOF\r\ncd ..\r\nnpm install test\r\nfind node_modules/test | grep link\r\n```\r\n\r\nThe last command should output the link file. It does not.\r\n\r\n### supporting information:\r\n\r\n - `npm -v` prints: 3.9.5\r\n - `node -v` prints: 6.2.2\r\n - `npm config get registry` prints: https://registry.npmjs.org/\r\n - Windows, OS X, or Linux?: Linux\r\n - Network issues:\r\n   - Geographic location where npm was run: London\r\n   - [ ] I use a proxy to connect to the npm registry.\r\n   - [ ] I use a proxy to connect to the web.\r\n   - [ ] I use a proxy when downloading Git repos.\r\n   - [ ] I access the npm registry via a VPN\r\n   - [ ] I don't use a proxy, but have limited or unreliable internet access.\r\n - Container:\r\n   - [ ] I develop using Vagrant on Windows.\r\n   - [ ] I develop using Vagrant on OS X or Linux.\r\n   - [ ] I develop / deploy using Docker.\r\n   - [ ] I deploy to a PaaS (Triton, Heroku)."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/245131777","html_url":"https://github.com/npm/npm/issues/13884#issuecomment-245131777","issue_url":"https://api.github.com/repos/npm/npm/issues/13884","id":245131777,"user":{"login":"legodude17","id":11205096,"avatar_url":"https://avatars.githubusercontent.com/u/11205096?v=3","gravatar_id":"","url":"https://api.github.com/users/legodude17","html_url":"https://github.com/legodude17","followers_url":"https://api.github.com/users/legodude17/followers","following_url":"https://api.github.com/users/legodude17/following{/other_user}","gists_url":"https://api.github.com/users/legodude17/gists{/gist_id}","starred_url":"https://api.github.com/users/legodude17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legodude17/subscriptions","organizations_url":"https://api.github.com/users/legodude17/orgs","repos_url":"https://api.github.com/users/legodude17/repos","events_url":"https://api.github.com/users/legodude17/events{/privacy}","received_events_url":"https://api.github.com/users/legodude17/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T23:50:49Z","updated_at":"2016-09-06T23:50:49Z","body":"I followed the reproduction instructions and it did do the same thing."}}
{"actor":{"display_login":"legodude17"}}