@@ -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
6060 constructor (
6161 app : AppLinkedInterface ,
@@ -260,14 +260,14 @@ export class FileWatcher {
260260 }
261261
262262 // Creates an "Ignore" instance for the given path if a .gitignore file exists, otherwise undefined
263- private createIgnoreInstance ( path : string ) : ignore . Ignore | undefined {
263+ private createIgnoreInstance ( path : string ) : Ignore | undefined {
264264 const gitIgnorePath = joinPath ( path , '.gitignore' )
265265 if ( ! fileExistsSync ( gitIgnorePath ) ) return undefined
266266 const gitIgnoreContent = readFileSync ( gitIgnorePath )
267267 . toString ( )
268268 . split ( '\n' )
269269 . map ( ( pattern ) => pattern . trim ( ) )
270270 . filter ( ( pattern ) => pattern !== '' && ! pattern . startsWith ( '#' ) )
271- return ignore . default ( ) . add ( gitIgnoreContent )
271+ return ignore ( ) . add ( gitIgnoreContent )
272272 }
273273}
0 commit comments