File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 3333 "unstorage" : " node jiti src/cli.ts"
3434 },
3535 "dependencies" : {
36- "anymatch" : " ^3.1.3" ,
3736 "destr" : " ^2.0.5" ,
3837 "node-fetch-native" : " ^1.6.7" ,
3938 "ofetch" : " ^1.4.1" ,
Original file line number Diff line number Diff line change 11import { existsSync , promises as fsp , Stats } from "node:fs" ;
2- import { resolve , relative , join } from "node:path" ;
2+ import { resolve , relative , join , matchesGlob } from "node:path" ;
33import type { FSWatcher , ChokidarOptions } from "chokidar" ;
4- import anymatch from "anymatch" ;
54import {
65 createError ,
76 createRequiredError ,
@@ -33,9 +32,14 @@ export default defineDriver((userOptions: FSStorageOptions = {}) => {
3332 }
3433
3534 const base = resolve ( userOptions . base ) ;
36- const ignore = ( anymatch as any ) (
37- userOptions . ignore || [ "**/node_modules/**" , "**/.git/**" ]
38- ) ;
35+
36+ const ignorePatterns = userOptions . ignore || [
37+ "**/node_modules/**" ,
38+ "**/.git/**" ,
39+ ] ;
40+ const ignore = ( path : string ) => {
41+ return ignorePatterns . some ( ( pattern ) => matchesGlob ( path , pattern ) ) ;
42+ } ;
3943
4044 const r = ( key : string ) => {
4145 if ( PATH_TRAVERSE_RE . test ( key ) ) {
You can’t perform that action at this time.
0 commit comments