From fdd3f50a60115b3f669c8cc55998c13ff4f28df9 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 11 Apr 2019 08:29:44 -0700 Subject: [PATCH 1/4] Update some docs --- apps/api-extractor/src/api/IConfigFile.ts | 4 ++-- apps/api-extractor/src/schemas/api-extractor-template.json | 6 +++--- apps/api-extractor/src/schemas/api-extractor.schema.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/api-extractor/src/api/IConfigFile.ts b/apps/api-extractor/src/api/IConfigFile.ts index dc1eecd47de..e79ca91639d 100644 --- a/apps/api-extractor/src/api/IConfigFile.ts +++ b/apps/api-extractor/src/api/IConfigFile.ts @@ -24,7 +24,7 @@ export interface IConfigCompiler { tsconfigFilePath?: string; /** - * Provides already parsed tsconfig.json contents. + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. * * @remarks * The value must conform to the TypeScript tsconfig schema: @@ -107,7 +107,7 @@ export interface IConfigApiReport { */ export interface IConfigDocModel { /** - * Whether to generate doc model file. + * Whether to generate a doc model file. */ enabled: boolean; diff --git a/apps/api-extractor/src/schemas/api-extractor-template.json b/apps/api-extractor/src/schemas/api-extractor-template.json index 2ba5aa5800f..b06810646d3 100644 --- a/apps/api-extractor/src/schemas/api-extractor-template.json +++ b/apps/api-extractor/src/schemas/api-extractor-template.json @@ -32,7 +32,7 @@ * SUPPORTED TOKENS: * DEFAULT VALUE: "" */ - // "projectFolder": "", + // "projectFolder": "..", /** * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor @@ -65,7 +65,7 @@ // "tsconfigFilePath": "/tsconfig.json", /** - * Provides compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. * The object must conform to the TypeScript tsconfig schema: * * http://json.schemastore.org/tsconfig @@ -145,7 +145,7 @@ */ "docModel": { /** - * (REQUIRED) Whether to generate doc model file. + * (REQUIRED) Whether to generate a doc model file. */ "enabled": true, diff --git a/apps/api-extractor/src/schemas/api-extractor.schema.json b/apps/api-extractor/src/schemas/api-extractor.schema.json index e53d45f2fd0..15cdaebe1fe 100644 --- a/apps/api-extractor/src/schemas/api-extractor.schema.json +++ b/apps/api-extractor/src/schemas/api-extractor.schema.json @@ -28,11 +28,11 @@ "type": "object", "properties": { "tsconfigFilePath": { - "description": " Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. The path is resolved relative to the folder of the config file that contains the setting; to change this, prepend a folder token such as \"\". Note: This setting will be ignored if \"overrideTsconfig\" is used.", + "description": "Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. The path is resolved relative to the folder of the config file that contains the setting; to change this, prepend a folder token such as \"\". Note: This setting will be ignored if \"overrideTsconfig\" is used.", "type": "string" }, "overrideTsconfig": { - "description": "Provides already parsed tsconfig.json contents conforming to the TypeScript tsconfig schema: http://json.schemastore.org/tsconfig If omitted, then the tsconfig.json file will be read from the \"projectFolder\".", + "description": "Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. The object must conform to the TypeScript tsconfig schema: http://json.schemastore.org/tsconfig If omitted, then the tsconfig.json file will be read from the \"projectFolder\".", "type": "object" }, "skipLibCheck": { From 8b09db54ccb6c3d47c24c25566d2a9a92de84133 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 11 Apr 2019 22:35:13 -0700 Subject: [PATCH 2/4] Minor documentation changes --- apps/api-extractor/src/api/ExtractorMessageId.ts | 2 +- apps/api-extractor/src/collector/VisitorState.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api-extractor/src/api/ExtractorMessageId.ts b/apps/api-extractor/src/api/ExtractorMessageId.ts index f08cc563781..03802215a55 100644 --- a/apps/api-extractor/src/api/ExtractorMessageId.ts +++ b/apps/api-extractor/src/api/ExtractorMessageId.ts @@ -73,7 +73,7 @@ export const enum ExtractorMessageId { UnresolvedInheritDocBase = 'ae-unresolved-inheritdoc-base', /** - * "The `@inheritDoc` tag for ____ refers to its own declaration". + * "The `@inheritDoc` tag for ___ refers to its own declaration". */ CyclicInheritDoc = 'ae-cyclic-inherit-doc', diff --git a/apps/api-extractor/src/collector/VisitorState.ts b/apps/api-extractor/src/collector/VisitorState.ts index 6b66f4113ec..11af8582286 100644 --- a/apps/api-extractor/src/collector/VisitorState.ts +++ b/apps/api-extractor/src/collector/VisitorState.ts @@ -8,17 +8,17 @@ export enum VisitorState { /** * We have not visited the node yet. */ - Unvisited, + Unvisited = 0, /** * We have visited the node, but have not finished traversing its references yet. * If we reach a node that is already in the `Visiting` state, this means we have * encountered a cyclic reference. */ - Visiting, + Visiting = 1, /** * We are finished vising the node and all its references. */ - Visited + Visited = 2 } From 5beaa71d84683343df1701f4fc7d55ac7a8e28e0 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 11 Apr 2019 22:50:32 -0700 Subject: [PATCH 3/4] Fix a regression where messages were not being printed to the console --- apps/api-extractor/src/collector/MessageRouter.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/api-extractor/src/collector/MessageRouter.ts b/apps/api-extractor/src/collector/MessageRouter.ts index 5e782255fdc..2778fcdb054 100644 --- a/apps/api-extractor/src/collector/MessageRouter.ts +++ b/apps/api-extractor/src/collector/MessageRouter.ts @@ -392,6 +392,14 @@ export class MessageRouter { return; } + // Assign the ExtractorMessage.logLevel; the message callback may adjust it below + if (message.category === ExtractorMessageCategory.Console) { + // Console messages have their category log level assigned via logInfo(), logVerbose(), etc. + } else { + const reportingRule: IReportingRule = this._getRuleForMessage(message); + message.logLevel = reportingRule.logLevel; + } + if (this._messageCallback) { this._messageCallback(message); From a70ecd89cd1e18794e8cd517ba4bed4d940c2615 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 11 Apr 2019 22:51:21 -0700 Subject: [PATCH 4/4] rush change --- .../octogonz-ae-misc-fixes_2019-04-12-05-51.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@microsoft/api-extractor/octogonz-ae-misc-fixes_2019-04-12-05-51.json diff --git a/common/changes/@microsoft/api-extractor/octogonz-ae-misc-fixes_2019-04-12-05-51.json b/common/changes/@microsoft/api-extractor/octogonz-ae-misc-fixes_2019-04-12-05-51.json new file mode 100644 index 00000000000..6d38184a41e --- /dev/null +++ b/common/changes/@microsoft/api-extractor/octogonz-ae-misc-fixes_2019-04-12-05-51.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Fix a regression that prevented certain types of warnings from being reported", + "type": "patch" + } + ], + "packageName": "@microsoft/api-extractor", + "email": "4673363+octogonz@users.noreply.github.com" +} \ No newline at end of file