Skip to content

Commit 2ca71ca

Browse files
authored
Merge branch 'master' into fullParallel
2 parents 55520ef + 64ee674 commit 2ca71ca

138 files changed

Lines changed: 1349 additions & 317 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.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ temp
6767
# Rush files
6868
common/temp/**
6969
package-deps.json
70+
71+
# OS X
72+
.DS_Store

apps/api-documenter/CHANGELOG.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.2.1",
6+
"tag": "@microsoft/api-documenter_v7.2.1",
7+
"date": "Mon, 27 May 2019 04:13:44 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Improve the markdown generator to document class constructors"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.0` to `7.1.1`"
17+
},
18+
{
19+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.4` to `4.2.5`"
20+
},
21+
{
22+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.13` to `0.3.14`"
23+
},
24+
{
25+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.61` to `6.0.62`"
26+
}
27+
]
28+
}
29+
},
430
{
531
"version": "7.2.0",
632
"tag": "@microsoft/api-documenter_v7.2.0",

apps/api-documenter/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-documenter
22

3-
This log was last generated on Thu, 16 May 2019 22:15:20 GMT and should not be manually modified.
3+
This log was last generated on Mon, 27 May 2019 04:13:44 GMT and should not be manually modified.
4+
5+
## 7.2.1
6+
Mon, 27 May 2019 04:13:44 GMT
7+
8+
### Patches
9+
10+
- Improve the markdown generator to document class constructors
411

512
## 7.2.0
613
Thu, 16 May 2019 22:15:20 GMT

apps/api-documenter/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "7.2.0",
3+
"version": "7.2.1",
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.1.0",
18+
"@microsoft/api-extractor-model": "7.1.1",
1919
"@microsoft/node-core-library": "3.13.0",
20-
"@microsoft/ts-command-line": "4.2.4",
20+
"@microsoft/ts-command-line": "4.2.5",
2121
"@microsoft/tsdoc": "0.12.9",
2222
"colors": "~1.2.1",
2323
"js-yaml": "~3.13.1"
2424
},
2525
"devDependencies": {
26-
"@microsoft/rush-stack-compiler-3.2": "0.3.13",
27-
"@microsoft/node-library-build": "6.0.61",
26+
"@microsoft/rush-stack-compiler-3.2": "0.3.14",
27+
"@microsoft/node-library-build": "6.0.62",
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ export class MarkdownDocumenter {
9898
case ApiItemKind.Interface:
9999
output.appendNode(new DocHeading({ configuration, title: `${scopedName} interface` }));
100100
break;
101+
case ApiItemKind.Constructor:
102+
case ApiItemKind.ConstructSignature:
103+
output.appendNode(new DocHeading({ configuration, title: scopedName }));
104+
break;
101105
case ApiItemKind.Method:
102106
case ApiItemKind.MethodSignature:
103107
output.appendNode(new DocHeading({ configuration, title: `${scopedName} method` }));
@@ -182,6 +186,8 @@ export class MarkdownDocumenter {
182186
case ApiItemKind.Interface:
183187
this._writeInterfaceTables(output, apiItem as ApiInterface);
184188
break;
189+
case ApiItemKind.Constructor:
190+
case ApiItemKind.ConstructSignature:
185191
case ApiItemKind.Method:
186192
case ApiItemKind.MethodSignature:
187193
case ApiItemKind.Function:
@@ -376,6 +382,10 @@ export class MarkdownDocumenter {
376382
headerTitles: [ 'Property', 'Modifiers', 'Type', 'Description' ]
377383
});
378384

385+
const constructorsTable: DocTable = new DocTable({ configuration,
386+
headerTitles: [ 'Constructor', 'Modifiers', 'Description' ]
387+
});
388+
379389
const propertiesTable: DocTable = new DocTable({ configuration,
380390
headerTitles: [ 'Property', 'Modifiers', 'Type', 'Description' ]
381391
});
@@ -387,6 +397,18 @@ export class MarkdownDocumenter {
387397
for (const apiMember of apiClass.members) {
388398

389399
switch (apiMember.kind) {
400+
case ApiItemKind.Constructor: {
401+
constructorsTable.addRow(
402+
new DocTableRow({ configuration }, [
403+
this._createTitleCell(apiMember),
404+
this._createModifiersCell(apiMember),
405+
this._createDescriptionCell(apiMember)
406+
])
407+
);
408+
409+
this._writeApiItemPage(apiMember);
410+
break;
411+
}
390412
case ApiItemKind.Method: {
391413
methodsTable.addRow(
392414
new DocTableRow({ configuration }, [
@@ -433,6 +455,11 @@ export class MarkdownDocumenter {
433455
output.appendNode(eventsTable);
434456
}
435457

458+
if (constructorsTable.rows.length > 0) {
459+
output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Constructors' }));
460+
output.appendNode(constructorsTable);
461+
}
462+
436463
if (propertiesTable.rows.length > 0) {
437464
output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));
438465
output.appendNode(propertiesTable);
@@ -502,6 +529,7 @@ export class MarkdownDocumenter {
502529
for (const apiMember of apiClass.members) {
503530

504531
switch (apiMember.kind) {
532+
case ApiItemKind.ConstructSignature:
505533
case ApiItemKind.MethodSignature: {
506534
methodsTable.addRow(
507535
new DocTableRow({ configuration }, [

apps/api-extractor-model/CHANGELOG.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
{
22
"name": "@microsoft/api-extractor-model",
33
"entries": [
4+
{
5+
"version": "7.1.1",
6+
"tag": "@microsoft/api-extractor-model_v7.1.1",
7+
"date": "Mon, 27 May 2019 04:13:44 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Make the strings returned by ApiItem.displayName less verbose"
12+
},
13+
{
14+
"comment": "Improve formatting of the strings returned by ApiItem.getScopedNameWithinPackage()"
15+
}
16+
]
17+
}
18+
},
419
{
520
"version": "7.1.0",
621
"tag": "@microsoft/api-extractor-model_v7.1.0",

apps/api-extractor-model/CHANGELOG.md

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

3-
This log was last generated on Tue, 16 Apr 2019 11:01:37 GMT and should not be manually modified.
3+
This log was last generated on Mon, 27 May 2019 04:13:44 GMT and should not be manually modified.
4+
5+
## 7.1.1
6+
Mon, 27 May 2019 04:13:44 GMT
7+
8+
### Patches
9+
10+
- Make the strings returned by ApiItem.displayName less verbose
11+
- Improve formatting of the strings returned by ApiItem.getScopedNameWithinPackage()
412

513
## 7.1.0
614
Tue, 16 Apr 2019 11:01:37 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.1.0",
3+
"version": "7.1.1",
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-model/src/items/ApiItem.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export class ApiItem {
107107
*/
108108
public get displayName(): string {
109109
switch (this.kind) {
110-
case ApiItemKind.CallSignature: return '(call signature)';
110+
case ApiItemKind.CallSignature: return '(call)';
111111
case ApiItemKind.Constructor: return '(constructor)';
112-
case ApiItemKind.ConstructSignature: return '(construct signature)';
112+
case ApiItemKind.ConstructSignature: return '(new)';
113113
case ApiItemKind.IndexSignature: return '(indexer)';
114114
case ApiItemKind.Model: return '(model)';
115115
}
@@ -166,8 +166,19 @@ export class ApiItem {
166166
}
167167
if (reversedParts.length !== 0) {
168168
reversedParts.push('.');
169-
} else if (ApiParameterListMixin.isBaseClassOf(current)) { // tslint:disable-line:no-use-before-declare
170-
reversedParts.push('()');
169+
} else {
170+
switch (current.kind) {
171+
case ApiItemKind.CallSignature:
172+
case ApiItemKind.ConstructSignature:
173+
case ApiItemKind.Constructor:
174+
case ApiItemKind.IndexSignature:
175+
// These functional forms don't have a proper name, so we don't append the "()" suffix
176+
break;
177+
default:
178+
if (ApiParameterListMixin.isBaseClassOf(current)) { // tslint:disable-line:no-use-before-declare
179+
reversedParts.push('()');
180+
}
181+
}
171182
}
172183
reversedParts.push(current.displayName);
173184
}

apps/api-extractor/CHANGELOG.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
{
22
"name": "@microsoft/api-extractor",
33
"entries": [
4+
{
5+
"version": "7.1.6",
6+
"tag": "@microsoft/api-extractor_v7.1.6",
7+
"date": "Mon, 27 May 2019 04:13:44 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Fix incorrect path resolution for the \"extends\" field when loading tsconfig.json"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.0` to `7.1.1`"
17+
},
18+
{
19+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.4` to `4.2.5`"
20+
}
21+
]
22+
}
23+
},
424
{
525
"version": "7.1.5",
626
"tag": "@microsoft/api-extractor_v7.1.5",

0 commit comments

Comments
 (0)