Skip to content

Commit

Permalink
fix: avoiding mrmlnc/fast-glob#158 (#209)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
tmcdos and ricardogobbosouza authored May 3, 2020
1 parent 61df3ab commit 14ae30d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { join } from 'path';
// import { join } from 'path';

import arrify from 'arrify';

const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;

export function parseFiles(files, context) {
return arrify(files).map((file) =>
replaceBackslashes(join(context, '/', file))
return arrify(files).map(
(file) =>
`${replaceBackslashes(context).replace(
UNESCAPED_GLOB_SYMBOLS_RE,
'\\$2'
)}/${replaceBackslashes(file)}`
);
}

Expand Down

0 comments on commit 14ae30d

Please sign in to comment.