fork-ts-checker-webpack-plugin 6.5.1 → 6.5.3

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.
@@ -76,7 +76,7 @@ exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
76
76
  /**
77
77
  * Current version of the plugin
78
78
  */
79
- ForkTsCheckerWebpackPlugin.version = '6.5.1'; // will be replaced by the @semantic-release/exec
79
+ ForkTsCheckerWebpackPlugin.version = '6.5.3'; // will be replaced by the @semantic-release/exec
80
80
  /**
81
81
  * Default pools for the plugin concurrency limit
82
82
  */
@@ -5,9 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const substract_1 = __importDefault(require("../utils/array/substract"));
7
7
  const unique_1 = __importDefault(require("../utils/array/unique"));
8
+ // we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
9
+ const IGNORED_FILES = ['package.json'];
10
+ const isIgnoredFile = (file) => IGNORED_FILES.some((ignoredFile) => file.endsWith(`/${ignoredFile}`) || file.endsWith(`\\${ignoredFile}`));
8
11
  const compilerFilesChangeMap = new WeakMap();
9
12
  function getFilesChange(compiler) {
10
- return compilerFilesChangeMap.get(compiler) || {};
13
+ const { changedFiles = [], deletedFiles = [] } = compilerFilesChangeMap.get(compiler) || {
14
+ changedFiles: [],
15
+ deletedFiles: [],
16
+ };
17
+ return {
18
+ changedFiles: changedFiles.filter((changedFile) => !isIgnoredFile(changedFile)),
19
+ deletedFiles: deletedFiles.filter((deletedFile) => !isIgnoredFile(deletedFile)),
20
+ };
11
21
  }
12
22
  exports.getFilesChange = getFilesChange;
13
23
  function updateFilesChange(compiler, change) {
@@ -1,10 +1,9 @@
1
1
  import type * as ts from 'typescript';
2
2
  import { Performance } from '../../profile/Performance';
3
3
  interface TypeScriptPerformance {
4
- enable(): void;
5
- disable(): void;
6
- mark(name: string): void;
7
- measure(name: string, startMark?: string, endMark?: string): void;
4
+ enable?(): void;
5
+ disable?(): void;
6
+ forEachMeasure?(callback: (measureName: string, duration: number) => void): void;
8
7
  }
9
8
  declare function connectTypeScriptPerformance(typescript: typeof ts, performance: Performance): Performance;
10
9
  export { TypeScriptPerformance, connectTypeScriptPerformance };
@@ -7,23 +7,16 @@ function getTypeScriptPerformance(typescript) {
7
7
  function connectTypeScriptPerformance(typescript, performance) {
8
8
  const typeScriptPerformance = getTypeScriptPerformance(typescript);
9
9
  if (typeScriptPerformance) {
10
- const { mark, measure } = typeScriptPerformance;
11
10
  const { enable, disable } = performance;
12
- typeScriptPerformance.mark = (name) => {
13
- mark(name);
14
- performance.mark(name);
15
- };
16
- typeScriptPerformance.measure = (name, startMark, endMark) => {
17
- measure(name, startMark, endMark);
18
- performance.measure(name, startMark, endMark);
19
- };
20
11
  return Object.assign(Object.assign({}, performance), { enable() {
12
+ var _a;
21
13
  enable();
22
- typeScriptPerformance.enable();
14
+ (_a = typeScriptPerformance.enable) === null || _a === void 0 ? void 0 : _a.call(typeScriptPerformance);
23
15
  },
24
16
  disable() {
17
+ var _a;
25
18
  disable();
26
- typeScriptPerformance.disable();
19
+ (_a = typeScriptPerformance.disable) === null || _a === void 0 ? void 0 : _a.call(typeScriptPerformance);
27
20
  } });
28
21
  }
29
22
  else {
@@ -8,8 +8,6 @@ const path_1 = require("path");
8
8
  const reporter_1 = require("../reporter");
9
9
  const minimatch_1 = __importDefault(require("minimatch"));
10
10
  const BUILTIN_IGNORED_DIRS = ['node_modules', '.git', '.yarn', '.pnp'];
11
- // we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
12
- const BUILTIN_IGNORED_FILES = ['package.json'];
13
11
  function createIsIgnored(ignored, excluded) {
14
12
  const ignoredPatterns = ignored ? (Array.isArray(ignored) ? ignored : [ignored]) : [];
15
13
  const ignoredFunctions = ignoredPatterns.map((pattern) => {
@@ -29,8 +27,7 @@ function createIsIgnored(ignored, excluded) {
29
27
  }
30
28
  });
31
29
  ignoredFunctions.push((path) => excluded.some((excludedPath) => path.startsWith(excludedPath)));
32
- ignoredFunctions.push((path) => BUILTIN_IGNORED_DIRS.some((ignoredDir) => path.includes(`/${ignoredDir}/`)));
33
- ignoredFunctions.push((path) => BUILTIN_IGNORED_FILES.some((ignoredFile) => path.endsWith(`/${ignoredFile}`)));
30
+ ignoredFunctions.push((path) => BUILTIN_IGNORED_DIRS.some((ignoredDir) => path.includes(`/${ignoredDir}/`) || path.includes(`\\${ignoredDir}\\`)));
34
31
  return function isIgnored(path) {
35
32
  return ignoredFunctions.some((ignoredFunction) => ignoredFunction(path));
36
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "6.5.1",
3
+ "version": "6.5.3",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "fast",