Skip to content

Commit 14ae30d

Browse files
fix: avoiding mrmlnc/fast-glob#158 (#209)
* Avoiding mrmlnc/fast-glob#158 * Fixed the linter issues * chore: converted CRLF line endings to LF * Regenerated the lock file * chore: update lock file Co-authored-by: Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>
1 parent 61df3ab commit 14ae30d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/utils.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
import { join } from 'path';
1+
// import { join } from 'path';
22

33
import arrify from 'arrify';
44

5+
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
6+
57
export function parseFiles(files, context) {
6-
return arrify(files).map((file) =>
7-
replaceBackslashes(join(context, '/', file))
8+
return arrify(files).map(
9+
(file) =>
10+
`${replaceBackslashes(context).replace(
11+
UNESCAPED_GLOB_SYMBOLS_RE,
12+
'\\$2'
13+
)}/${replaceBackslashes(file)}`
814
);
915
}
1016

0 commit comments

Comments
 (0)