{"action":"created","issue":{"url":"https://api.github.com/repos/Galooshi/import-js/issues/344","repository_url":"https://api.github.com/repos/Galooshi/import-js","labels_url":"https://api.github.com/repos/Galooshi/import-js/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/Galooshi/import-js/issues/344/comments","events_url":"https://api.github.com/repos/Galooshi/import-js/issues/344/events","html_url":"https://github.com/Galooshi/import-js/issues/344","id":172856152,"number":344,"title":"Match on files within top-level depedencies","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"labels":[{"id":150400990,"url":"https://api.github.com/repos/Galooshi/import-js/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Galooshi/import-js/milestones/4","html_url":"https://github.com/Galooshi/import-js/milestone/4","labels_url":"https://api.github.com/repos/Galooshi/import-js/milestones/4/labels","id":1959463,"number":4,"title":"2.0.0","description":null,"creator":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":3,"state":"open","created_at":"2016-08-24T03:22:04Z","updated_at":"2016-12-21T21:37:23Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-08-24T03:22:53Z","updated_at":"2017-01-04T11:03:23Z","closed_at":null,"body":"Folks may want to import files from within packages they depend on. I think we need to include these files, or a subset of these files in the files that we match on. This may end up causing relevance issues, which [we might be able to resolve with better ranking](https://github.com/Galooshi/import-js/issues/340), with a stricter opt-in mechanism (see below), or both.\n\nIn https://github.com/Galooshi/import-js/issues/340#issuecomment-241788664 I mentioned:\n\n> One idea I have is to only consider files in the [`directories.lib`](https://docs.npmjs.com/files/package.json#directorieslib) directory specified in the package's package.json file. This would allow packages to opt in to this behavior which would help us avoid matching on random example files, documentation, test files, and other private modules.\n\nI think we could start by adding this feature and allowing packages to opt in to having the files in their `directories.lib` directory be matched. We can always expand it later if necessary.\n\nI think we need to do this for 2.0, since we removed `lookupPaths`.\n"},"comment":{"url":"https://api.github.com/repos/Galooshi/import-js/issues/comments/270346568","html_url":"https://github.com/Galooshi/import-js/issues/344#issuecomment-270346568","issue_url":"https://api.github.com/repos/Galooshi/import-js/issues/344","id":270346568,"user":{"login":"trotzig","id":578277,"avatar_url":"https://avatars.githubusercontent.com/u/578277?v=3","gravatar_id":"","url":"https://api.github.com/users/trotzig","html_url":"https://github.com/trotzig","followers_url":"https://api.github.com/users/trotzig/followers","following_url":"https://api.github.com/users/trotzig/following{/other_user}","gists_url":"https://api.github.com/users/trotzig/gists{/gist_id}","starred_url":"https://api.github.com/users/trotzig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trotzig/subscriptions","organizations_url":"https://api.github.com/users/trotzig/orgs","repos_url":"https://api.github.com/users/trotzig/repos","events_url":"https://api.github.com/users/trotzig/events{/privacy}","received_events_url":"https://api.github.com/users/trotzig/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T11:03:23Z","updated_at":"2017-01-04T11:03:23Z","body":"Unfortunately, I think that's the case. I forgot to check back to this issue before releasing 2.0, so no fix was included. \r\n\r\nFor lodash, you could depend on individual functions instead. `npm install --save lodash-sample` (and others) instead of `npm install --save lodash`. If you then combine it with `ignorePackagePrefixes: ['lodash.']` in import-js config, you'll end up importing the right thing. \r\n\r\nFor `react-router/lib/Link` I can't think of a better workaround than adding an alias. "}}
{"actor":{"display_login":"trotzig"}}