From 3ebf9e7442205ef778da2589d51e4abab3a597bd Mon Sep 17 00:00:00 2001 From: JoostK Date: Sat, 30 Apr 2022 12:42:21 +0200 Subject: [PATCH] refactor(compiler-cli): improve error message formatting (#45827) Changes the message from: ``` The component 'HelloComponent' appears in 'imports', but is not standalone and cannot be imported directly It must be imported via an NgModule. ``` to ``` The component 'HelloComponent' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModule. ``` PR Close #45827 --- packages/compiler-cli/src/ngtsc/scope/src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/scope/src/util.ts b/packages/compiler-cli/src/ngtsc/scope/src/util.ts index 911cc0aba83..051e501bcca 100644 --- a/packages/compiler-cli/src/ngtsc/scope/src/util.ts +++ b/packages/compiler-cli/src/ngtsc/scope/src/util.ts @@ -31,7 +31,7 @@ export function makeNotStandaloneDiagnostic( let message = `The ${kind} '${ ref.node.name - .text}' appears in 'imports', but is not standalone and cannot be imported directly`; + .text}' appears in 'imports', but is not standalone and cannot be imported directly.`; let relatedInformation: ts.DiagnosticRelatedInformation[]|undefined = undefined; if (scope !== null && scope.kind === ComponentScopeKind.NgModule) { // The directive/pipe in question is declared in an NgModule. Check if it's also exported.