Skip to content

Commit 6da8406

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into octogonz/ae-new-canonical-references
2 parents 5a280f5 + ae327a5 commit 6da8406

180 files changed

Lines changed: 1539 additions & 622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/api-documenter/CHANGELOG.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.3.9",
6+
"tag": "@microsoft/api-documenter_v7.3.9",
7+
"date": "Mon, 22 Jul 2019 19:13:10 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.2.0` to `7.3.0`"
12+
},
13+
{
14+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.4\" from `0.1.11` to `0.1.12`"
15+
},
16+
{
17+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.72` to `6.0.73`"
18+
}
19+
]
20+
}
21+
},
422
{
523
"version": "7.3.8",
624
"tag": "@microsoft/api-documenter_v7.3.8",

apps/api-documenter/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log - @microsoft/api-documenter
22

3-
This log was last generated on Fri, 12 Jul 2019 19:12:46 GMT and should not be manually modified.
3+
This log was last generated on Mon, 22 Jul 2019 19:13:10 GMT and should not be manually modified.
4+
5+
## 7.3.9
6+
Mon, 22 Jul 2019 19:13:10 GMT
7+
8+
*Version update only*
49

510
## 7.3.8
611
Fri, 12 Jul 2019 19:12:46 GMT

apps/api-documenter/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "7.3.8",
3+
"version": "7.3.9",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
@@ -15,16 +15,16 @@
1515
"api-documenter": "./bin/api-documenter"
1616
},
1717
"dependencies": {
18-
"@microsoft/api-extractor-model": "7.2.0",
18+
"@microsoft/api-extractor-model": "7.3.0",
1919
"@microsoft/node-core-library": "3.13.0",
2020
"@microsoft/ts-command-line": "4.2.6",
2121
"@microsoft/tsdoc": "0.12.10",
2222
"colors": "~1.2.1",
2323
"js-yaml": "~3.13.1"
2424
},
2525
"devDependencies": {
26-
"@microsoft/rush-stack-compiler-3.4": "0.1.11",
27-
"@microsoft/node-library-build": "6.0.72",
26+
"@microsoft/rush-stack-compiler-3.4": "0.1.12",
27+
"@microsoft/node-library-build": "6.0.73",
2828
"@types/js-yaml": "3.12.1",
2929
"@types/node": "8.5.8",
3030
"gulp": "~3.9.1",

apps/api-documenter/src/documenters/MarkdownDocumenter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ export class MarkdownDocumenter {
791791
let baseName: string = '';
792792
for (const hierarchyItem of apiItem.getHierarchy()) {
793793
// For overloaded methods, add a suffix such as "MyClass.myMethod_2".
794-
let qualifiedName: string = hierarchyItem.displayName;
794+
let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);
795795
if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
796796
if (hierarchyItem.overloadIndex > 1) {
797797
// Subtract one for compatibility with earlier releases of API Documenter.
@@ -805,13 +805,13 @@ export class MarkdownDocumenter {
805805
case ApiItemKind.EntryPoint:
806806
break;
807807
case ApiItemKind.Package:
808-
baseName = PackageName.getUnscopedName(hierarchyItem.displayName);
808+
baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));
809809
break;
810810
default:
811811
baseName += '.' + qualifiedName;
812812
}
813813
}
814-
return baseName.toLowerCase() + '.md';
814+
return baseName + '.md';
815815
}
816816

817817
private _getLinkFilenameForApiItem(apiItem: ApiItem): string {

apps/api-documenter/src/documenters/YamlDocumenter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,19 +693,19 @@ export class YamlDocumenter {
693693
case ApiItemKind.EntryPoint:
694694
break;
695695
case ApiItemKind.Package:
696-
result += PackageName.getUnscopedName(current.displayName);
696+
result += Utilities.getSafeFilenameForName(PackageName.getUnscopedName(current.displayName));
697697
break;
698698
default:
699699
if (current.parent && current.parent.kind === ApiItemKind.EntryPoint) {
700700
result += '/';
701701
} else {
702702
result += '.';
703703
}
704-
result += current.displayName;
704+
result += Utilities.getSafeFilenameForName(current.displayName);
705705
break;
706706
}
707707
}
708-
return path.join(this._outputFolder, result.toLowerCase() + '.yml');
708+
return path.join(this._outputFolder, result + '.yml');
709709
}
710710

711711
private _deleteOldOutputFiles(): void {

apps/api-documenter/src/utils/Utilities.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from '@microsoft/api-extractor-model';
88

99
export class Utilities {
10+
private static readonly _badFilenameCharsRegExp: RegExp = /[^a-z0-9_\-\.]/ig;
1011
/**
1112
* Generates a concise signature for a function. Example: "getArea(width, height)"
1213
*/
@@ -16,4 +17,13 @@ export class Utilities {
1617
}
1718
return apiItem.displayName;
1819
}
20+
21+
/**
22+
* Converts bad filename characters to underscores.
23+
*/
24+
public static getSafeFilenameForName(name: string): string {
25+
// TODO: This can introduce naming collisions.
26+
// We will fix that as part of https://github.com/microsoft/web-build-tools/issues/1308
27+
return name.replace(Utilities._badFilenameCharsRegExp, '_').toLowerCase();
28+
}
1929
}

apps/api-extractor-model/CHANGELOG.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
22
"name": "@microsoft/api-extractor-model",
33
"entries": [
4+
{
5+
"version": "7.3.0",
6+
"tag": "@microsoft/api-extractor-model_v7.3.0",
7+
"date": "Mon, 22 Jul 2019 19:13:10 GMT",
8+
"comments": {
9+
"minor": [
10+
{
11+
"comment": "Rename `ApiItem.canonicalReference` to `.containerKey`; rename `ApiItemContainerMixin.tryGetMember()` to `.tryGetMemberByKey()`; rename `Api___.getCanonicalReference()` to `.getContainerKey()`"
12+
}
13+
]
14+
}
15+
},
416
{
517
"version": "7.2.0",
618
"tag": "@microsoft/api-extractor-model_v7.2.0",

apps/api-extractor-model/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log - @microsoft/api-extractor-model
22

3-
This log was last generated on Tue, 11 Jun 2019 00:48:06 GMT and should not be manually modified.
3+
This log was last generated on Mon, 22 Jul 2019 19:13:10 GMT and should not be manually modified.
4+
5+
## 7.3.0
6+
Mon, 22 Jul 2019 19:13:10 GMT
7+
8+
### Minor changes
9+
10+
- Rename `ApiItem.canonicalReference` to `.containerKey`; rename `ApiItemContainerMixin.tryGetMember()` to `.tryGetMemberByKey()`; rename `Api___.getCanonicalReference()` to `.getContainerKey()`
411

512
## 7.2.0
613
Tue, 11 Jun 2019 00:48:06 GMT

apps/api-extractor-model/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-extractor-model",
3-
"version": "7.2.0",
3+
"version": "7.3.0",
44
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
55
"repository": {
66
"type": "git",

apps/api-extractor/CHANGELOG.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
{
22
"name": "@microsoft/api-extractor",
33
"entries": [
4+
{
5+
"version": "7.3.3",
6+
"tag": "@microsoft/api-extractor_v7.3.3",
7+
"date": "Mon, 22 Jul 2019 19:13:10 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Update to use new api-extractor-model"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.2.0` to `7.3.0`"
17+
}
18+
]
19+
}
20+
},
421
{
522
"version": "7.3.2",
623
"tag": "@microsoft/api-extractor_v7.3.2",

0 commit comments

Comments
 (0)