fork-ts-checker-webpack-plugin 7.2.6 → 7.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
2
+
1
3
  <div align="center">
2
4
 
3
5
  <img alt="" width="300" src="./media/logo.svg" />
@@ -52,11 +54,10 @@ module.exports = {
52
54
  {
53
55
  test: /\.tsx?$/,
54
56
  loader: 'ts-loader',
55
- exclude: /node_modules/,
56
- options: {
57
- // disable type checker - we will use it in fork plugin
58
- transpileOnly: true
59
- }
57
+ // add transpileOnly option if you use ts-loader < 9.3.0
58
+ // options: {
59
+ // transpileOnly: true
60
+ // }
60
61
  }
61
62
  ]
62
63
  },
@@ -241,7 +242,8 @@ module.exports = {
241
242
  exclude: /node_modules/,
242
243
  options: {
243
244
  appendTsSuffixTo: [/\.vue$/],
244
- transpileOnly: true
245
+ // add transpileOnly option if you use ts-loader < 9.3.0
246
+ // transpileOnly: true
245
247
  }
246
248
  },
247
249
  {
@@ -332,19 +334,6 @@ module.exports = {
332
334
  };
333
335
  ```
334
336
 
335
- ## Typings
336
-
337
- To use the plugin typings, you have to install `@types/webpack`. It's not included by default to not collide with your
338
- existing typings (`@types/webpack` imports `@types/node`). [It's an old TypeScript issue](https://github.com/microsoft/TypeScript/issues/18588),
339
- the alternative is to set `skipLibCheck: true` in the `compilerOptions` 😉
340
- ```sh
341
- # with npm
342
- npm install --save-dev @types/webpack
343
-
344
- # with yarn
345
- yarn add --dev @types/webpack
346
- ```
347
-
348
337
  ## Profiling types resolution
349
338
 
350
339
  When using TypeScript 4.3.0 or newer you can profile long type checks by
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aggregateFilesChanges = exports.clearFilesChange = exports.updateFilesChange = exports.consumeFilesChange = exports.getFilesChange = void 0;
4
+ // we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
5
+ const IGNORED_FILES = ['package.json'];
6
+ const isIgnoredFile = (file) => IGNORED_FILES.some((ignoredFile) => file.endsWith(`/${ignoredFile}`) || file.endsWith(`\\${ignoredFile}`));
4
7
  const compilerFilesChangeMap = new WeakMap();
5
8
  function getFilesChange(compiler) {
6
- return compilerFilesChangeMap.get(compiler) || { changedFiles: [], deletedFiles: [] };
9
+ const { changedFiles = [], deletedFiles = [] } = compilerFilesChangeMap.get(compiler) || {
10
+ changedFiles: [],
11
+ deletedFiles: [],
12
+ };
13
+ return {
14
+ changedFiles: changedFiles.filter((changedFile) => !isIgnoredFile(changedFile)),
15
+ deletedFiles: deletedFiles.filter((deletedFile) => !isIgnoredFile(deletedFile)),
16
+ };
7
17
  }
8
18
  exports.getFilesChange = getFilesChange;
9
19
  function consumeFilesChange(compiler) {
package/lib/plugin.js CHANGED
@@ -70,7 +70,7 @@ exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
70
70
  /**
71
71
  * Current version of the plugin
72
72
  */
73
- ForkTsCheckerWebpackPlugin.version = '7.2.6'; // will be replaced by the @semantic-release/exec
73
+ ForkTsCheckerWebpackPlugin.version = '7.2.9'; // will be replaced by the @semantic-release/exec
74
74
  /**
75
75
  * Default pools for the plugin concurrency limit
76
76
  */
@@ -10,8 +10,6 @@ const minimatch_1 = __importDefault(require("minimatch"));
10
10
  const files_change_1 = require("../files-change");
11
11
  const infrastructure_logger_1 = require("../infrastructure-logger");
12
12
  const BUILTIN_IGNORED_DIRS = ['node_modules', '.git', '.yarn', '.pnp'];
13
- // we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
14
- const BUILTIN_IGNORED_FILES = ['package.json'];
15
13
  function createIsIgnored(ignored, excluded) {
16
14
  const ignoredPatterns = ignored ? (Array.isArray(ignored) ? ignored : [ignored]) : [];
17
15
  const ignoredFunctions = ignoredPatterns.map((pattern) => {
@@ -28,8 +26,7 @@ function createIsIgnored(ignored, excluded) {
28
26
  }
29
27
  });
30
28
  ignoredFunctions.push((path) => excluded.some((excludedPath) => path.startsWith(excludedPath)));
31
- ignoredFunctions.push((path) => BUILTIN_IGNORED_DIRS.some((ignoredDir) => path.includes(`/${ignoredDir}/`)));
32
- ignoredFunctions.push((path) => BUILTIN_IGNORED_FILES.some((ignoredFile) => path.endsWith(`/${ignoredFile}`)));
29
+ ignoredFunctions.push((path) => BUILTIN_IGNORED_DIRS.some((ignoredDir) => path.includes(`/${ignoredDir}/`) || path.includes(`\\${ignoredDir}\\`)));
33
30
  return function isIgnored(path) {
34
31
  return ignoredFunctions.some((ignoredFunction) => ignoredFunction(path));
35
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "7.2.6",
3
+ "version": "7.2.9",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "webpack",