Skip to content

Commit e457fb6

Browse files
committed
Merge from master.
2 parents c19c2ee + 734650b commit e457fb6

File tree

119 files changed

+2593
-1472
lines changed

Some content is hidden

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

119 files changed

+2593
-1472
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
22
node_js:
33
- '8.9.4'
4+
- '10.12.0'
45
script:
56
- set -e
67

apps/api-documenter/CHANGELOG.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,75 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "1.5.39",
6+
"tag": "@microsoft/api-documenter_v1.5.39",
7+
"date": "Thu, 18 Oct 2018 05:30:14 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `5.0.22` to `5.0.23`"
12+
}
13+
]
14+
}
15+
},
16+
{
17+
"version": "1.5.38",
18+
"tag": "@microsoft/api-documenter_v1.5.38",
19+
"date": "Thu, 18 Oct 2018 01:32:21 GMT",
20+
"comments": {
21+
"dependency": [
22+
{
23+
"comment": "Updating dependency \"@microsoft/api-extractor\" from `6.0.5` to `6.0.6`"
24+
},
25+
{
26+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler\" from `0.1.16` to `0.1.17`"
27+
},
28+
{
29+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `5.0.21` to `5.0.22`"
30+
}
31+
]
32+
}
33+
},
34+
{
35+
"version": "1.5.37",
36+
"tag": "@microsoft/api-documenter_v1.5.37",
37+
"date": "Wed, 17 Oct 2018 21:04:49 GMT",
38+
"comments": {
39+
"dependency": [
40+
{
41+
"comment": "Updating dependency \"@microsoft/api-extractor\" from `6.0.4` to `6.0.5`"
42+
},
43+
{
44+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.3.0` to `3.3.1`"
45+
},
46+
{
47+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler\" from `0.1.15` to `0.1.16`"
48+
},
49+
{
50+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `5.0.20` to `5.0.21`"
51+
}
52+
]
53+
}
54+
},
55+
{
56+
"version": "1.5.36",
57+
"tag": "@microsoft/api-documenter_v1.5.36",
58+
"date": "Wed, 17 Oct 2018 14:43:24 GMT",
59+
"comments": {
60+
"dependency": [
61+
{
62+
"comment": "Updating dependency \"@microsoft/api-extractor\" from `6.0.3` to `6.0.4`"
63+
},
64+
{
65+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler\" from `0.1.14` to `0.1.15`"
66+
},
67+
{
68+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `5.0.19` to `5.0.20`"
69+
}
70+
]
71+
}
72+
},
473
{
574
"version": "1.5.35",
675
"tag": "@microsoft/api-documenter_v1.5.35",

apps/api-documenter/CHANGELOG.md

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

3-
This log was last generated on Thu, 11 Oct 2018 23:26:07 GMT and should not be manually modified.
3+
This log was last generated on Thu, 18 Oct 2018 05:30:14 GMT and should not be manually modified.
4+
5+
## 1.5.39
6+
Thu, 18 Oct 2018 05:30:14 GMT
7+
8+
*Version update only*
9+
10+
## 1.5.38
11+
Thu, 18 Oct 2018 01:32:21 GMT
12+
13+
*Version update only*
14+
15+
## 1.5.37
16+
Wed, 17 Oct 2018 21:04:49 GMT
17+
18+
*Version update only*
19+
20+
## 1.5.36
21+
Wed, 17 Oct 2018 14:43:24 GMT
22+
23+
*Version update only*
424

525
## 1.5.35
626
Thu, 11 Oct 2018 23:26:07 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": "1.5.35",
3+
"version": "1.5.39",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
@@ -15,15 +15,15 @@
1515
"api-documenter": "./bin/api-documenter"
1616
},
1717
"dependencies": {
18-
"@microsoft/api-extractor": "6.0.3",
19-
"@microsoft/node-core-library": "3.3.0",
18+
"@microsoft/api-extractor": "6.0.6",
19+
"@microsoft/node-core-library": "3.3.1",
2020
"@microsoft/ts-command-line": "4.2.2",
2121
"colors": "~1.2.1",
2222
"js-yaml": "~3.9.1"
2323
},
2424
"devDependencies": {
25-
"@microsoft/rush-stack-compiler": "0.1.14",
26-
"@microsoft/node-library-build": "5.0.19",
25+
"@microsoft/rush-stack-compiler": "0.1.17",
26+
"@microsoft/node-library-build": "5.0.23",
2727
"@types/js-yaml": "3.9.1",
2828
"@types/node": "8.5.8",
2929
"gulp": "~3.9.1",

apps/api-extractor/CHANGELOG.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
{
22
"name": "@microsoft/api-extractor",
33
"entries": [
4+
{
5+
"version": "6.0.6",
6+
"tag": "@microsoft/api-extractor_v6.0.6",
7+
"date": "Thu, 18 Oct 2018 01:32:20 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Fix isAbsolute check for mainDtsRollupPath"
12+
}
13+
]
14+
}
15+
},
16+
{
17+
"version": "6.0.5",
18+
"tag": "@microsoft/api-extractor_v6.0.5",
19+
"date": "Wed, 17 Oct 2018 21:04:49 GMT",
20+
"comments": {
21+
"dependency": [
22+
{
23+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.3.0` to `3.3.1`"
24+
}
25+
]
26+
}
27+
},
28+
{
29+
"version": "6.0.4",
30+
"tag": "@microsoft/api-extractor_v6.0.4",
31+
"date": "Wed, 17 Oct 2018 14:43:24 GMT",
32+
"comments": {
33+
"patch": [
34+
{
35+
"comment": "Fix a regression where namespaces were sometimes incorrectly handled in \"conservative\" mode"
36+
},
37+
{
38+
"comment": "Update the command line to look for api-extractor.json in both the \"./config\" folder and the project folder"
39+
},
40+
{
41+
"comment": "Allow type references in namespaces when namespaceSupport=conservative"
42+
}
43+
]
44+
}
45+
},
446
{
547
"version": "6.0.3",
648
"tag": "@microsoft/api-extractor_v6.0.3",

apps/api-extractor/CHANGELOG.md

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

3-
This log was last generated on Thu, 11 Oct 2018 23:26:07 GMT and should not be manually modified.
3+
This log was last generated on Thu, 18 Oct 2018 01:32:20 GMT and should not be manually modified.
4+
5+
## 6.0.6
6+
Thu, 18 Oct 2018 01:32:20 GMT
7+
8+
### Patches
9+
10+
- Fix isAbsolute check for mainDtsRollupPath
11+
12+
## 6.0.5
13+
Wed, 17 Oct 2018 21:04:49 GMT
14+
15+
*Version update only*
16+
17+
## 6.0.4
18+
Wed, 17 Oct 2018 14:43:24 GMT
19+
20+
### Patches
21+
22+
- Fix a regression where namespaces were sometimes incorrectly handled in "conservative" mode
23+
- Update the command line to look for api-extractor.json in both the "./config" folder and the project folder
24+
- Allow type references in namespaces when namespaceSupport=conservative
425

526
## 6.0.3
627
Thu, 11 Oct 2018 23:26:07 GMT

apps/api-extractor/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-extractor",
3-
"version": "6.0.3",
3+
"version": "6.0.6",
44
"description": "Validate, document, and review the exported API for a TypeScript library",
55
"keywords": [
66
"typescript",
@@ -31,9 +31,9 @@
3131
"build": "gulp test --clean"
3232
},
3333
"dependencies": {
34-
"@microsoft/node-core-library": "3.3.0",
34+
"@microsoft/node-core-library": "3.3.1",
3535
"@microsoft/ts-command-line": "4.2.2",
36-
"@microsoft/tsdoc": "0.8.1",
36+
"@microsoft/tsdoc": "0.9.2",
3737
"@types/node": "8.5.8",
3838
"@types/z-schema": "3.16.31",
3939
"colors": "~1.2.1",

apps/api-extractor/src/aedoc/ApiDocumentation.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
DocBlockTag,
1414
StandardTags,
1515
StandardModifierTagSet,
16+
DocBlock,
1617
DocComment,
1718
DocSection,
1819
DocNodeKind,
@@ -359,8 +360,11 @@ export class ApiDocumentation {
359360
allowStructuredContent: boolean): void {
360361
switch (node.kind) {
361362
case DocNodeKind.Block:
362-
case DocNodeKind.Section:
363363
case DocNodeKind.ParamBlock:
364+
const docBlock: DocBlock = node as DocBlock;
365+
this._renderAsMarkupElementsInto(result, docBlock.content, sectionName, allowStructuredContent);
366+
break;
367+
case DocNodeKind.Section:
364368
const docSection: DocSection = node as DocSection;
365369
for (const childNode of docSection.nodes) {
366370
this._renderAsMarkupElementsInto(result, childNode, sectionName, allowStructuredContent);
@@ -379,7 +383,7 @@ export class ApiDocumentation {
379383
break;
380384
case DocNodeKind.EscapedText:
381385
const docEscapedText: DocEscapedText = node as DocEscapedText;
382-
Markup.appendTextElements(result, docEscapedText.text);
386+
Markup.appendTextElements(result, docEscapedText.decodedText);
383387
break;
384388
case DocNodeKind.FencedCode:
385389
if (allowStructuredContent) {
@@ -402,9 +406,9 @@ export class ApiDocumentation {
402406
case DocNodeKind.HtmlStartTag:
403407
const docHtmlStartTag: DocHtmlStartTag = node as DocHtmlStartTag;
404408
let htmlStartTag: string = '<';
405-
htmlStartTag += docHtmlStartTag.elementName;
409+
htmlStartTag += docHtmlStartTag.name;
406410
for (const attribute of docHtmlStartTag.htmlAttributes) {
407-
htmlStartTag += ` ${attribute.attributeName}=${attribute.attributeValue}`;
411+
htmlStartTag += ` ${attribute.name}=${attribute.value}`;
408412
}
409413
if (docHtmlStartTag.selfClosingTag) {
410414
htmlStartTag += '/';
@@ -414,7 +418,7 @@ export class ApiDocumentation {
414418
break;
415419
case DocNodeKind.HtmlEndTag:
416420
const docHtmlEndTag: DocHtmlEndTag = node as DocHtmlEndTag;
417-
result.push(Markup.createHtmlTag(`</${docHtmlEndTag.elementName}>`));
421+
result.push(Markup.createHtmlTag(`</${docHtmlEndTag.name}>`));
418422
break;
419423
case DocNodeKind.InlineTag:
420424
const docInlineTag: DocInlineTag = node as DocInlineTag;
@@ -628,8 +632,12 @@ export class ApiDocumentation {
628632
// If no resolvedAstItem found then nothing to inherit
629633
// But for the time being set the summary to a text object
630634
if (!resolvedAstItem) {
635+
let unresolvedAstItemName: string = apiDefinitionRef.exportName;
636+
if (apiDefinitionRef.memberName) {
637+
unresolvedAstItemName += '.' + apiDefinitionRef.memberName;
638+
}
631639
this.summary.push(...Markup.createTextElements(
632-
`See documentation for ${this._docComment.inheritDocTag.tagContent}`));
640+
`See documentation for ${unresolvedAstItemName}`));
633641
return;
634642
}
635643

apps/api-extractor/src/ast/AstNamespace.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,24 @@ export class AstNamespace extends AstModule {
7979

8080
const declaration: ts.Declaration = declarations[0];
8181

82-
if (declaration.parent && declaration.parent.flags !== ts.NodeFlags.Const) {
82+
if (declaration.parent && (declaration.parent.flags & ts.NodeFlags.Const) === 0) {
8383
this.reportWarning(`Export "${exportSymbol.name}" is missing the "const" ` +
8484
'modifier. Currently the "namespace" block only supports constant variables.');
8585
continue;
8686
}
8787

8888
const propertySignature: ts.PropertySignature = declaration as ts.PropertySignature;
89-
if (!propertySignature.type || allowedTypes.indexOf(propertySignature.type.getText()) < 0) {
90-
this.reportWarning(`Export "${exportSymbol.name}" must specify and be of type` +
91-
'"string", "number" or "boolean"');
89+
90+
if (!propertySignature.type) {
91+
this.reportWarning(`Export "${exportSymbol.name}" must specify a type`);
9292
continue;
9393
}
9494

95-
if (!propertySignature.initializer) {
96-
this.reportWarning(`Export "${exportSymbol.name}" must have an initialized value`);
95+
// Note that we also allow type references that refer to one of the supported primitive types
96+
if (propertySignature.type.kind !== ts.SyntaxKind.TypeReference
97+
&& allowedTypes.indexOf(propertySignature.type.getText()) < 0) {
98+
this.reportWarning(`Export "${exportSymbol.name}" must be of type` +
99+
' "string", "number" or "boolean" when API Extractor is configured for conservative namespaces');
97100
continue;
98101
}
99102

apps/api-extractor/src/cli/RunAction.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,22 @@ export class RunAction extends CommandLineAction {
115115
// at the project root
116116
const packageFolder: string | undefined = lookup.tryGetPackageFolderFor('.');
117117

118-
if (packageFolder) {
119-
configFilename = path.join(packageFolder, AE_CONFIG_FILENAME);
118+
// If there is no package, then try the current directory
119+
const baseFolder: string = packageFolder ? packageFolder : process.cwd();
120+
121+
// First try the standard "config" subfolder:
122+
configFilename = path.join(baseFolder, 'config', AE_CONFIG_FILENAME);
123+
if (FileSystem.exists(configFilename)) {
124+
if (FileSystem.exists(path.join(baseFolder, AE_CONFIG_FILENAME))) {
125+
throw new Error(`Found conflicting ${AE_CONFIG_FILENAME} files in "." and "./config" folders`);
126+
}
120127
} else {
121-
// If there is no package, then try the current directory
122-
configFilename = path.join(process.cwd(), AE_CONFIG_FILENAME);
123-
}
128+
// Otherwise try the top-level folder
129+
configFilename = path.join(baseFolder, AE_CONFIG_FILENAME);
124130

125-
if (!FileSystem.exists(configFilename)) {
126-
throw new Error(`Unable to find an ${AE_CONFIG_FILENAME} file`);
131+
if (!FileSystem.exists(configFilename)) {
132+
throw new Error(`Unable to find an ${AE_CONFIG_FILENAME} file`);
133+
}
127134
}
128135

129136
console.log(`Using configuration from ${configFilename}` + os.EOL + os.EOL);

0 commit comments

Comments
 (0)