Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao committed Jan 21, 2023
1 parent 86901e6 commit 2ea165f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils.ts
Expand Up @@ -52,9 +52,12 @@ export function toLooseGlob(glob: string): string | string[] {
if (glob.endsWith('*')) {
// foo* -> [foo*, foo*/**/*]
// foo*.js -> [foo*.js, foo*/**/*.js]
// foo*bar.js -> [foo*bar.js, foo*/**/bar.js]
// foo*bar.js -> [foo*bar.js, foo*/**/*bar.js]
// foo*/bar.js -> [foo*/bar.js, foo*/**/bar.js]
return [glob + tail, glob + '/**' + (tail.startsWith('/') ? tail : '/*' + tail)] // 🚨 No strict
return [
glob + tail, // original
glob + '/**' + (tail.startsWith('/') ? tail : '/*' + tail), // 🚨 not strict
]
}

return glob + tail
Expand Down

0 comments on commit 2ea165f

Please sign in to comment.