ts-checker-rspack-plugin 1.2.4 → 1.2.6

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.
@@ -956,7 +956,9 @@ function createWatchCompilerHost(parsedConfig, createProgram, reportDiagnostic,
956
956
  afterProgramCreate (program) {
957
957
  if (afterProgramCreate) afterProgramCreate(program);
958
958
  },
959
- onWatchStatusChange () {},
959
+ onWatchStatusChange (...args) {
960
+ if (reportWatchStatus) reportWatchStatus(...args);
961
+ },
960
962
  watchFile: system.watchFile,
961
963
  watchDirectory: system.watchDirectory,
962
964
  setTimeout: system.setTimeout,
@@ -1011,6 +1013,7 @@ function createWatchSolutionBuilderHost(parsedConfig, createProgram, reportDiagn
1011
1013
  let solutionBuilderHost;
1012
1014
  let solutionBuilder;
1013
1015
  let hostDiagnostics = [];
1016
+ const HOST_DIAGNOSTICS_KEY = `GLOBAL_${worker_config_config.configFile}`;
1014
1017
  function useSolutionBuilder() {
1015
1018
  if (!solutionBuilderHost) {
1016
1019
  const parsedConfig = getParsedConfig();
@@ -1019,14 +1022,14 @@ function useSolutionBuilder() {
1019
1022
  return typescript.createSemanticDiagnosticsBuilderProgram(rootNames, compilerOptions, host, oldProgram, configFileParsingDiagnostics, projectReferences);
1020
1023
  }, (diagnostic)=>{
1021
1024
  hostDiagnostics.push(diagnostic);
1022
- updateDiagnostics(worker_config_config.configFile, hostDiagnostics);
1023
- }, void 0, void 0, void 0, (builderProgram)=>{
1024
- const programConfigFile = getConfigFilePathFromBuilderProgram(builderProgram);
1025
- const programDiagnostics = getDiagnosticsOfProgram(builderProgram);
1026
- updateDiagnostics(programConfigFile, programConfigFile === worker_config_config.configFile ? [
1027
- ...programDiagnostics,
1028
- ...hostDiagnostics
1029
- ] : programDiagnostics);
1025
+ updateDiagnostics(HOST_DIAGNOSTICS_KEY, hostDiagnostics);
1026
+ }, (diagnostic)=>{
1027
+ if (6031 === diagnostic.code || 6032 === diagnostic.code) {
1028
+ hostDiagnostics = [];
1029
+ updateDiagnostics(HOST_DIAGNOSTICS_KEY, hostDiagnostics);
1030
+ }
1031
+ }, void 0, void 0, (builderProgram)=>{
1032
+ updateDiagnostics(getConfigFilePathFromBuilderProgram(builderProgram), getDiagnosticsOfProgram(builderProgram));
1030
1033
  emitTsBuildInfoIfNeeded(builderProgram);
1031
1034
  stopTracingIfNeeded(builderProgram);
1032
1035
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-checker-rspack-plugin",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "rspack",