Skip to content

Commit 7bcee66

Browse files
authored
Merge branch 'master' into print-tag-name
2 parents a6b3e8f + d5c1756 commit 7bcee66

236 files changed

Lines changed: 6182 additions & 694 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.

‎.github/CODEOWNERS‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
.github/CODEOWNERS @iclanton @nickpape-msft @octogonz @patmill @aditima
2-
common/config/**/* @iclanton @nickpape-msft @octogonz @patmill @aditima
1+
.github/CODEOWNERS @iclanton @octogonz @patmill @apostolisms
2+
common/config/**/* @iclanton @octogonz @patmill @apostolisms
33

4-
common/reviews/**/* @iclanton @nickpape-msft @octogonz @mpasarin @aditima
4+
common/reviews/**/* @iclanton @octogonz @apostolisms
55

6-
apps/**/* @iclanton @nickpape-msft @octogonz @aditima
7-
build-tests/**/* @iclanton @nickpape-msft @octogonz @aditima
8-
core-build/**/* @iclanton @nickpape-msft @octogonz @aditima
9-
libraries/**/* @iclanton @nickpape-msft @octogonz @aditima
10-
stack/**/* @iclanton @nickpape-msft @octogonz @aditima
11-
webpack/**/* @iclanton @nickpape-msft @octogonz @aditima
12-
rush.json @iclanton @nickpape-msft @octogonz @aditima
13-
.gitattributes @iclanton @nickpape-msft @octogonz @aditima
14-
.gitignore @iclanton @nickpape-msft @octogonz @aditima
15-
README.md @iclanton @nickpape-msft @octogonz @aditima
6+
apps/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
7+
build-tests/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
8+
core-build/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
9+
libraries/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
10+
stack/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
11+
webpack/**/* @iclanton @octogonz @apostolisms @lincoded @halfnibble
12+
rush.json @iclanton @octogonz @apostolisms @lincoded @halfnibble
13+
.gitattributes @iclanton @octogonz @apostolisms @lincoded @halfnibble
14+
.gitignore @iclanton @octogonz @apostolisms @lincoded @halfnibble
15+
README.md @iclanton @octogonz @apostolisms @lincoded @halfnibble
1616

17-
libraries/load-themed-styles/**/* @iclanton @nickpape-msft @octogonz @dzearing @aditima
17+
libraries/load-themed-styles/**/* @iclanton @octogonz @dzearing @apostolisms

