Skip to content

Commit 052c09d

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into octogonz/ae-issue-1679
2 parents b20bad2 + 2517cc9 commit 052c09d

155 files changed

Lines changed: 1577 additions & 391 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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.7.4",
6+
"tag": "@microsoft/api-documenter_v7.7.4",
7+
"date": "Thu, 09 Jan 2020 06:44:12 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.7.1` to `7.7.2`"
12+
},
13+
{
14+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.18.1` to `3.18.2`"
15+
},
16+
{
17+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.3.6` to `4.3.7`"
18+
},
19+
{
20+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.5\" from `0.3.12` to `0.3.13`"
21+
},
22+
{
23+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.3.12` to `6.3.13`"
24+
},
25+
{
26+
"comment": "Updating dependency \"@rushstack/eslint-config\" from `0.5.0` to `0.5.1`"
27+
}
28+
]
29+
}
30+
},
431
{
532
"version": "7.7.3",
633
"tag": "@microsoft/api-documenter_v7.7.3",

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 Wed, 08 Jan 2020 00:11:31 GMT and should not be manually modified.
3+
This log was last generated on Thu, 09 Jan 2020 06:44:12 GMT and should not be manually modified.
4+
5+
## 7.7.4
6+
Thu, 09 Jan 2020 06:44:12 GMT
7+
8+
*Version update only*
49

510
## 7.7.3
611
Wed, 08 Jan 2020 00:11:30 GMT

apps/api-documenter/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "7.7.3",
3+
"version": "7.7.4",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
@@ -17,18 +17,18 @@
1717
"main": "lib/index.js",
1818
"typings": "dist/rollup.d.ts",
1919
"dependencies": {
20-
"@microsoft/api-extractor-model": "7.7.1",
21-
"@microsoft/node-core-library": "3.18.1",
22-
"@microsoft/ts-command-line": "4.3.6",
20+
"@microsoft/api-extractor-model": "7.7.2",
21+
"@microsoft/node-core-library": "3.18.2",
22+
"@microsoft/ts-command-line": "4.3.7",
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.5": "0.3.12",
30-
"@microsoft/node-library-build": "6.3.12",
31-
"@rushstack/eslint-config": "0.5.0",
29+
"@microsoft/rush-stack-compiler-3.5": "0.3.13",
30+
"@microsoft/node-library-build": "6.3.13",
31+
"@rushstack/eslint-config": "0.5.1",
3232
"@types/jest": "23.3.11",
3333
"@types/js-yaml": "3.12.1",
3434
"@types/node": "8.10.54",

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.7.2",
6+
"tag": "@microsoft/api-extractor-model_v7.7.2",
7+
"date": "Thu, 09 Jan 2020 06:44:13 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.18.1` to `3.18.2`"
12+
},
13+
{
14+
"comment": "Updating dependency \"@rushstack/eslint-config\" from `0.5.0` to `0.5.1`"
15+
}
16+
]
17+
}
18+
},
419
{
520
"version": "7.7.1",
621
"tag": "@microsoft/api-extractor-model_v7.7.1",

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

3-
This log was last generated on Wed, 08 Jan 2020 00:11:31 GMT and should not be manually modified.
3+
This log was last generated on Thu, 09 Jan 2020 06:44:13 GMT and should not be manually modified.
4+
5+
## 7.7.2
6+
Thu, 09 Jan 2020 06:44:13 GMT
7+
8+
*Version update only*
49

510
## 7.7.1
611
Wed, 08 Jan 2020 00:11:31 GMT

apps/api-extractor-model/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-model",
3-
"version": "7.7.1",
3+
"version": "7.7.2",
44
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
55
"repository": {
66
"type": "git",
@@ -14,13 +14,13 @@
1414
"build": "gulp test --clean"
1515
},
1616
"dependencies": {
17-
"@microsoft/node-core-library": "3.18.1",
17+
"@microsoft/node-core-library": "3.18.2",
1818
"@microsoft/tsdoc": "0.12.14"
1919
},
2020
"devDependencies": {
2121
"@microsoft/node-library-build": "6.3.11",
2222
"@microsoft/rush-stack-compiler-3.5": "0.3.11",
23-
"@rushstack/eslint-config": "0.5.0",
23+
"@rushstack/eslint-config": "0.5.1",
2424
"@types/jest": "23.3.11",
2525
"@types/node": "8.10.54",
2626
"gulp": "~4.0.2"

apps/api-extractor/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-extractor",
33
"entries": [
4+
{
5+
"version": "7.7.2",
6+
"tag": "@microsoft/api-extractor_v7.7.2",
7+
"date": "Thu, 09 Jan 2020 06:44:12 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Fix an error \"Cannot read property 'externalModuleIndicator' of undefined\" (GitHub #1652)"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.7.1` to `7.7.2`"
17+
},
18+
{
19+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.18.1` to `3.18.2`"
20+
},
21+
{
22+
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.3.6` to `4.3.7`"
23+
},
24+
{
25+
"comment": "Updating dependency \"@rushstack/eslint-config\" from `0.5.0` to `0.5.1`"
26+
}
27+
]
28+
}
29+
},
430
{
531
"version": "7.7.1",
632
"tag": "@microsoft/api-extractor_v7.7.1",

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

3-
This log was last generated on Wed, 08 Jan 2020 00:11:31 GMT and should not be manually modified.
3+
This log was last generated on Thu, 09 Jan 2020 06:44:12 GMT and should not be manually modified.
4+
5+
## 7.7.2
6+
Thu, 09 Jan 2020 06:44:12 GMT
7+
8+
### Patches
9+
10+
- Fix an error "Cannot read property 'externalModuleIndicator' of undefined" (GitHub #1652)
411

512
## 7.7.1
613
Wed, 08 Jan 2020 00:11:31 GMT

apps/api-extractor/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-extractor",
3-
"version": "7.7.1",
3+
"version": "7.7.2",
44
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",
55
"keywords": [
66
"typescript",
@@ -32,9 +32,9 @@
3232
"build": "gulp test --clean"
3333
},
3434
"dependencies": {
35-
"@microsoft/api-extractor-model": "7.7.1",
36-
"@microsoft/node-core-library": "3.18.1",
37-
"@microsoft/ts-command-line": "4.3.6",
35+
"@microsoft/api-extractor-model": "7.7.2",
36+
"@microsoft/node-core-library": "3.18.2",
37+
"@microsoft/ts-command-line": "4.3.7",
3838
"@microsoft/tsdoc": "0.12.14",
3939
"colors": "~1.2.1",
4040
"lodash": "~4.17.15",
@@ -45,7 +45,7 @@
4545
"devDependencies": {
4646
"@microsoft/node-library-build": "6.3.11",
4747
"@microsoft/rush-stack-compiler-3.5": "0.3.11",
48-
"@rushstack/eslint-config": "0.5.0",
48+
"@rushstack/eslint-config": "0.5.1",
4949
"@types/jest": "23.3.11",
5050
"@types/lodash": "4.14.116",
5151
"@types/node": "8.10.54",

apps/api-extractor/src/generators/DeclarationReferenceGenerator.ts

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class DeclarationReferenceGenerator {
5151
): DeclarationReference | undefined {
5252
return this._symbolToDeclarationReference(symbol, meaning, /*includeModuleSymbols*/ false);
5353
}
54-
54+
5555
private static _isInExpressionContext(node: ts.Node): boolean {
5656
switch (node.parent.kind) {
5757
case ts.SyntaxKind.TypeQuery: return true;
@@ -177,40 +177,42 @@ export class DeclarationReferenceGenerator {
177177

178178
private _symbolToDeclarationReference(symbol: ts.Symbol, meaning: ts.SymbolFlags, includeModuleSymbols: boolean
179179
): DeclarationReference | undefined {
180-
if (symbol.flags & ts.SymbolFlags.ExportValue) {
181-
symbol = this._typeChecker.getExportSymbolOfSymbol(symbol);
180+
181+
let followedSymbol: ts.Symbol = symbol;
182+
if (followedSymbol.flags & ts.SymbolFlags.ExportValue) {
183+
followedSymbol = this._typeChecker.getExportSymbolOfSymbol(followedSymbol);
182184
}
183-
if (symbol.flags & ts.SymbolFlags.Alias) {
184-
symbol = this._typeChecker.getAliasedSymbol(symbol);
185+
if (followedSymbol.flags & ts.SymbolFlags.Alias) {
186+
followedSymbol = this._typeChecker.getAliasedSymbol(followedSymbol);
185187
}
186188

187-
if (DeclarationReferenceGenerator._isExternalModuleSymbol(symbol)) {
189+
if (DeclarationReferenceGenerator._isExternalModuleSymbol(followedSymbol)) {
188190
if (!includeModuleSymbols) {
189191
return undefined;
190192
}
191193
const sourceFile: ts.SourceFile | undefined =
192-
symbol.declarations
193-
&& symbol.declarations[0]
194-
&& symbol.declarations[0].getSourceFile();
194+
followedSymbol.declarations
195+
&& followedSymbol.declarations[0]
196+
&& followedSymbol.declarations[0].getSourceFile();
195197
return new DeclarationReference(this._sourceFileToModuleSource(sourceFile));
196198
}
197199

198200
// Do not generate a declaration reference for a type parameter.
199-
if (symbol.flags & ts.SymbolFlags.TypeParameter) {
201+
if (followedSymbol.flags & ts.SymbolFlags.TypeParameter) {
200202
return undefined;
201203
}
202204

203-
const parent: ts.Symbol | undefined = TypeScriptInternals.getSymbolParent(symbol);
205+
const parent: ts.Symbol | undefined = TypeScriptInternals.getSymbolParent(followedSymbol);
204206
let parentRef: DeclarationReference | undefined;
205207
if (parent) {
206208
parentRef = this._symbolToDeclarationReference(parent, ts.SymbolFlags.Namespace, /*includeModuleSymbols*/ true);
207209
} else {
208210
// this may be a local symbol in a module...
209211
const sourceFile: ts.SourceFile | undefined =
210-
symbol.declarations
211-
&& symbol.declarations[0]
212-
&& symbol.declarations[0].getSourceFile();
213-
if (ts.isExternalModule(sourceFile)) {
212+
followedSymbol.declarations
213+
&& followedSymbol.declarations[0]
214+
&& followedSymbol.declarations[0].getSourceFile();
215+
if (sourceFile && ts.isExternalModule(sourceFile)) {
214216
parentRef = new DeclarationReference(this._sourceFileToModuleSource(sourceFile));
215217
} else {
216218
parentRef = new DeclarationReference(GlobalSource.instance);
@@ -221,17 +223,17 @@ export class DeclarationReferenceGenerator {
221223
return undefined;
222224
}
223225

224-
let localName: string = symbol.name;
225-
if (symbol.escapedName === ts.InternalSymbolName.Constructor) {
226+
let localName: string = followedSymbol.name;
227+
if (followedSymbol.escapedName === ts.InternalSymbolName.Constructor) {
226228
localName = 'constructor';
227229
} else {
228-
const wellKnownName: string | undefined = TypeScriptHelpers.tryDecodeWellKnownSymbolName(symbol.escapedName);
230+
const wellKnownName: string | undefined = TypeScriptHelpers.tryDecodeWellKnownSymbolName(followedSymbol.escapedName);
229231
if (wellKnownName) {
230232
// TypeScript binds well-known ECMAScript symbols like 'Symbol.iterator' as '__@iterator'.
231233
// This converts a string like '__@iterator' into the property name '[Symbol.iterator]'.
232234
localName = wellKnownName;
233-
} else if (TypeScriptHelpers.isUniqueSymbolName(symbol.escapedName)) {
234-
for (const decl of symbol.declarations || []) {
235+
} else if (TypeScriptHelpers.isUniqueSymbolName(followedSymbol.escapedName)) {
236+
for (const decl of followedSymbol.declarations || []) {
235237
const declName: ts.DeclarationName | undefined = ts.getNameOfDeclaration(decl);
236238
if (declName && ts.isComputedPropertyName(declName)) {
237239
const lateName: string | undefined = TypeScriptHelpers.tryGetLateBoundName(declName);
@@ -244,7 +246,7 @@ export class DeclarationReferenceGenerator {
244246
}
245247
}
246248

247-
let navigation: Navigation | 'global' = DeclarationReferenceGenerator._getNavigationToSymbol(symbol);
249+
let navigation: Navigation | 'global' = DeclarationReferenceGenerator._getNavigationToSymbol(followedSymbol);
248250
if (navigation === 'global') {
249251
if (parentRef.source !== GlobalSource.instance) {
250252
parentRef = new DeclarationReference(GlobalSource.instance);
@@ -254,7 +256,7 @@ export class DeclarationReferenceGenerator {
254256

255257
return parentRef
256258
.addNavigationStep(navigation, localName)
257-
.withMeaning(DeclarationReferenceGenerator._getMeaningOfSymbol(symbol, meaning));
259+
.withMeaning(DeclarationReferenceGenerator._getMeaningOfSymbol(followedSymbol, meaning));
258260
}
259261

260262
private _getPackageName(sourceFile: ts.SourceFile): string {

0 commit comments

Comments
 (0)