Skip to content

Commit 67761f0

Browse files
Merge pull request #74 from dallonf/master
Fix non-relative pathname detection
2 parents 8cc4a29 + a8cd283 commit 67761f0

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module.exports = function setupHook({
8484
*/
8585
function fetch(_to, from) {
8686
// getting absolute path to the processing file
87-
const filename = /\w/i.test(_to[0])
87+
const filename = /[^\\/?%*:|"<>\.]/i.test(_to[0])
8888
? require.resolve(_to)
8989
: resolve(dirname(from), _to);
9090

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"foo": "_test_tokens_cases_compose_node_module_source__foo _test_tokens_node_modules_awesome_theme_common__paragraph _test_tokens_node_modules_awesome_theme_oceanic__color"
2+
"foo": "_test_tokens_cases_compose_node_module_source__foo _test_tokens_node_modules_awesome_theme_common__paragraph _test_tokens_node_modules_awesome_theme_oceanic__color",
3+
"bar": "_test_tokens_cases_compose_node_module_source__bar _test_tokens_node_modules_privateorg_theme_common__button"
34
}

test/tokens/cases/compose-node-module/source.css

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
{
33
composes: paragraph from 'awesome-theme/common.css';
44
}
5+
6+
.bar
7+
{
8+
composes: button from '@privateorg/theme/common.css';
9+
}

test/tokens/node_modules/@privateorg/theme/common.css

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)