@@ -8,7 +8,7 @@ import {AbortSignal} from '@shopify/cli-kit/node/abort'
88import { startHRTime , StartTime } from '@shopify/cli-kit/node/hrtime'
99import { fileExistsSync , matchGlob , readFileSync } from '@shopify/cli-kit/node/fs'
1010import { debounce } from '@shopify/cli-kit/common/function'
11- import ignore from 'ignore'
11+ import ignore , { Ignore } from 'ignore'
1212import { Writable } from 'stream'
1313
1414const DEFAULT_DEBOUNCE_TIME_IN_MS = 200
@@ -55,7 +55,7 @@ export class FileWatcher {
5555 private onChangeCallback ?: ( events : WatcherEvent [ ] ) => void
5656 private watcher ?: FSWatcher
5757 private readonly debouncedEmit : ( ) => void
58- private readonly ignored : { [ key : string ] : ignore . Ignore | undefined } = { }
58+ private readonly ignored : { [ key : string ] : Ignore | undefined } = { }
5959 // Map of file paths to the extensions that watch them
6060 private readonly extensionWatchedFiles = new Map < string , Set < string > > ( )
6161
@@ -316,14 +316,14 @@ export class FileWatcher {
316316 }
317317
318318 // Creates an "Ignore" instance for the given path if a .gitignore file exists, otherwise undefined
319- private createIgnoreInstance ( path : string ) : ignore . Ignore | undefined {
319+ private createIgnoreInstance ( path : string ) : Ignore | undefined {
320320 const gitIgnorePath = joinPath ( path , '.gitignore' )
321321 if ( ! fileExistsSync ( gitIgnorePath ) ) return undefined
322322 const gitIgnoreContent = readFileSync ( gitIgnorePath )
323323 . toString ( )
324324 . split ( '\n' )
325325 . map ( ( pattern ) => pattern . trim ( ) )
326326 . filter ( ( pattern ) => pattern !== '' && ! pattern . startsWith ( '#' ) )
327- return ignore . default ( ) . add ( gitIgnoreContent )
327+ return ignore ( ) . add ( gitIgnoreContent )
328328 }
329329}
0 commit comments