Skip to content

Commit 23cbd15

Browse files
committed
Change ExtractorMessageLogLevel values to lower case
1 parent c78aeb0 commit 23cbd15

5 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎apps/api-extractor/src/api/IExtractorConfig.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export const enum ExtractorMessageLogLevel {
279279
* @remarks
280280
* Errors cause the build to fail and return a nonzero exit code.
281281
*/
282-
Error = 'Error',
282+
Error = 'error',
283283

284284
/**
285285
* The message will be written to the build output as an warning.
@@ -288,12 +288,12 @@ export const enum ExtractorMessageLogLevel {
288288
* Warnings cause a production build fail and return a nonzero exit code. For a non-production build
289289
* (e.g. using the `--local` option with `api-extractor run`), the warning is displayed but the build will not fail.
290290
*/
291-
Warning = 'Warning',
291+
Warning = 'warning',
292292

293293
/**
294294
* The message will not be reported to the output log.
295295
*/
296-
None = 'None'
296+
None = 'none'
297297
}
298298

299299
/**

‎apps/api-extractor/src/collector/MessageRouter.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ export class MessageRouter {
327327
case ExtractorMessageLogLevel.Warning:
328328
logger.logWarning('Warning: ' + message.formatMessageWithLocation(workingPackageFolderPath));
329329
break;
330+
case ExtractorMessageLogLevel.None:
331+
break;
332+
default:
333+
throw new Error(`Invalid logLevel value: ${JSON.stringify(reportingRule.logLevel)}`);
330334
}
331335
}
332336

‎apps/api-extractor/src/schemas/api-extractor-defaults.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@
4545
"messages": {
4646
"compilerMessageReporting": {
4747
"default": {
48-
"logLevel": "Warning"
48+
"logLevel": "warning"
4949
}
5050
},
5151
"extractorMessageReporting": {
5252
"default": {
53-
"logLevel": "Warning"
53+
"logLevel": "warning"
5454
}
5555
},
5656
"tsdocMessageReporting": {
5757
"default": {
58-
"logLevel": "Warning"
58+
"logLevel": "warning"
5959
}
6060
}
6161
},

‎apps/api-extractor/src/schemas/api-extractor.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
"logLevel": {
228228
"type": "string",
229229
"description": "Specifies whether the message should be written to the the tool's output log. Note that the \"addToApiReviewFile\" property may supersede this option.",
230-
"enum": [ "Error", "Warning", "None" ]
230+
"enum": [ "error", "warning", "none" ]
231231
},
232232
"addToApiReviewFile": {
233233
"type": "boolean",

‎common/reviews/api/api-extractor.api.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ declare class ExtractorMessage {
508508
// @internal (undocumented)
509509
constructor(options: IExtractorMessageOptions);
510510
readonly category: ExtractorMessageCategory;
511-
formatMessageAndLocation(workingPackageFolderPath: string): string;
511+
formatMessageWithLocation(workingPackageFolderPath: string): string;
512512
// (undocumented)
513513
formatMessageWithoutLocation(): string;
514514
readonly messageId: tsdoc.TSDocMessageId | ExtractorMessageId | string;
@@ -535,9 +535,9 @@ declare const enum ExtractorMessageId {
535535

536536
// @public
537537
declare const enum ExtractorMessageLogLevel {
538-
Error = "Error",
539-
None = "None",
540-
Warning = "Warning"
538+
Error = "error",
539+
None = "none",
540+
Warning = "warning"
541541
}
542542

543543
// @public

0 commit comments

Comments
 (0)