-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: drop support for webpack 4 (#638)
BREAKING CHANGE: 🧨 Webpack 4 is no longer supported. Please upgrade to Webpack ^5.11.0 or use an older version of the plugin.
- Loading branch information
1 parent
3e23b88
commit cdb531f
Showing
36 changed files
with
737 additions
and
1,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,20 @@ | ||
import { EventEmitter } from 'events'; | ||
|
||
interface WatchFileSystemOptions { | ||
aggregateTimeout: number; | ||
poll: boolean; | ||
followSymlinks: boolean; | ||
ignored: string | RegExp | Function | (string | RegExp | Function)[]; | ||
} | ||
import webpack from 'webpack'; | ||
|
||
// watchpack v1 and v2 internal interface | ||
interface Watchpack extends EventEmitter { | ||
_onChange(item: string, mtime: number, file: string, type?: string): void; | ||
_onRemove(item: string, file: string, type?: string): void; | ||
} | ||
|
||
// webpack 4 interface | ||
interface WatcherV4 { | ||
close(): void; | ||
pause(): void; | ||
getFileTimestamps(): Map<string, number>; | ||
getContextTimestamps(): Map<string, number>; | ||
} | ||
|
||
// webpack 5 interface | ||
interface WatcherV5 { | ||
close(): void; | ||
pause(): void; | ||
getFileTimeInfoEntries(): Map<string, number>; | ||
getContextTimeInfoEntries(): Map<string, number>; | ||
} | ||
|
||
type Watcher = WatcherV4 | WatcherV5; | ||
type Watch = webpack.Compiler['watchFileSystem']['watch']; | ||
|
||
interface WatchFileSystem { | ||
watcher: Watchpack; | ||
wfs?: { | ||
watcher: Watchpack; | ||
}; | ||
watch( | ||
files: Iterable<string>, | ||
dirs: Iterable<string>, | ||
missing: Iterable<string>, | ||
startTime?: number, | ||
options?: Partial<WatchFileSystemOptions>, | ||
callback?: Function, | ||
callbackUndelayed?: Function | ||
): Watcher; | ||
watch: Watch; | ||
} | ||
|
||
export { WatchFileSystem, WatchFileSystemOptions, Watchpack, WatcherV4, WatcherV5, Watcher }; | ||
export { WatchFileSystem, Watchpack }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.