update 优化 升级框架依赖

This commit is contained in:
疯狂的狮子Li
2026-05-20 14:29:08 +08:00
parent a9b2d7745d
commit 04ed7bf7a7
19 changed files with 64 additions and 59 deletions
+3 -3
View File
@@ -6,10 +6,10 @@
*/
export function isPathMatch(pattern: string, path: string) {
const regexPattern = pattern
.replace(/([.+^${}()|\[\]\\])/g, '\\$1')
.replace(/([.+^${}()|[\]\\])/g, '\\$1')
.replace(/\*\*/g, '__DOUBLE_STAR__')
.replace(/\*/g, '[^\\/]*')
.replace(/\?/g, '[^\\/]')
.replace(/\*/g, '[^/]*')
.replace(/\?/g, '[^/]')
.replace(/__DOUBLE_STAR__/g, '.*');
const regex = new RegExp(`^${regexPattern}$`);
return regex.test(path);