‎.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: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,134 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.3.3",
6+
"tag": "@microsoft/api-documenter_v7.3.3",
7+
"date": "Wed, 12 Jun 2019 19:12:33 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.5` to `4.2.6`"
12+
},
13+
{
14+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.18` to `0.3.19`"
15+
},
16+
{
17+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.66` to `6.0.67`"
18+
}
19+
]
20+
}
21+
},
22+
{
23+
"version": "7.3.2",
24+
"tag": "@microsoft/api-documenter_v7.3.2",
25+
"date": "Tue, 11 Jun 2019 00:48:06 GMT",
26+
"comments": {
27+
"patch": [
28+
{
29+
"comment": "Add support for emitting type parameters in the YamlDocumenter"
30+
}
31+
],
32+
"dependency": [
33+
{
34+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.3` to `7.2.0`"
35+
},
36+
{
37+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.17` to `0.3.18`"
38+
},
39+
{
40+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.65` to `6.0.66`"
41+
}
42+
]
43+
}
44+
},
45+
{
46+
"version": "7.3.1",
47+
"tag": "@microsoft/api-documenter_v7.3.1",
48+
"date": "Thu, 06 Jun 2019 22:33:36 GMT",
49+
"comments": {
50+
"dependency": [
51+
{
52+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.16` to `0.3.17`"
53+
},
54+
{
55+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.64` to `6.0.65`"
56+
}
57+
]
58+
}
59+
},
60+
{
61+
"version": "7.3.0",
62+
"tag": "@microsoft/api-documenter_v7.3.0",
63+
"date": "Wed, 05 Jun 2019 19:12:34 GMT",
64+
"comments": {
65+
"patch": [
66+
{
67+
"comment": "Fix an issue where TSDoc index selectors (ApiParameterListMixin.overloadIndex) started from 0, whereas TSDoc requires a nonzero number"
68+
}
69+
],
70+
"minor": [
71+
{
72+
"comment": "Improved the experimental api-documenter generate command."
73+
}
74+
],
75+
"dependency": [
76+
{
77+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.2` to `7.1.3`"
78+
},
79+
{
80+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.15` to `0.3.16`"
81+
},
82+
{
83+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.63` to `6.0.64`"
84+
}
85+
]
86+
}
87+
},
88+
{
89+
"version": "7.2.2",
90+
"tag": "@microsoft/api-documenter_v7.2.2",
91+
"date": "Tue, 04 Jun 2019 05:51:53 GMT",
92+
"comments": {
93+
"dependency": [
94+
{
95+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.1` to `7.1.2`"
96+
},
97+
{
98+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.14` to `0.3.15`"
99+
},
100+
{
101+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.62` to `6.0.63`"
102+
}
103+
]
104+
}
105+
},
106+
{
107+
"version": "7.2.1",
108+
"tag": "@microsoft/api-documenter_v7.2.1",
109+
"date": "Mon, 27 May 2019 04:13:44 GMT",
110+
"comments": {
111+
"patch": [
112+
{
113+
"comment": "Improve the markdown generator to document class constructors"
114+
}
115+
],
116+
"dependency": [
117+
{
118+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.0` to `7.1.1`"
119+
},
120+
{
121+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.4` to `4.2.5`"
122+
},
123+
{
124+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.13` to `0.3.14`"
125+
},
126+
{
127+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.61` to `6.0.62`"
128+
}
129+
]
130+
}
131+
},
4132
{
5133
"version": "7.2.0",
6134
"tag": "@microsoft/api-documenter_v7.2.0",

‎apps/api-documenter/CHANGELOG.md‎

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
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 Wed, 12 Jun 2019 19:12:33 GMT and should not be manually modified.
4+
5+
## 7.3.3
6+
Wed, 12 Jun 2019 19:12:33 GMT
7+
8+
*Version update only*
9+
10+
## 7.3.2
11+
Tue, 11 Jun 2019 00:48:06 GMT
12+
13+
### Patches
14+
15+
- Add support for emitting type parameters in the YamlDocumenter
16+
17+
## 7.3.1
18+
Thu, 06 Jun 2019 22:33:36 GMT
19+
20+
*Version update only*
21+
22+
## 7.3.0
23+
Wed, 05 Jun 2019 19:12:34 GMT
24+
25+
### Minor changes
26+
27+
- Improved the experimental api-documenter generate command.
28+
29+
### Patches
30+
31+
- Fix an issue where TSDoc index selectors (ApiParameterListMixin.overloadIndex) started from 0, whereas TSDoc requires a nonzero number
32+
33+
## 7.2.2
34+
Tue, 04 Jun 2019 05:51:53 GMT
35+
36+
*Version update only*
37+
38+
## 7.2.1
39+
Mon, 27 May 2019 04:13:44 GMT
40+
41+
### Patches
42+
43+
- Improve the markdown generator to document class constructors
444

545
## 7.2.0
646
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.3.3",
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.2.0",
1919
"@microsoft/node-core-library": "3.13.0",
20-
"@microsoft/ts-command-line": "4.2.4",
20+
"@microsoft/ts-command-line": "4.2.6",
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.19",
27+
"@microsoft/node-library-build": "6.0.67",
2828
"@types/js-yaml": "3.12.1",
2929
"@types/node": "8.5.8",
3030
"gulp": "~3.9.1",

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

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,7 @@ export class ExperimentalYamlDocumenter extends YamlDocumenter {
5959
name: apiItem.displayName,
6060
uid: this._getUid(apiItem)
6161
};
62-
// Filtering out the api-items as we build the tocItems array.
63-
if (apiItem instanceof ApiDocumentedItem) {
64-
const docInlineTag: DocInlineTag | undefined =
65-
(this._config && this._config.filterByInlineTag)
66-
? this._findInlineTagByName(this._config.filterByInlineTag, apiItem.tsdocComment)
67-
: undefined;
68-
69-
const tagContent: string | undefined =
70-
docInlineTag && docInlineTag.tagContent && docInlineTag.tagContent.trim();
71-
72-
if (tagContent && this._tocPointerMap[tagContent]) {
73-
// null assertion used because when pointer map was created we checked for presence of empty `items` array
74-
this._tocPointerMap[tagContent].items!.push(tocItem);
75-
} else {
76-
if (this._catchAllPointer && this._catchAllPointer.items) {
77-
this._catchAllPointer.items.push(tocItem);
78-
}
79-
}
80-
}
81-
62+
this._filterItem(apiItem, tocItem);
8263
}
8364
}
8465

@@ -102,13 +83,15 @@ export class ExperimentalYamlDocumenter extends YamlDocumenter {
10283

10384
// Parses the tocConfig object to build a pointers map of nodes where we want to sort out the API items
10485
private _generateTocPointersMap(tocConfig: IYamlTocFile | IYamlTocItem): void {
86+
const { catchAllCategory } = this._config;
87+
10588
if (tocConfig.items) {
10689
for (const tocItem of tocConfig.items) {
107-
if (tocItem.items && tocItem.items.length > 0) {
90+
if (tocItem.items && tocItem.items.length > 0 && this._shouldNotIncludeInPointersMap(tocItem)) {
10891
this._generateTocPointersMap(tocItem);
10992
} else {
11093
// check for presence of the `catchAllCategory` config option
111-
if (this._config && this._config.catchAllCategory && tocItem.name === this._config.catchAllCategory) {
94+
if (catchAllCategory && tocItem.name === catchAllCategory) {
11295
this._catchAllPointer = tocItem;
11396
} else {
11497
this._tocPointerMap[tocItem.name] = tocItem;
@@ -118,11 +101,57 @@ export class ExperimentalYamlDocumenter extends YamlDocumenter {
118101
}
119102
}
120103

104+
/**
105+
* Filtering out the api-item by inlineTags or category name presence in the item name.
106+
*/
107+
private _filterItem(apiItem: ApiItem, tocItem: IYamlTocItem): void {
108+
const { categoryInlineTag, categorizeByName } = this._config;
109+
const { name: itemName } = tocItem;
110+
let filtered: boolean = false;
111+
112+
// First we attempt to filter by inline tag if provided.
113+
if (apiItem instanceof ApiDocumentedItem) {
114+
const docInlineTag: DocInlineTag | undefined =
115+
categoryInlineTag
116+
? this._findInlineTagByName(categoryInlineTag, apiItem.tsdocComment)
117+
: undefined;
118+
119+
const tagContent: string | undefined =
120+
docInlineTag && docInlineTag.tagContent && docInlineTag.tagContent.trim();
121+
122+
if (tagContent && this._tocPointerMap[tagContent]) {
123+
// null assertion used because when pointer map was created we checked for presence of empty `items` array
124+
this._tocPointerMap[tagContent].items!.push(tocItem);
125+
filtered = true;
126+
}
127+
}
128+
129+
// If not filtered by inline tag and `categorizeByName` config is enabled attempt to filter it by category name.
130+
if (!filtered && categorizeByName) {
131+
const pointers: string[] = Object.keys(this._tocPointerMap);
132+
for (let i: number = 0, length: number = pointers.length; i < length; i++) {
133+
if (itemName.indexOf(pointers[i]) !== -1) {
134+
// null assertion used because when pointer map was created we checked for presence of empty `items` array
135+
this._tocPointerMap[pointers[i]].items!.push(tocItem);
136+
filtered = true;
137+
break;
138+
}
139+
}
140+
}
141+
142+
// If item still not filtered and a `catchAllCategory` config provided push it to it.
143+
if (!filtered && this._catchAllPointer && this._catchAllPointer.items) {
144+
this._catchAllPointer.items.push(tocItem);
145+
}
146+
}
147+
121148
// This is a direct copy of a @docCategory inline tag finder in office-ui-fabric-react,
122149
// but is generic enough to be used for any inline tag
123150
private _findInlineTagByName(tagName: string, docComment: DocComment | undefined): DocInlineTag | undefined {
151+
const tagNameToCheck: string = `@${tagName}`;
152+
124153
if (docComment instanceof DocInlineTag) {
125-
if (docComment.tagName === tagName) {
154+
if (docComment.tagName === tagNameToCheck) {
126155
return docComment;
127156
}
128157
}
@@ -136,4 +165,12 @@ export class ExperimentalYamlDocumenter extends YamlDocumenter {
136165
}
137166
return undefined;
138167
}
168+
169+
private _shouldNotIncludeInPointersMap(item: IYamlTocItem): boolean {
170+
const { nonEmptyCategoryNodeNames } = this._config;
171+
if (nonEmptyCategoryNodeNames && nonEmptyCategoryNodeNames.length) {
172+
return nonEmptyCategoryNodeNames.indexOf(item.name) === -1;
173+
}
174+
return true;
175+
}
139176
}

0 commit comments

Comments
 (0)