{"action":"created","comment":{"url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/comments/123664544","pull_request_review_id":45891364,"id":123664544,"diff_hunk":"@@ -53,9 +53,13 @@ function findFile(opt) {\n       // find path to the root, stopping at cwd, package.json or bower.json\n       var pathToRoot = [];\n       var isWorking;\n+      var depthCount = 0;\n       do {\n         pathToRoot.push(absoluteStart);\n-        isWorking = testWithinLimit(absoluteStart);\n+        if (!testNotPackage(absoluteStart)) {\n+          depthCount += 1;\n+        }\n+        isWorking = testWithinLimit(absoluteStart) && depthCount < options.moduleDepth;","path":"lib/find-file.js","position":null,"original_position":11,"commit_id":"edcf25c35e86bf6a08b964e2c79da6b6f45406d8","original_commit_id":"edcf25c35e86bf6a08b964e2c79da6b6f45406d8","user":{"login":"bholloway","id":6868309,"avatar_url":"https://avatars0.githubusercontent.com/u/6868309?v=3","gravatar_id":"","url":"https://api.github.com/users/bholloway","html_url":"https://github.com/bholloway","followers_url":"https://api.github.com/users/bholloway/followers","following_url":"https://api.github.com/users/bholloway/following{/other_user}","gists_url":"https://api.github.com/users/bholloway/gists{/gist_id}","starred_url":"https://api.github.com/users/bholloway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholloway/subscriptions","organizations_url":"https://api.github.com/users/bholloway/orgs","repos_url":"https://api.github.com/users/bholloway/repos","events_url":"https://api.github.com/users/bholloway/events{/privacy}","received_events_url":"https://api.github.com/users/bholloway/received_events","type":"User","site_admin":false},"body":"**An observation:** Code searches upward/shallower from the original path. The code that does deeper is below  `.filter(testNotPackage)`. Which one of these solves your use case, shallower or deeper?","created_at":"2017-06-23T03:13:59Z","updated_at":"2017-06-23T03:13:59Z","html_url":"https://github.com/bholloway/resolve-url-loader/pull/62#discussion_r123664544","pull_request_url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/comments/123664544"},"html":{"href":"https://github.com/bholloway/resolve-url-loader/pull/62#discussion_r123664544"},"pull_request":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62","id":126866149,"html_url":"https://github.com/bholloway/resolve-url-loader/pull/62","diff_url":"https://github.com/bholloway/resolve-url-loader/pull/62.diff","patch_url":"https://github.com/bholloway/resolve-url-loader/pull/62.patch","issue_url":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/62","number":62,"state":"open","locked":false,"title":"Improved search","user":{"login":"frontEndWebDev","id":16168934,"avatar_url":"https://avatars3.githubusercontent.com/u/16168934?v=3","gravatar_id":"","url":"https://api.github.com/users/frontEndWebDev","html_url":"https://github.com/frontEndWebDev","followers_url":"https://api.github.com/users/frontEndWebDev/followers","following_url":"https://api.github.com/users/frontEndWebDev/following{/other_user}","gists_url":"https://api.github.com/users/frontEndWebDev/gists{/gist_id}","starred_url":"https://api.github.com/users/frontEndWebDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frontEndWebDev/subscriptions","organizations_url":"https://api.github.com/users/frontEndWebDev/orgs","repos_url":"https://api.github.com/users/frontEndWebDev/repos","events_url":"https://api.github.com/users/frontEndWebDev/events{/privacy}","received_events_url":"https://api.github.com/users/frontEndWebDev/received_events","type":"User","site_admin":false},"body":"Hello, I have made little improvement for search. Let say you have this webpack dev config: \r\n```\r\nconst devConfig = {\r\n  // some code\r\n  module: {\r\n    rules: [\r\n      {\r\n        test: /\\.(sass|scss)$/,\r\n        use: [\r\n          'style-loader',\r\n          'css-loader',\r\n          'postcss-loader',\r\n\t  'resolve-url-loader',\r\n\t  {\r\n            loader: 'sass-loader',\r\n            options: {\r\n              sourceMap: true\r\n            }\r\n          }\r\n        ]\r\n      },\r\n      {\r\n        test: /\\.less$/,\r\n        use: [\r\n          'style-loader',\r\n          'css-loader',\r\n          'postcss-loader',\r\n          'resolve-url-loader',\r\n\t  {\r\n            loader: 'stylus-loader',\r\n            options: {\r\n              sourceMap: true\r\n              use: [require('nib')()],\r\n              import: ['~nib/lib/nib/index.styl']\r\n            }\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n_};_\r\n```\r\nSass files will work just fine, but stylus wouldn't. Because stylus has plugin nib that located in node_modules. The problem in this function: **testNotPackage(absoluteStart)**. When building _queue_ with _limit = 'my-project/'_ we have such results:\r\n```\r\n/my-project/node_modules/nib/lib/nib\r\n/my-project/node_modules/nib/lib\r\n/my-project/node_modules/nib\r\n/my-project/node_modules/nib/lib/nib/normalize\r\n/my-project/node_modules/nib/lib/nib/text\r\n/my-project/node_modules/nib/lib/nodes\r\n/my-project/node_modules/nib/docs\r\n/my-project/node_modules/nib/iconic\r\n/my-project/node_modules/nib/node_modules\r\n```\r\nSearch stops at _/my-project/node_modules/nib_ and dont go up to _limit_ because folder nib has package.json. My proposal to remove **testNotPackage(absoluteStart)** and fix this very old stylus/nib problem.","created_at":"2017-06-21T21:35:45Z","updated_at":"2017-06-23T03:13:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b036dff403f691e5e42ad95a12b56f63366f3701","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62/commits","review_comments_url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62/comments","review_comment_url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/62/comments","statuses_url":"https://api.github.com/repos/bholloway/resolve-url-loader/statuses/edcf25c35e86bf6a08b964e2c79da6b6f45406d8","head":{"label":"frontEndWebDev:tune-search","ref":"tune-search","sha":"edcf25c35e86bf6a08b964e2c79da6b6f45406d8","user":{"login":"frontEndWebDev","id":16168934,"avatar_url":"https://avatars3.githubusercontent.com/u/16168934?v=3","gravatar_id":"","url":"https://api.github.com/users/frontEndWebDev","html_url":"https://github.com/frontEndWebDev","followers_url":"https://api.github.com/users/frontEndWebDev/followers","following_url":"https://api.github.com/users/frontEndWebDev/following{/other_user}","gists_url":"https://api.github.com/users/frontEndWebDev/gists{/gist_id}","starred_url":"https://api.github.com/users/frontEndWebDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frontEndWebDev/subscriptions","organizations_url":"https://api.github.com/users/frontEndWebDev/orgs","repos_url":"https://api.github.com/users/frontEndWebDev/repos","events_url":"https://api.github.com/users/frontEndWebDev/events{/privacy}","received_events_url":"https://api.github.com/users/frontEndWebDev/received_events","type":"User","site_admin":false},"repo":{"id":95044995,"name":"resolve-url-loader","full_name":"frontEndWebDev/resolve-url-loader","owner":{"login":"frontEndWebDev","id":16168934,"avatar_url":"https://avatars3.githubusercontent.com/u/16168934?v=3","gravatar_id":"","url":"https://api.github.com/users/frontEndWebDev","html_url":"https://github.com/frontEndWebDev","followers_url":"https://api.github.com/users/frontEndWebDev/followers","following_url":"https://api.github.com/users/frontEndWebDev/following{/other_user}","gists_url":"https://api.github.com/users/frontEndWebDev/gists{/gist_id}","starred_url":"https://api.github.com/users/frontEndWebDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frontEndWebDev/subscriptions","organizations_url":"https://api.github.com/users/frontEndWebDev/orgs","repos_url":"https://api.github.com/users/frontEndWebDev/repos","events_url":"https://api.github.com/users/frontEndWebDev/events{/privacy}","received_events_url":"https://api.github.com/users/frontEndWebDev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frontEndWebDev/resolve-url-loader","description":"Webpack loader that resolves relative paths in url() statements based on the original source file","fork":true,"url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader","forks_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/forks","keys_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/teams","hooks_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/hooks","issue_events_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/issues/events{/number}","events_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/events","assignees_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/assignees{/user}","branches_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/branches{/branch}","tags_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/tags","blobs_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/languages","stargazers_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/stargazers","contributors_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/contributors","subscribers_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/subscribers","subscription_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/subscription","commits_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/contents/{+path}","compare_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/merges","archive_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/downloads","issues_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/issues{/number}","pulls_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/labels{/name}","releases_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/releases{/id}","deployments_url":"https://api.github.com/repos/frontEndWebDev/resolve-url-loader/deployments","created_at":"2017-06-21T20:50:07Z","updated_at":"2017-06-21T20:50:09Z","pushed_at":"2017-06-22T16:59:00Z","git_url":"git://github.com/frontEndWebDev/resolve-url-loader.git","ssh_url":"git@github.com:frontEndWebDev/resolve-url-loader.git","clone_url":"https://github.com/frontEndWebDev/resolve-url-loader.git","svn_url":"https://github.com/frontEndWebDev/resolve-url-loader","homepage":"","size":66,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bholloway:master","ref":"master","sha":"00fe51b9e42f5b1044abaf66c5bd4a1d10ec6750","user":{"login":"bholloway","id":6868309,"avatar_url":"https://avatars0.githubusercontent.com/u/6868309?v=3","gravatar_id":"","url":"https://api.github.com/users/bholloway","html_url":"https://github.com/bholloway","followers_url":"https://api.github.com/users/bholloway/followers","following_url":"https://api.github.com/users/bholloway/following{/other_user}","gists_url":"https://api.github.com/users/bholloway/gists{/gist_id}","starred_url":"https://api.github.com/users/bholloway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholloway/subscriptions","organizations_url":"https://api.github.com/users/bholloway/orgs","repos_url":"https://api.github.com/users/bholloway/repos","events_url":"https://api.github.com/users/bholloway/events{/privacy}","received_events_url":"https://api.github.com/users/bholloway/received_events","type":"User","site_admin":false},"repo":{"id":40636076,"name":"resolve-url-loader","full_name":"bholloway/resolve-url-loader","owner":{"login":"bholloway","id":6868309,"avatar_url":"https://avatars0.githubusercontent.com/u/6868309?v=3","gravatar_id":"","url":"https://api.github.com/users/bholloway","html_url":"https://github.com/bholloway","followers_url":"https://api.github.com/users/bholloway/followers","following_url":"https://api.github.com/users/bholloway/following{/other_user}","gists_url":"https://api.github.com/users/bholloway/gists{/gist_id}","starred_url":"https://api.github.com/users/bholloway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholloway/subscriptions","organizations_url":"https://api.github.com/users/bholloway/orgs","repos_url":"https://api.github.com/users/bholloway/repos","events_url":"https://api.github.com/users/bholloway/events{/privacy}","received_events_url":"https://api.github.com/users/bholloway/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bholloway/resolve-url-loader","description":"Webpack loader that resolves relative paths in url() statements based on the original source file","fork":false,"url":"https://api.github.com/repos/bholloway/resolve-url-loader","forks_url":"https://api.github.com/repos/bholloway/resolve-url-loader/forks","keys_url":"https://api.github.com/repos/bholloway/resolve-url-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bholloway/resolve-url-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bholloway/resolve-url-loader/teams","hooks_url":"https://api.github.com/repos/bholloway/resolve-url-loader/hooks","issue_events_url":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/events{/number}","events_url":"https://api.github.com/repos/bholloway/resolve-url-loader/events","assignees_url":"https://api.github.com/repos/bholloway/resolve-url-loader/assignees{/user}","branches_url":"https://api.github.com/repos/bholloway/resolve-url-loader/branches{/branch}","tags_url":"https://api.github.com/repos/bholloway/resolve-url-loader/tags","blobs_url":"https://api.github.com/repos/bholloway/resolve-url-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bholloway/resolve-url-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bholloway/resolve-url-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/bholloway/resolve-url-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bholloway/resolve-url-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/bholloway/resolve-url-loader/languages","stargazers_url":"https://api.github.com/repos/bholloway/resolve-url-loader/stargazers","contributors_url":"https://api.github.com/repos/bholloway/resolve-url-loader/contributors","subscribers_url":"https://api.github.com/repos/bholloway/resolve-url-loader/subscribers","subscription_url":"https://api.github.com/repos/bholloway/resolve-url-loader/subscription","commits_url":"https://api.github.com/repos/bholloway/resolve-url-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/bholloway/resolve-url-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/bholloway/resolve-url-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/bholloway/resolve-url-loader/contents/{+path}","compare_url":"https://api.github.com/repos/bholloway/resolve-url-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bholloway/resolve-url-loader/merges","archive_url":"https://api.github.com/repos/bholloway/resolve-url-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bholloway/resolve-url-loader/downloads","issues_url":"https://api.github.com/repos/bholloway/resolve-url-loader/issues{/number}","pulls_url":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/bholloway/resolve-url-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/bholloway/resolve-url-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bholloway/resolve-url-loader/labels{/name}","releases_url":"https://api.github.com/repos/bholloway/resolve-url-loader/releases{/id}","deployments_url":"https://api.github.com/repos/bholloway/resolve-url-loader/deployments","created_at":"2015-08-13T03:01:58Z","updated_at":"2017-06-21T20:37:44Z","pushed_at":"2017-06-22T16:59:01Z","git_url":"git://github.com/bholloway/resolve-url-loader.git","ssh_url":"git@github.com:bholloway/resolve-url-loader.git","clone_url":"https://github.com/bholloway/resolve-url-loader.git","svn_url":"https://github.com/bholloway/resolve-url-loader","homepage":"","size":63,"stargazers_count":180,"watchers_count":180,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62"},"html":{"href":"https://github.com/bholloway/resolve-url-loader/pull/62"},"issue":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/62"},"comments":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/bholloway/resolve-url-loader/statuses/edcf25c35e86bf6a08b964e2c79da6b6f45406d8"}}}}
{"actor":{"display_login":"bholloway"}}