fork-ts-checker-notifier-webpack-plugin
fork-ts-checker-notifier-webpack-plugin copied to clipboard
Update plugin to support fork-ts-checker@5
Currently, this plugin failed on fork-ts-checker-webpack-plugin@5
with error:
Error: Error: TypeError: Cannot read property 'tap' of undefined
v5 is pretty new; I think it shipped only yesterday.
If you'd like to submit a PR to make this v5 compatible that'd be greatly appreciated!
You may want to use the v5 PR for reference: https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/pull/445
Looking at the plugin I think the hooks have changed. Probably we need to hook into issues
now in place of receive
here: https://github.com/johnnyreilly/fork-ts-checker-notifier-webpack-plugin/blob/master/index.ts#L107
Based upon the docs here:
https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/master/README.md#plugin-hooks
See also: https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/232#issuecomment-645543747
node.js: v14.4.0 npm: v6.14.5 webpack: v4.43.0 fork-ts-checker-webpack-plugin: v5.0.1 fork-ts-checker-notifier-webpack-plugin: v2.0.0 Windows 10 professional edition 1902 18363.900
(node:4280) UnhandledPromiseRejectionWarning: TypeError: lints is not iterable
at ForkTsCheckerNotifierWebpackPlugin.compilationDone (G:\WebStormWS\WebProTpl\node_modules\fork-ts-checker-notifier-webpack-plugin\index.js:10:75)
at SyncWaterfallHook.eval [as call] (eval at create (G:\WebStormWS\WebProTpl\node_modules\tapable\lib\HookCodeFactory.js:19:10), node --trace-warnings ...
to show where the warning was created)
(node:4280) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4280) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ForkTsCheckerWebpackPlugin_obj = {
async: true,
typescript: {
enabled: true,
memoryLimit: 4096,
configFile: path.resolve( __dirname, './tsconfig.json' ),
build: false,
mode: 'write-tsbuildinfo',
diagnosticsOptions: {
syntactic: true,
semantic: true,
declaration: true,
global: true,
},
extensions: {
vue: {
enabled: true,
compiler: 'vue-template-compiler',
},
},
profile: false,
},
eslint: undefined,
issue: {
include: undefined,
exclude: undefined,
scope: 'all',
},
logger: {
infrastructure: 'silent',
issues: 'console',
},
},
ForkTsCheckerNotifierWebpackPlugin_obj = {
title: 'WebpackNotice2020',
excludeWarnings: true,
alwaysNotify: false,
skipFirstNotification: true,
skipSuccessful: true,
},