@@ -2,8 +2,9 @@ import { promises as fsPromises, readFileSync, statSync } from 'fs';
22import { createRequire } from 'module' ;
33import { extname , join } from 'path' ;
44import { cwd } from 'process' ;
5- import globby , { GlobbyOptions , sync as globbySync } from 'globby ' ;
5+ import { fileURLToPath } from 'url ' ;
66import { DocumentNode , parse } from 'graphql' ;
7+ import { GlobOptions , globSync , glob as tinyglobby } from 'tinyglobby' ;
78import unixify from 'unixify' ;
89
910const { readFile, stat } = fsPromises ;
@@ -63,8 +64,8 @@ async function isDirectory(path: string) {
6364 }
6465}
6566
66- function scanForFilesSync ( globStr : string | string [ ] , globOptions : GlobbyOptions = { } ) : string [ ] {
67- return globbySync ( globStr , { absolute : true , ...globOptions } ) ;
67+ function scanForFilesSync ( globStr : string | string [ ] , globOptions : GlobOptions = { } ) : string [ ] {
68+ return globSync ( globStr , { absolute : true , ...globOptions } ) ;
6869}
6970
7071function formatExtension ( extension : string ) : string {
@@ -98,8 +99,8 @@ export interface LoadFilesOptions {
9899 useRequire ?: boolean ;
99100 // An alternative to `require` to use if `require` would be used to load a file
100101 requireMethod ?: any ;
101- // Additional options to pass to globby
102- globOptions ?: GlobbyOptions ;
102+ // Additional options to pass to tinyglobby
103+ globOptions ?: GlobOptions ;
103104 // Named exports to extract from each file. Defaults to ['typeDefs', 'schema']
104105 exportNames ?: string [ ] ;
105106 // Load files from nested directories. Set to `false` to only search the top-level directory.
@@ -183,9 +184,9 @@ export function loadFilesSync<T = any>(
183184
184185async function scanForFiles (
185186 globStr : string | string [ ] ,
186- globOptions : GlobbyOptions = { } ,
187+ globOptions : GlobOptions = { } ,
187188) : Promise < string [ ] > {
188- return globby ( globStr , { absolute : true , ...globOptions } ) ;
189+ return tinyglobby ( globStr , { absolute : true , ...globOptions } ) ;
189190}
190191
191192const checkExtension = (
0 commit comments