From 8f3c1c193a3fea5d54ff7e476239479ab313db59 Mon Sep 17 00:00:00 2001 From: MeAkib Date: Mon, 19 Oct 2026 14:54:27 +0600 Subject: [PATCH] fix(@angular/build): correct typos and spacing in error and warning messages Several messages printed by the CLI contained typos or ran two sentences together: - The application builder named the option `"app-shell"` in its errors about `server` and `index`, but the option is `appShell`. - The `emitDecoratorMetadata` note printed "by Angularand" and "explictly". - The unit-test Karma `--filter` warning printed "expression.Leading". - The `provideServerRendering()` configuration error printed "provideServerRendering().The". - `ng config` reported "Confguration file cannot be found.". - `ng update` reported "registry package identifer". Add the missing spaces, fix the spelling and use the actual option name. --- packages/angular/build/src/builders/application/options.ts | 4 ++-- .../build/src/builders/unit-test/runners/karma/executor.ts | 2 +- .../src/tools/angular/compilation/compiler-options.ts | 4 ++-- packages/angular/cli/src/commands/config/cli.ts | 2 +- packages/angular/cli/src/commands/update/cli.ts | 2 +- packages/angular/ssr/src/routes/route-config.ts | 7 ++----- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/angular/build/src/builders/application/options.ts b/packages/angular/build/src/builders/application/options.ts index 0e225be24045..756676c8d290 100644 --- a/packages/angular/build/src/builders/application/options.ts +++ b/packages/angular/build/src/builders/application/options.ts @@ -415,13 +415,13 @@ export async function normalizeOptions( if (appShellOptions || ssrOptions || prerenderOptions) { if (!serverEntryPoint) { throw new Error( - 'The "server" option is required when enabling "ssr", "prerender" or "app-shell".', + 'The "server" option is required when enabling "ssr", "prerender" or "appShell".', ); } if (!indexHtmlOptions) { throw new Error( - 'The "index" option cannot be set to false when enabling "ssr", "prerender" or "app-shell".', + 'The "index" option cannot be set to false when enabling "ssr", "prerender" or "appShell".', ); } } diff --git a/packages/angular/build/src/builders/unit-test/runners/karma/executor.ts b/packages/angular/build/src/builders/unit-test/runners/karma/executor.ts index e558a3a1f3a7..4b06e6f7b81a 100644 --- a/packages/angular/build/src/builders/unit-test/runners/karma/executor.ts +++ b/packages/angular/build/src/builders/unit-test/runners/karma/executor.ts @@ -116,7 +116,7 @@ export class KarmaExecutor implements TestExecutor { let filter = unitTestOptions.filter; if (filter[0] === '/' && filter.at(-1) === '/') { this.context.logger.warn( - 'The `--filter` option is always a regular expression.' + + 'The `--filter` option is always a regular expression. ' + 'Leading and trailing `/` are not required and will be ignored.', ); } else { diff --git a/packages/angular/build/src/tools/angular/compilation/compiler-options.ts b/packages/angular/build/src/tools/angular/compilation/compiler-options.ts index 77bfdfde2f90..38d1a7676aa4 100644 --- a/packages/angular/build/src/tools/angular/compilation/compiler-options.ts +++ b/packages/angular/build/src/tools/angular/compilation/compiler-options.ts @@ -105,8 +105,8 @@ export function transformCompilerOptions( notes: [ { text: - `The 'emitDecoratorMetadata' option is not required by Angular` + - 'and can be removed if not explictly required by the project.', + `The 'emitDecoratorMetadata' option is not required by Angular ` + + 'and can be removed if not explicitly required by the project.', }, ], }); diff --git a/packages/angular/cli/src/commands/config/cli.ts b/packages/angular/cli/src/commands/config/cli.ts index ef7cfd95d5a5..b721d330f741 100644 --- a/packages/angular/cli/src/commands/config/cli.ts +++ b/packages/angular/cli/src/commands/config/cli.ts @@ -101,7 +101,7 @@ export default class ConfigCommandModule const { logger } = this.context; if (!config || !configPath) { - throw new CommandModuleError('Confguration file cannot be found.'); + throw new CommandModuleError('Configuration file cannot be found.'); } const normalizeUUIDValue = (v: string | undefined) => (v === '' ? randomUUID() : `${v}`); diff --git a/packages/angular/cli/src/commands/update/cli.ts b/packages/angular/cli/src/commands/update/cli.ts index fd0eeca166a3..77bfdb297f28 100644 --- a/packages/angular/cli/src/commands/update/cli.ts +++ b/packages/angular/cli/src/commands/update/cli.ts @@ -197,7 +197,7 @@ export default class UpdateCommandModule extends CommandModule