{"action":"closed","number":71,"pull_request":{"url":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71","id":202296508,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjk2NTA4","html_url":"https://github.com/Updater/node-sass-json-importer/pull/71","diff_url":"https://github.com/Updater/node-sass-json-importer/pull/71.diff","patch_url":"https://github.com/Updater/node-sass-json-importer/pull/71.patch","issue_url":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/71","number":71,"state":"closed","locked":false,"title":"Allow for a custom resolver","user":{"login":"x-yuri","id":730588,"node_id":"MDQ6VXNlcjczMDU4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/730588?v=4","gravatar_id":"","url":"https://api.github.com/users/x-yuri","html_url":"https://github.com/x-yuri","followers_url":"https://api.github.com/users/x-yuri/followers","following_url":"https://api.github.com/users/x-yuri/following{/other_user}","gists_url":"https://api.github.com/users/x-yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/x-yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x-yuri/subscriptions","organizations_url":"https://api.github.com/users/x-yuri/orgs","repos_url":"https://api.github.com/users/x-yuri/repos","events_url":"https://api.github.com/users/x-yuri/events{/privacy}","received_events_url":"https://api.github.com/users/x-yuri/received_events","type":"User","site_admin":false},"body":"Reasoning. I'd like paths to be relative to project root, app root (in case of Django), or front end root. Make paths to project files distinguishable from paths to library files. And for all that be consistent across js, css, sass. While it might be a questionable idea, I start paths to project files with `/`. Now that I think about it, starting them with `~/` might be a better idea. Anyways, with native `path.resolve` that obviously doesn't work. With this PR I can resolve the issue this way:\r\n\r\n```js\r\n      loader: 'sass-loader',\r\n      options: {\r\n        importer: jsonImporter,\r\n        resolver: (dir, url) => {\r\n            // allow paths relative to front-end dir, starting with /\r\n            if (url.startsWith('/')\r\n            && c.insideDir(path.join(dir, 'filename'),\r\n                path.join(root, 'front-end'))) {\r\n                    return path.join(root, 'front-end', url.substr(1));\r\n            }\r\n            return path.resolve(dir, url);\r\n        },\r\n      },\r\n```\r\n\r\nShould I bump the version and add an entry to changelog?","created_at":"2018-07-18T15:39:51Z","updated_at":"2018-09-05T02:49:29Z","closed_at":"2018-09-05T02:49:29Z","merged_at":"2018-09-05T02:49:29Z","merge_commit_sha":"c7bdacf6224b636e6259cac6e3f3b8315309c071","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71/commits","review_comments_url":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71/comments","review_comment_url":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/71/comments","statuses_url":"https://api.github.com/repos/Updater/node-sass-json-importer/statuses/fbd423988b600032191eabd40ddefb22e7fdaf6b","head":{"label":"x-yuri:custom-resolver","ref":"custom-resolver","sha":"fbd423988b600032191eabd40ddefb22e7fdaf6b","user":{"login":"x-yuri","id":730588,"node_id":"MDQ6VXNlcjczMDU4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/730588?v=4","gravatar_id":"","url":"https://api.github.com/users/x-yuri","html_url":"https://github.com/x-yuri","followers_url":"https://api.github.com/users/x-yuri/followers","following_url":"https://api.github.com/users/x-yuri/following{/other_user}","gists_url":"https://api.github.com/users/x-yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/x-yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x-yuri/subscriptions","organizations_url":"https://api.github.com/users/x-yuri/orgs","repos_url":"https://api.github.com/users/x-yuri/repos","events_url":"https://api.github.com/users/x-yuri/events{/privacy}","received_events_url":"https://api.github.com/users/x-yuri/received_events","type":"User","site_admin":false},"repo":{"id":141395734,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEzOTU3MzQ=","name":"node-sass-json-importer","full_name":"x-yuri/node-sass-json-importer","owner":{"login":"x-yuri","id":730588,"node_id":"MDQ6VXNlcjczMDU4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/730588?v=4","gravatar_id":"","url":"https://api.github.com/users/x-yuri","html_url":"https://github.com/x-yuri","followers_url":"https://api.github.com/users/x-yuri/followers","following_url":"https://api.github.com/users/x-yuri/following{/other_user}","gists_url":"https://api.github.com/users/x-yuri/gists{/gist_id}","starred_url":"https://api.github.com/users/x-yuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/x-yuri/subscriptions","organizations_url":"https://api.github.com/users/x-yuri/orgs","repos_url":"https://api.github.com/users/x-yuri/repos","events_url":"https://api.github.com/users/x-yuri/events{/privacy}","received_events_url":"https://api.github.com/users/x-yuri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/x-yuri/node-sass-json-importer","description":"Allows importing json in sass files parsed by node-sass.","fork":true,"url":"https://api.github.com/repos/x-yuri/node-sass-json-importer","forks_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/forks","keys_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/teams","hooks_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/hooks","issue_events_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/issues/events{/number}","events_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/events","assignees_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/assignees{/user}","branches_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/branches{/branch}","tags_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/tags","blobs_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/git/refs{/sha}","trees_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/statuses/{sha}","languages_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/languages","stargazers_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/stargazers","contributors_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/contributors","subscribers_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/subscribers","subscription_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/subscription","commits_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/commits{/sha}","git_commits_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/git/commits{/sha}","comments_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/comments{/number}","issue_comment_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/issues/comments{/number}","contents_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/contents/{+path}","compare_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/merges","archive_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/downloads","issues_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/issues{/number}","pulls_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/pulls{/number}","milestones_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/milestones{/number}","notifications_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/labels{/name}","releases_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/releases{/id}","deployments_url":"https://api.github.com/repos/x-yuri/node-sass-json-importer/deployments","created_at":"2018-07-18T07:10:32Z","updated_at":"2018-07-18T07:10:34Z","pushed_at":"2018-09-04T23:32:55Z","git_url":"git://github.com/x-yuri/node-sass-json-importer.git","ssh_url":"git@github.com:x-yuri/node-sass-json-importer.git","clone_url":"https://github.com/x-yuri/node-sass-json-importer.git","svn_url":"https://github.com/x-yuri/node-sass-json-importer","homepage":"","size":104,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Updater:master","ref":"master","sha":"cc290fb40265b7fe47a809bbd8b43da3181b480b","user":{"login":"Updater","id":7205807,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDU4MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/7205807?v=4","gravatar_id":"","url":"https://api.github.com/users/Updater","html_url":"https://github.com/Updater","followers_url":"https://api.github.com/users/Updater/followers","following_url":"https://api.github.com/users/Updater/following{/other_user}","gists_url":"https://api.github.com/users/Updater/gists{/gist_id}","starred_url":"https://api.github.com/users/Updater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Updater/subscriptions","organizations_url":"https://api.github.com/users/Updater/orgs","repos_url":"https://api.github.com/users/Updater/repos","events_url":"https://api.github.com/users/Updater/events{/privacy}","received_events_url":"https://api.github.com/users/Updater/received_events","type":"Organization","site_admin":false},"repo":{"id":42609159,"node_id":"MDEwOlJlcG9zaXRvcnk0MjYwOTE1OQ==","name":"node-sass-json-importer","full_name":"Updater/node-sass-json-importer","owner":{"login":"Updater","id":7205807,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMDU4MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/7205807?v=4","gravatar_id":"","url":"https://api.github.com/users/Updater","html_url":"https://github.com/Updater","followers_url":"https://api.github.com/users/Updater/followers","following_url":"https://api.github.com/users/Updater/following{/other_user}","gists_url":"https://api.github.com/users/Updater/gists{/gist_id}","starred_url":"https://api.github.com/users/Updater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Updater/subscriptions","organizations_url":"https://api.github.com/users/Updater/orgs","repos_url":"https://api.github.com/users/Updater/repos","events_url":"https://api.github.com/users/Updater/events{/privacy}","received_events_url":"https://api.github.com/users/Updater/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Updater/node-sass-json-importer","description":"Allows importing json in sass files parsed by node-sass.","fork":false,"url":"https://api.github.com/repos/Updater/node-sass-json-importer","forks_url":"https://api.github.com/repos/Updater/node-sass-json-importer/forks","keys_url":"https://api.github.com/repos/Updater/node-sass-json-importer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Updater/node-sass-json-importer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Updater/node-sass-json-importer/teams","hooks_url":"https://api.github.com/repos/Updater/node-sass-json-importer/hooks","issue_events_url":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/events{/number}","events_url":"https://api.github.com/repos/Updater/node-sass-json-importer/events","assignees_url":"https://api.github.com/repos/Updater/node-sass-json-importer/assignees{/user}","branches_url":"https://api.github.com/repos/Updater/node-sass-json-importer/branches{/branch}","tags_url":"https://api.github.com/repos/Updater/node-sass-json-importer/tags","blobs_url":"https://api.github.com/repos/Updater/node-sass-json-importer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Updater/node-sass-json-importer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Updater/node-sass-json-importer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Updater/node-sass-json-importer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Updater/node-sass-json-importer/statuses/{sha}","languages_url":"https://api.github.com/repos/Updater/node-sass-json-importer/languages","stargazers_url":"https://api.github.com/repos/Updater/node-sass-json-importer/stargazers","contributors_url":"https://api.github.com/repos/Updater/node-sass-json-importer/contributors","subscribers_url":"https://api.github.com/repos/Updater/node-sass-json-importer/subscribers","subscription_url":"https://api.github.com/repos/Updater/node-sass-json-importer/subscription","commits_url":"https://api.github.com/repos/Updater/node-sass-json-importer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Updater/node-sass-json-importer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Updater/node-sass-json-importer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Updater/node-sass-json-importer/contents/{+path}","compare_url":"https://api.github.com/repos/Updater/node-sass-json-importer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Updater/node-sass-json-importer/merges","archive_url":"https://api.github.com/repos/Updater/node-sass-json-importer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Updater/node-sass-json-importer/downloads","issues_url":"https://api.github.com/repos/Updater/node-sass-json-importer/issues{/number}","pulls_url":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls{/number}","milestones_url":"https://api.github.com/repos/Updater/node-sass-json-importer/milestones{/number}","notifications_url":"https://api.github.com/repos/Updater/node-sass-json-importer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Updater/node-sass-json-importer/labels{/name}","releases_url":"https://api.github.com/repos/Updater/node-sass-json-importer/releases{/id}","deployments_url":"https://api.github.com/repos/Updater/node-sass-json-importer/deployments","created_at":"2015-09-16T19:38:22Z","updated_at":"2018-09-03T03:19:26Z","pushed_at":"2018-09-05T02:49:29Z","git_url":"git://github.com/Updater/node-sass-json-importer.git","ssh_url":"git@github.com:Updater/node-sass-json-importer.git","clone_url":"https://github.com/Updater/node-sass-json-importer.git","svn_url":"https://github.com/Updater/node-sass-json-importer","homepage":"","size":97,"stargazers_count":106,"watchers_count":106,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":36,"open_issues":2,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71"},"html":{"href":"https://github.com/Updater/node-sass-json-importer/pull/71"},"issue":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/71"},"comments":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/Updater/node-sass-json-importer/statuses/fbd423988b600032191eabd40ddefb22e7fdaf6b"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"pmowrer","id":356320,"node_id":"MDQ6VXNlcjM1NjMyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/356320?v=4","gravatar_id":"","url":"https://api.github.com/users/pmowrer","html_url":"https://github.com/pmowrer","followers_url":"https://api.github.com/users/pmowrer/followers","following_url":"https://api.github.com/users/pmowrer/following{/other_user}","gists_url":"https://api.github.com/users/pmowrer/gists{/gist_id}","starred_url":"https://api.github.com/users/pmowrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmowrer/subscriptions","organizations_url":"https://api.github.com/users/pmowrer/orgs","repos_url":"https://api.github.com/users/pmowrer/repos","events_url":"https://api.github.com/users/pmowrer/events{/privacy}","received_events_url":"https://api.github.com/users/pmowrer/received_events","type":"User","site_admin":false},"comments":12,"review_comments":0,"maintainer_can_modify":false,"commits":7,"additions":404,"deletions":287,"changed_files":7}}
{"actor":{"display_login":"pmowrer"}}