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

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.
@@ -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.7'; // 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.7",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "webpack",