Skip to content

Commit ec39a75

Browse files
filipesilvahansl
authored andcommitted
fix(@ngtools/webpack): update formatDiagnostics call
Followup to angular/angular#19748, angular/angular#19804 Fix #8101
1 parent 46530b9 commit ec39a75

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/@ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,12 +760,12 @@ export class AngularCompilerPlugin implements Tapable {
760760
.filter((diag) => diag.category === ts.DiagnosticCategory.Warning);
761761

762762
if (errors.length > 0) {
763-
const message = formatDiagnostics(this._angularCompilerOptions, errors);
763+
const message = formatDiagnostics(errors);
764764
this._compilation.errors.push(message);
765765
}
766766

767767
if (warnings.length > 0) {
768-
const message = formatDiagnostics(this._angularCompilerOptions, warnings);
768+
const message = formatDiagnostics(warnings);
769769
this._compilation.warnings.push(message);
770770
}
771771

packages/@ngtools/webpack/src/ngtools_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export interface CreateCompilerHostInterface {
102102
}): CompilerHost;
103103
}
104104
export interface FormatDiagnosticsInterface {
105-
(options: CompilerOptions, diags: Diagnostics): string;
105+
(diags: Diagnostics): string;
106106
}
107107

108108
// Manually check for Compiler CLI availability and supported version.

packages/@ngtools/webpack/src/type_checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ class TypeChecker {
145145
const warnings = allDiagnostics.filter((d) => d.category === ts.DiagnosticCategory.Warning);
146146

147147
if (errors.length > 0) {
148-
const message = formatDiagnostics(this._angularCompilerOptions, errors);
148+
const message = formatDiagnostics(errors);
149149
console.error(bold(red('ERROR in ' + message)));
150150
}
151151

152152
if (warnings.length > 0) {
153-
const message = formatDiagnostics(this._angularCompilerOptions, warnings);
153+
const message = formatDiagnostics(warnings);
154154
console.log(bold(yellow('WARNING in ' + message)));
155155
}
156156
}

0 commit comments

Comments
 (0)