Skip to content

Commit

Permalink
Merge pull request #65 from johnnyreilly/fork-ts-checker-notifier-web…
Browse files Browse the repository at this point in the history
…pack-plugin-v9

Update fork-ts-checker-webpack-plugin to v9
  • Loading branch information
TrevorSayre authored Dec 19, 2023
2 parents 5ffc377 + b37ffa8 commit d30ef42
Show file tree
Hide file tree
Showing 10 changed files with 745 additions and 613 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ module.exports = {
files: ['**/*.ts'],
plugins: ['@typescript-eslint'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
rules: {
'@typescript-eslint/restrict-template-expressions': 'off',
},
},
],
ignorePatterns: ['index.js', 'index.d.ts'],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: install node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16

- name: upgrade yarn
run: npm install yarn -g
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: install node
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
registry-url: https://registry.npmjs.org/

- name: upgrade yarn
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
node_js:
- '14'
- '16'
- '18'
- '20'
install:
- yarn install
- yarn build
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v8.0.0

- [Update to support `fork-ts-checker-webpack-plugin` v9](https://github.com/johnnyreilly/fork-ts-checker-notifier-webpack-plugin/pull/65)

**BREAKING CHANGES**

This drops support for `fork-ts-checker-webpack-plugin` versions < 9 and `node` versions < 16 - if you need to use v8 then please use <https://www.npmjs.com/package/fork-ts-checker-notifier-webpack-plugin/v/7.0.0>

## v7.0.0

- [Update to support `fork-ts-checker-webpack-plugin` v8](https://github.com/johnnyreilly/fork-ts-checker-notifier-webpack-plugin/pull/64)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14
FROM node:16

WORKDIR /fork-ts-checker-notifier-webpack-plugin

Expand Down
2 changes: 1 addition & 1 deletion index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('buildNotification', () => {

expect(returnValue.title).toBe('Type check succeeded');
expect(returnValue.message).toBe(
'No type errors! See warning(s) in console!'
'No type errors! See warning(s) in console!',
);
expect(returnValue.icon.endsWith('built.png')).toBe(true);
expect(plugin.lastBuildSucceeded).toBe(true);
Expand Down
10 changes: 5 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ForkTsCheckerNotifierWebpackPlugin {
titlePrefix: string;

constructor(options?: Options) {
this.options = options || {};
this.options = options ?? {};
this.lastBuildSucceeded = false;
this.isFirstBuild = true;
this.titlePrefix = this.options.title ? this.options.title + ' - ' : '';
Expand All @@ -50,7 +50,7 @@ class ForkTsCheckerNotifierWebpackPlugin {
title: util.format(
'%s%s',
this.titlePrefix,
'Error in ' + path.basename(firstError.file || '')
'Error in ' + path.basename(firstError.file ?? ''),
),
message: firstError.message,
icon: path.join(__dirname, 'images/error.png'),
Expand All @@ -64,7 +64,7 @@ class ForkTsCheckerNotifierWebpackPlugin {
title: util.format(
'%s%s',
this.titlePrefix,
'Warning in ' + path.basename(firstWarning.file || '')
'Warning in ' + path.basename(firstWarning.file ?? ''),
),
message: firstWarning.message,
icon: path.join(__dirname, 'images/warning.png'),
Expand All @@ -82,7 +82,7 @@ class ForkTsCheckerNotifierWebpackPlugin {
message: util.format(
'%s%s',
'No type errors!',
firstWarning ? ' See warning(s) in console!' : ''
firstWarning ? ' See warning(s) in console!' : '',
),
icon: path.join(__dirname, 'images/built.png'),
};
Expand All @@ -104,7 +104,7 @@ class ForkTsCheckerNotifierWebpackPlugin {
.getCompilerHooks(compiler)
.issues.tap(
'fork-ts-checker-notifier-webpack-plugin',
this.compilationDone
this.compilationDone,
);
} catch (error) {
console.error(`
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"notifier"
],
"engines": {
"node": ">=14"
"node": ">=16"
},
"author": "John Reilly <johnny_reilly@hotmail.com>",
"license": "MIT",
Expand All @@ -32,20 +32,20 @@
"node-notifier": "^10.0.1"
},
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^18.16.0",
"@types/node-notifier": "^8.0.2",
"@types/tapable": "^2.2.3",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",
"webpack": "^5.80.0"
"@types/jest": "^29.5.11",
"@types/node": "^20.10.5",
"@types/node-notifier": "^8.0.5",
"@types/tapable": "^2.2.7",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"jest": "^29.7.0",
"prettier": "^3.1.1",
"ts-jest": "^29.1.1",
"typescript": "^5.3.3",
"webpack": "^5.89.0"
},
"peerDependencies": {
"fork-ts-checker-webpack-plugin": "^8.0.0"
Expand Down
Loading

0 comments on commit d30ef42

Please sign in to comment.