Skip to content

Commit 0dc1037

Browse files
MeAkibclydin
authored andcommitted
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. (cherry picked from commit 13a7346)
1 parent 6053771 commit 0dc1037

6 files changed

Lines changed: 9 additions & 12 deletions

File tree

‎packages/angular/build/src/builders/application/options.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,13 @@ export async function normalizeOptions(
411411
if (appShellOptions || ssrOptions || prerenderOptions) {
412412
if (!serverEntryPoint) {
413413
throw new Error(
414-
'The "server" option is required when enabling "ssr", "prerender" or "app-shell".',
414+
'The "server" option is required when enabling "ssr", "prerender" or "appShell".',
415415
);
416416
}
417417

418418
if (!indexHtmlOptions) {
419419
throw new Error(
420-
'The "index" option cannot be set to false when enabling "ssr", "prerender" or "app-shell".',
420+
'The "index" option cannot be set to false when enabling "ssr", "prerender" or "appShell".',
421421
);
422422
}
423423
}

‎packages/angular/build/src/builders/unit-test/runners/karma/executor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class KarmaExecutor implements TestExecutor {
116116
let filter = unitTestOptions.filter;
117117
if (filter[0] === '/' && filter.at(-1) === '/') {
118118
this.context.logger.warn(
119-
'The `--filter` option is always a regular expression.' +
119+
'The `--filter` option is always a regular expression. ' +
120120
'Leading and trailing `/` are not required and will be ignored.',
121121
);
122122
} else {

‎packages/angular/build/src/tools/angular/compilation/compiler-options.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ export function transformCompilerOptions(
9696
notes: [
9797
{
9898
text:
99-
`The 'emitDecoratorMetadata' option is not required by Angular` +
100-
'and can be removed if not explictly required by the project.',
99+
`The 'emitDecoratorMetadata' option is not required by Angular ` +
100+
'and can be removed if not explicitly required by the project.',
101101
},
102102
],
103103
});

‎packages/angular/cli/src/commands/config/cli.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default class ConfigCommandModule
101101
const { logger } = this.context;
102102

103103
if (!config || !configPath) {
104-
throw new CommandModuleError('Confguration file cannot be found.');
104+
throw new CommandModuleError('Configuration file cannot be found.');
105105
}
106106

107107
const normalizeUUIDValue = (v: string | undefined) => (v === '' ? randomUUID() : `${v}`);

‎packages/angular/cli/src/commands/update/cli.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
196196

197197
// only registry identifiers are supported
198198
if (!packageIdentifier.registry) {
199-
logger.error(`Package '${request}' is not a registry package identifer.`);
199+
logger.error(`Package '${request}' is not a registry package identifier.`);
200200

201201
return 1;
202202
}

‎packages/angular/ssr/src/routes/route-config.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,7 @@ export interface ServerRouteServer extends ServerRouteCommon {
192192
* @see {@link withRoutes}
193193
*/
194194
export type ServerRoute =
195-
| ServerRouteClient
196-
| ServerRoutePrerender
197-
| ServerRoutePrerenderWithParams
198-
| ServerRouteServer;
195+
ServerRouteClient | ServerRoutePrerender | ServerRoutePrerenderWithParams | ServerRouteServer;
199196

200197
/**
201198
* Configuration value for server routes configuration.
@@ -464,7 +461,7 @@ export function provideServerRendering(
464461

465462
if (!hasServerRoutes && hasAppShell) {
466463
throw new Error(
467-
`Configuration error: found 'withAppShell()' without 'withRoutes()' in the same call to 'provideServerRendering()'.` +
464+
`Configuration error: found 'withAppShell()' without 'withRoutes()' in the same call to 'provideServerRendering()'. ` +
468465
`The 'withAppShell()' function requires 'withRoutes()' to be used.`,
469466
);
470467
}

0 commit comments

Comments
 (0)