Skip to content

Commit fdfd710

Browse files
committed
fix: support file which named '....'
1 parent 7cc95d2 commit fdfd710

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const REGEX_SPLITALL_CRLF = /\r?\n/g
1717
// ../foo,
1818
// .
1919
// ..
20-
const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/
20+
21+
const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/
2122

2223
const SLASH = '/'
2324
const KEY_IGNORE = typeof Symbol !== 'undefined'

test/others.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ const IGNORE_TEST_CASES = [
188188
['*.js', '!a/a.js'],
189189
'a/a.js',
190190
[false, true]
191+
],
192+
[
193+
`test: file which named '...'`,
194+
'foo',
195+
'...',
196+
[false, false]
191197
]
192198
]
193199

0 commit comments

Comments
 (0)