Skip to content

Commit 5fb080c

Browse files
committed
Merge branch 'master' of https://github.com/microsoft/web-build-tools into danade/FunctionAndMethodAccessability
2 parents 4297385 + 3c1b0d3 commit 5fb080c

File tree

212 files changed

+3305
-1011
lines changed

Some content is hidden

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

212 files changed

+3305
-1011
lines changed

README.md

Lines changed: 98 additions & 198 deletions
Large diffs are not rendered by default.

apps/api-documenter/CHANGELOG.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,58 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.4.8",
6+
"tag": "@microsoft/api-documenter_v7.4.8",
7+
"date": "Sun, 29 Sep 2019 23:56:29 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Update repository URL"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.5.0` to `7.5.1`"
17+
},
18+
{
19+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.15.0` to `3.15.1`"
20+
},
21+
{
22+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.3.1` to `4.3.2`"
23+
},
24+
{
25+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.4\" from `0.2.2` to `0.2.3`"
26+
},
27+
{
28+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.2.2` to `6.2.3`"
29+
}
30+
]
31+
}
32+
},
33+
{
34+
"version": "7.4.7",
35+
"tag": "@microsoft/api-documenter_v7.4.7",
36+
"date": "Wed, 25 Sep 2019 15:15:31 GMT",
37+
"comments": {
38+
"patch": [
39+
{
40+
"comment": "Disambiguate output files for items with colliding names"
41+
}
42+
],
43+
"dependency": [
44+
{
45+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.4.2` to `7.5.0`"
46+
},
47+
{
48+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.4\" from `0.2.1` to `0.2.2`"
49+
},
50+
{
51+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.2.1` to `6.2.2`"
52+
}
53+
]
54+
}
55+
},
456
{
557
"version": "7.4.6",
658
"tag": "@microsoft/api-documenter_v7.4.6",

apps/api-documenter/CHANGELOG.md

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

3-
This log was last generated on Tue, 24 Sep 2019 02:58:49 GMT and should not be manually modified.
3+
This log was last generated on Sun, 29 Sep 2019 23:56:29 GMT and should not be manually modified.
4+
5+
## 7.4.8
6+
Sun, 29 Sep 2019 23:56:29 GMT
7+
8+
### Patches
9+
10+
- Update repository URL
11+
12+
## 7.4.7
13+
Wed, 25 Sep 2019 15:15:31 GMT
14+
15+
### Patches
16+
17+
- Disambiguate output files for items with colliding names
418

519
## 7.4.6
620
Tue, 24 Sep 2019 02:58:49 GMT

apps/api-documenter/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "7.4.6",
3+
"version": "7.4.8",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/Microsoft/web-build-tools/tree/master/apps/api-documenter"
7+
"url": "https://github.com/microsoft/rushstack/tree/master/apps/api-documenter"
88
},
99
"homepage": "https://api-extractor.com/",
1010
"license": "MIT",
@@ -17,17 +17,17 @@
1717
"main": "lib/index.js",
1818
"typings": "dist/rollup.d.ts",
1919
"dependencies": {
20-
"@microsoft/api-extractor-model": "7.4.2",
21-
"@microsoft/node-core-library": "3.15.0",
22-
"@microsoft/ts-command-line": "4.3.1",
20+
"@microsoft/api-extractor-model": "7.5.1",
21+
"@microsoft/node-core-library": "3.15.1",
22+
"@microsoft/ts-command-line": "4.3.2",
2323
"@microsoft/tsdoc": "0.12.14",
2424
"colors": "~1.2.1",
2525
"js-yaml": "~3.13.1",
2626
"resolve": "1.8.1"
2727
},
2828
"devDependencies": {
29-
"@microsoft/rush-stack-compiler-3.4": "0.2.1",
30-
"@microsoft/node-library-build": "6.2.1",
29+
"@microsoft/rush-stack-compiler-3.4": "0.2.3",
30+
"@microsoft/node-library-build": "6.2.3",
3131
"@types/jest": "23.3.11",
3232
"@types/js-yaml": "3.12.1",
3333
"@types/node": "8.10.54",

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4-
import { PackageName } from '@microsoft/node-core-library';
54
import { DocComment, DocInlineTag } from '@microsoft/tsdoc';
65
import { ApiModel, ApiItem, ApiItemKind, ApiDocumentedItem } from '@microsoft/api-extractor-model';
76

@@ -42,24 +41,20 @@ export class ExperimentalYamlDocumenter extends YamlDocumenter {
4241
if (apiItem.kind === ApiItemKind.Namespace) {
4342
// Namespaces don't have nodes yet
4443
tocItem = {
45-
name: apiItem.displayName
44+
name: this._getTocItemName(apiItem)
4645
};
4746
} else {
4847
if (this._shouldEmbed(apiItem.kind)) {
4948
// Don't generate table of contents items for embedded definitions
5049
continue;
5150
}
5251

53-
if (apiItem.kind === ApiItemKind.Package) {
54-
tocItem = {
55-
name: PackageName.getUnscopedName(apiItem.displayName),
56-
uid: this._getUid(apiItem)
57-
};
58-
} else {
59-
tocItem = {
60-
name: apiItem.displayName,
61-
uid: this._getUid(apiItem)
62-
};
52+
tocItem = {
53+
name: this._getTocItemName(apiItem),
54+
uid: this._getUid(apiItem)
55+
};
56+
57+
if (apiItem.kind !== ApiItemKind.Package) {
6358
this._filterItem(apiItem, tocItem);
6459
}
6560
}

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export class YamlDocumenter {
7575

7676
private _apiItemsByCanonicalReference: Map<string, ApiItem>;
7777
private _yamlReferences: IYamlReferences | undefined;
78-
7978
private _outputFolder: string;
8079

8180
public constructor(apiModel: ApiModel) {
@@ -232,25 +231,18 @@ export class YamlDocumenter {
232231
if (apiItem.kind === ApiItemKind.Namespace) {
233232
// Namespaces don't have nodes yet
234233
tocItem = {
235-
name: apiItem.displayName
234+
name: this._getTocItemName(apiItem)
236235
};
237236
} else {
238237
if (this._shouldEmbed(apiItem.kind)) {
239238
// Don't generate table of contents items for embedded definitions
240239
continue;
241240
}
242241

243-
if (apiItem.kind === ApiItemKind.Package) {
244-
tocItem = {
245-
name: PackageName.getUnscopedName(apiItem.displayName),
246-
uid: this._getUid(apiItem)
247-
};
248-
} else {
249-
tocItem = {
250-
name: apiItem.displayName,
251-
uid: this._getUid(apiItem)
252-
};
253-
}
242+
tocItem = {
243+
name: this._getTocItemName(apiItem),
244+
uid: this._getUid(apiItem)
245+
};
254246
}
255247

256248
tocItems.push(tocItem);
@@ -271,6 +263,20 @@ export class YamlDocumenter {
271263
return tocItems;
272264
}
273265

266+
/** @virtual */
267+
protected _getTocItemName(apiItem: ApiItem): string {
268+
let name: string = apiItem.displayName;
269+
if (apiItem.kind === ApiItemKind.Package) {
270+
name = PackageName.getUnscopedName(name);
271+
}
272+
273+
if (apiItem.getMergedSiblings().length > 1) {
274+
name += ` (${apiItem.kind})`;
275+
}
276+
277+
return name;
278+
}
279+
274280
protected _shouldEmbed(apiItemKind: ApiItemKind): boolean {
275281
switch (apiItemKind) {
276282
case ApiItemKind.Class:
@@ -591,7 +597,6 @@ export class YamlDocumenter {
591597
*/
592598
private _initApiItems(): void {
593599
this._initApiItemsRecursive(this._apiModel);
594-
595600
}
596601

597602
/**
@@ -803,11 +808,17 @@ export class YamlDocumenter {
803808
break;
804809
}
805810
}
806-
return path.join(this._outputFolder, result + '.yml');
811+
812+
let disambiguator: string = '';
813+
if (apiItem.getMergedSiblings().length > 1) {
814+
disambiguator = `-${apiItem.kind.toLowerCase()}`;
815+
}
816+
817+
return path.join(this._outputFolder, result + disambiguator + '.yml');
807818
}
808819

809820
private _deleteOldOutputFiles(): void {
810821
console.log('Deleting old output from ' + this._outputFolder);
811822
FileSystem.ensureEmptyFolder(this._outputFolder);
812823
}
813-
}
824+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Utilities {
2323
*/
2424
public static getSafeFilenameForName(name: string): string {
2525
// TODO: This can introduce naming collisions.
26-
// We will fix that as part of https://github.com/microsoft/web-build-tools/issues/1308
26+
// We will fix that as part of https://github.com/microsoft/rushstack/issues/1308
2727
return name.replace(Utilities._badFilenameCharsRegExp, '_').toLowerCase();
2828
}
2929
}

apps/api-extractor-model/CHANGELOG.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
{
22
"name": "@microsoft/api-extractor-model",
33
"entries": [
4+
{
5+
"version": "7.5.1",
6+
"tag": "@microsoft/api-extractor-model_v7.5.1",
7+
"date": "Sun, 29 Sep 2019 23:56:29 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Update repository URL"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.15.0` to `3.15.1`"
17+
}
18+
]
19+
}
20+
},
21+
{
22+
"version": "7.5.0",
23+
"tag": "@microsoft/api-extractor-model_v7.5.0",
24+
"date": "Wed, 25 Sep 2019 15:15:31 GMT",
25+
"comments": {
26+
"minor": [
27+
{
28+
"comment": "Add ApiItem.getMergedSiblings() API"
29+
}
30+
]
31+
}
32+
},
433
{
534
"version": "7.4.2",
635
"tag": "@microsoft/api-extractor-model_v7.4.2",

apps/api-extractor-model/CHANGELOG.md

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

3-
This log was last generated on Mon, 23 Sep 2019 15:14:55 GMT and should not be manually modified.
3+
This log was last generated on Sun, 29 Sep 2019 23:56:29 GMT and should not be manually modified.
4+
5+
## 7.5.1
6+
Sun, 29 Sep 2019 23:56:29 GMT
7+
8+
### Patches
9+
10+
- Update repository URL
11+
12+
## 7.5.0
13+
Wed, 25 Sep 2019 15:15:31 GMT
14+
15+
### Minor changes
16+
17+
- Add ApiItem.getMergedSiblings() API
418

519
## 7.4.2
620
Mon, 23 Sep 2019 15:14:55 GMT

apps/api-extractor-model/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@microsoft/api-extractor-model",
3-
"version": "7.4.2",
3+
"version": "7.5.1",
44
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/Microsoft/web-build-tools/tree/master/apps/api-extractor-model"
7+
"url": "https://github.com/microsoft/rushstack/tree/master/apps/api-extractor-model"
88
},
99
"homepage": "https://api-extractor.com",
1010
"main": "lib/index.js",
@@ -14,7 +14,7 @@
1414
"build": "gulp test --clean"
1515
},
1616
"dependencies": {
17-
"@microsoft/node-core-library": "3.15.0",
17+
"@microsoft/node-core-library": "3.15.1",
1818
"@microsoft/tsdoc": "0.12.14"
1919
},
2020
"devDependencies": {

0 commit comments

Comments
 (0)