{"action":"closed","number":42,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42","id":49088150,"html_url":"https://github.com/sindresorhus/load-grunt-tasks/pull/42","diff_url":"https://github.com/sindresorhus/load-grunt-tasks/pull/42.diff","patch_url":"https://github.com/sindresorhus/load-grunt-tasks/pull/42.patch","issue_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/42","number":42,"state":"closed","locked":false,"title":"Use node_modules resolution algo","user":{"login":"kirbysayshi","id":90831,"avatar_url":"https://avatars.githubusercontent.com/u/90831?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbysayshi","html_url":"https://github.com/kirbysayshi","followers_url":"https://api.github.com/users/kirbysayshi/followers","following_url":"https://api.github.com/users/kirbysayshi/following{/other_user}","gists_url":"https://api.github.com/users/kirbysayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbysayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbysayshi/subscriptions","organizations_url":"https://api.github.com/users/kirbysayshi/orgs","repos_url":"https://api.github.com/users/kirbysayshi/repos","events_url":"https://api.github.com/users/kirbysayshi/events{/privacy}","received_events_url":"https://api.github.com/users/kirbysayshi/received_events","type":"User","site_admin":false},"body":"Hello!\r\n\r\nOur codebase at work has folders that are packages (aka they have a package.json), but we put all dependencies in the project root's node_modules folder to keep them consolidated and to make dependency management easier.\r\n\r\nload-grunt-tasks fails here, because it uses grunt's loadNpmTask method. That method, contrary to the convention put forth by node, only looks in the current directory's node_modules folder instead of recursing up the directory tree looking in each parents' node_modules folder.\r\n\r\nThis PR fixes that by resolving the package to an absolute path and then calling `loadTasks`.\r\n\r\nWhile this is different behavior than loadNpmTask, I think it's much more useful and in line with node's default behavior. It's the same thing that would happen if a task were `require`d manually and passed into grunt.\r\n\r\nLet me know what you think!","created_at":"2015-10-29T01:15:38Z","updated_at":"2015-12-09T14:39:48Z","closed_at":"2015-12-09T14:39:48Z","merged_at":null,"merge_commit_sha":"944752d6ad4995864e022cdb955479df56407bd6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/42/comments","statuses_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/statuses/153c15646db0628e46ea51c7865a7a78f0368e80","head":{"label":"kirbysayshi:ksh/require-resolve","ref":"ksh/require-resolve","sha":"153c15646db0628e46ea51c7865a7a78f0368e80","user":{"login":"kirbysayshi","id":90831,"avatar_url":"https://avatars.githubusercontent.com/u/90831?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbysayshi","html_url":"https://github.com/kirbysayshi","followers_url":"https://api.github.com/users/kirbysayshi/followers","following_url":"https://api.github.com/users/kirbysayshi/following{/other_user}","gists_url":"https://api.github.com/users/kirbysayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbysayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbysayshi/subscriptions","organizations_url":"https://api.github.com/users/kirbysayshi/orgs","repos_url":"https://api.github.com/users/kirbysayshi/repos","events_url":"https://api.github.com/users/kirbysayshi/events{/privacy}","received_events_url":"https://api.github.com/users/kirbysayshi/received_events","type":"User","site_admin":false},"repo":{"id":45127839,"name":"load-grunt-tasks","full_name":"kirbysayshi/load-grunt-tasks","owner":{"login":"kirbysayshi","id":90831,"avatar_url":"https://avatars.githubusercontent.com/u/90831?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbysayshi","html_url":"https://github.com/kirbysayshi","followers_url":"https://api.github.com/users/kirbysayshi/followers","following_url":"https://api.github.com/users/kirbysayshi/following{/other_user}","gists_url":"https://api.github.com/users/kirbysayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbysayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbysayshi/subscriptions","organizations_url":"https://api.github.com/users/kirbysayshi/orgs","repos_url":"https://api.github.com/users/kirbysayshi/repos","events_url":"https://api.github.com/users/kirbysayshi/events{/privacy}","received_events_url":"https://api.github.com/users/kirbysayshi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kirbysayshi/load-grunt-tasks","description":"Load multiple grunt tasks using globbing patterns","fork":true,"url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks","forks_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/forks","keys_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/teams","hooks_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/hooks","issue_events_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/events","assignees_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/tags","blobs_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/languages","stargazers_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/stargazers","contributors_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/contributors","subscribers_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/subscribers","subscription_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/subscription","commits_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/merges","archive_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/downloads","issues_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/labels{/name}","releases_url":"https://api.github.com/repos/kirbysayshi/load-grunt-tasks/releases{/id}","created_at":"2015-10-28T16:53:15Z","updated_at":"2015-10-28T16:53:15Z","pushed_at":"2015-10-28T16:53:58Z","git_url":"git://github.com/kirbysayshi/load-grunt-tasks.git","ssh_url":"git@github.com:kirbysayshi/load-grunt-tasks.git","clone_url":"https://github.com/kirbysayshi/load-grunt-tasks.git","svn_url":"https://github.com/kirbysayshi/load-grunt-tasks","homepage":"","size":109,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sindresorhus:master","ref":"master","sha":"d8decabd1328e10cac355b3258b2dfb1386d6ac1","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":12143193,"name":"load-grunt-tasks","full_name":"sindresorhus/load-grunt-tasks","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/load-grunt-tasks","description":"Load multiple grunt tasks using globbing patterns","fork":false,"url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks","forks_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/forks","keys_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/teams","hooks_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/events","assignees_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/tags","blobs_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/subscription","commits_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/merges","archive_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/downloads","issues_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/releases{/id}","created_at":"2013-08-15T20:32:55Z","updated_at":"2015-12-08T15:36:16Z","pushed_at":"2015-10-29T01:15:40Z","git_url":"git://github.com/sindresorhus/load-grunt-tasks.git","ssh_url":"git@github.com:sindresorhus/load-grunt-tasks.git","clone_url":"https://github.com/sindresorhus/load-grunt-tasks.git","svn_url":"https://github.com/sindresorhus/load-grunt-tasks","homepage":"","size":397,"stargazers_count":861,"watchers_count":861,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":0,"forks":49,"open_issues":0,"watchers":861,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42"},"html":{"href":"https://github.com/sindresorhus/load-grunt-tasks/pull/42"},"issue":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/42"},"comments":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/load-grunt-tasks/statuses/153c15646db0628e46ea51c7865a7a78f0368e80"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":4,"review_comments":1,"commits":1,"additions":7,"deletions":2,"changed_files":2}}