Skip to content

Commit

Permalink
chore: update api-documenter and apply new patch (google#7075)
Browse files Browse the repository at this point in the history
  • Loading branch information
maribethb authored May 11, 2023
1 parent de904ab commit 68eb388
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 148 deletions.
178 changes: 44 additions & 134 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@blockly/dev-tools": "^5.0.0",
"@blockly/theme-modern": "^3.0.0",
"@hyperjump/json-schema": "^0.23.3",
"@microsoft/api-documenter": "^7.19.16",
"@microsoft/api-documenter": "^7.22.4",
"@microsoft/api-extractor": "^7.29.5",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@wdio/selenium-standalone-service": "^8.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/@microsoft/api-documenter/lib/documenters/MarkdownDocumenter.js b/node_modules/@microsoft/api-documenter/lib/documenters/MarkdownDocumenter.js
index 421f89f..b9d329b 100644
index 5284d10..f2f9d14 100644
--- a/node_modules/@microsoft/api-documenter/lib/documenters/MarkdownDocumenter.js
+++ b/node_modules/@microsoft/api-documenter/lib/documenters/MarkdownDocumenter.js
@@ -856,12 +856,15 @@ class MarkdownDocumenter {
@@ -877,12 +877,15 @@ class MarkdownDocumenter {
}
_writeBreadcrumb(output, apiItem) {
const configuration = this._tsdocConfiguration;
Expand All @@ -24,7 +24,7 @@ index 421f89f..b9d329b 100644
for (const hierarchyItem of apiItem.getHierarchy()) {
switch (hierarchyItem.kind) {
case api_extractor_model_1.ApiItemKind.Model:
@@ -871,18 +874,24 @@ class MarkdownDocumenter {
@@ -892,18 +895,24 @@ class MarkdownDocumenter {
// this may change in the future.
break;
default:
Expand All @@ -33,10 +33,10 @@ index 421f89f..b9d329b 100644
- configuration,
- text: ' > '
- }),
+ // Only print the breadcrumb separator if it's not the first item we're printing.
+ if (!first) {
+ // Only print the breadcrumb separator if it's not the first item we're printing.
+ output.appendNodeInParagraph(
+ new tsdoc_1.DocPlainText({
+ new tsdoc_1.DocPlainText({
+ configuration,
+ text: ' > '
+ })
Expand All @@ -55,7 +55,7 @@ index 421f89f..b9d329b 100644
}
}
}
@@ -947,11 +956,13 @@ class MarkdownDocumenter {
@@ -968,11 +977,8 @@ class MarkdownDocumenter {
// For overloaded methods, add a suffix such as "MyClass.myMethod_2".
let qualifiedName = Utilities_1.Utilities.getSafeFilenameForName(hierarchyItem.displayName);
if (api_extractor_model_1.ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
Expand All @@ -65,22 +65,16 @@ index 421f89f..b9d329b 100644
- qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;
- }
+ // https://github.com/microsoft/rushstack/issues/1921
+ // if (hierarchyItem.overloadIndex > 1) {
+ // // Subtract one for compatibility with earlier releases of API Documenter.
+ // // (This will get revamped when we fix GitHub issue #1308)
+ // qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;
+ // }
+ qualifiedName += `_${hierarchyItem.overloadIndex}`;
}
switch (hierarchyItem.kind) {
case api_extractor_model_1.ApiItemKind.Model:
@@ -962,7 +973,9 @@ class MarkdownDocumenter {
@@ -983,7 +989,8 @@ class MarkdownDocumenter {
baseName = Utilities_1.Utilities.getSafeFilenameForName(node_core_library_1.PackageName.getUnscopedName(hierarchyItem.displayName));
break;
default:
- baseName += '.' + qualifiedName;
+ // https://github.com/microsoft/rushstack/issues/1921
+ // baseName += '.' + qualifiedName;
+ baseName += '.' + qualifiedName + '_' + hierarchyItem.kind.toLowerCase();
}
}
Expand Down

0 comments on commit 68eb388

Please sign in to comment.