Skip to content

Commit 13a7346

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.
1 parent 21846da commit 13a7346

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
@@ -415,13 +415,13 @@ export async function normalizeOptions(
415415
if (appShellOptions || ssrOptions || prerenderOptions) {
416416
if (!serverEntryPoint) {
417417
throw new Error(
418-
'The "server" option is required when enabling "ssr", "prerender" or "app-shell".',
418+
'The "server" option is required when enabling "ssr", "prerender" or "appShell".',
419419
);
420420
}
421421

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

‎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
@@ -105,8 +105,8 @@ export function transformCompilerOptions(
105105
notes: [
106106
{
107107
text:
108-
`The 'emitDecoratorMetadata' option is not required by Angular` +
109-
'and can be removed if not explictly required by the project.',
108+
`The 'emitDecoratorMetadata' option is not required by Angular ` +
109+
'and can be removed if not explicitly required by the project.',
110110
},
111111
],
112112
});

‎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
@@ -197,7 +197,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
197197

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

202202
return 1;
203203
}

‎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)