Skip to content

Commit e650978

Browse files
committed
Merge from master.
2 parents 78ea4d2 + 9635191 commit e650978

105 files changed

Lines changed: 1197 additions & 378 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "1.5.56",
6+
"tag": "@microsoft/api-documenter_v1.5.56",
7+
"date": "Fri, 16 Nov 2018 21:37:10 GMT",
8+
"comments": {
9+
"dependency": [
10+
{
11+
"comment": "Updating dependency \"@microsoft/api-extractor\" from `6.1.5` to `6.1.6`"
12+
},
13+
{
14+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.5.2` to `3.6.0`"
15+
},
16+
{
17+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler\" from `0.5.3` to `0.5.4`"
18+
},
19+
{
20+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.11` to `6.0.12`"
21+
}
22+
]
23+
}
24+
},
425
{
526
"version": "1.5.55",
627
"tag": "@microsoft/api-documenter_v1.5.55",

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 Fri, 16 Nov 2018 00:59:00 GMT and should not be manually modified.
3+
This log was last generated on Fri, 16 Nov 2018 21:37:10 GMT and should not be manually modified.
4+
5+
## 1.5.56
6+
Fri, 16 Nov 2018 21:37:10 GMT
7+
8+
*Version update only*
49

510
## 1.5.55
611
Fri, 16 Nov 2018 00:59:00 GMT

apps/api-documenter/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/api-documenter",
3-
"version": "1.5.55",
3+
"version": "1.5.56",
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.1.5",
19-
"@microsoft/node-core-library": "3.5.2",
18+
"@microsoft/api-extractor": "6.1.6",
19+
"@microsoft/node-core-library": "3.6.0",
2020
"@microsoft/ts-command-line": "4.2.2",
2121
"colors": "~1.2.1",
2222
"js-yaml": "~3.9.1"
2323
},
2424
"devDependencies": {
2525
"@microsoft/rush-stack-compiler-3.0": "0.0.0",
26-
"@microsoft/node-library-build": "6.0.11",
26+
"@microsoft/node-library-build": "6.0.12",
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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
{
22
"name": "@microsoft/api-extractor",
33
"entries": [
4+
{
5+
"version": "6.1.6",
6+
"tag": "@microsoft/api-extractor_v6.1.6",
7+
"date": "Fri, 16 Nov 2018 21:37:10 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Add support for emitting `/// <reference lib=\"___\" />` directives in .d.ts rollups (GitHub issue #946)"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/node-core-library\" from `3.5.2` to `3.6.0`"
17+
}
18+
]
19+
}
20+
},
421
{
522
"version": "6.1.5",
623
"tag": "@microsoft/api-extractor_v6.1.5",

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 Fri, 16 Nov 2018 00:59:00 GMT and should not be manually modified.
3+
This log was last generated on Fri, 16 Nov 2018 21:37:10 GMT and should not be manually modified.
4+
5+
## 6.1.6
6+
Fri, 16 Nov 2018 21:37:10 GMT
7+
8+
### Patches
9+
10+
- Add support for emitting `/// <reference lib="___" />` directives in .d.ts rollups (GitHub issue #946)
411

512
## 6.1.5
613
Fri, 16 Nov 2018 00:59:00 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": "6.1.5",
3+
"version": "6.1.6",
44
"description": "Validate, document, and review the exported API for a TypeScript library",
55
"keywords": [
66
"typescript",
@@ -31,23 +31,23 @@
3131
"build": "gulp test --clean"
3232
},
3333
"dependencies": {
34-
"@microsoft/node-core-library": "3.5.2",
34+
"@microsoft/node-core-library": "3.6.0",
3535
"@microsoft/ts-command-line": "4.2.2",
3636
"@microsoft/tsdoc": "0.12.2",
3737
"@types/node": "8.5.8",
3838
"@types/z-schema": "3.16.31",
3939
"colors": "~1.2.1",
4040
"jju": "~1.3.0",
4141
"lodash": "~4.17.5",
42-
"typescript": "~3.0.3",
42+
"typescript": "~3.1.6",
4343
"z-schema": "~3.18.3"
4444
},
4545
"devDependencies": {
46-
"@microsoft/rush-stack-compiler": "0.5.3",
46+
"@microsoft/rush-stack-compiler": "0.5.4",
4747
"tslint-microsoft-contrib": "~5.2.1",
4848
"@types/lodash": "4.14.116",
4949
"gulp": "~3.9.1",
50-
"@microsoft/node-library-build": "6.0.6",
50+
"@microsoft/node-library-build": "6.0.12",
5151
"@types/jest": "21.1.10"
5252
}
5353
}

apps/api-extractor/src/generators/dtsRollup/DtsRollupGenerator.ts

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import * as ts from 'typescript';
77
import * as tsdoc from '@microsoft/tsdoc';
8-
import { FileSystem, NewlineKind } from '@microsoft/node-core-library';
8+
import { FileSystem, NewlineKind, Sort } from '@microsoft/node-core-library';
99

1010
import { ExtractorContext } from '../../ExtractorContext';
1111
import { IndentedWriter } from '../../utils/IndentedWriter';
@@ -62,7 +62,14 @@ export class DtsRollupGenerator {
6262
*
6363
* /// <reference types="example-library" />
6464
*/
65-
private _dtsTypeDefinitionReferences: string[] = [];
65+
private _dtsTypeReferenceDirectives: Set<string> = new Set<string>();
66+
67+
/**
68+
* A list of names (e.g. "runtime-library") that should appear in a reference like this:
69+
*
70+
* /// <reference lib="runtime-library" />
71+
*/
72+
private _dtsLibReferenceDirectives: Set<string> = new Set<string>();
6673

6774
public constructor(context: ExtractorContext) {
6875
this._context = context;
@@ -104,8 +111,9 @@ export class DtsRollupGenerator {
104111

105112
this._makeUniqueNames();
106113

107-
this._dtsEntries.sort((a, b) => a.getSortKey().localeCompare(b.getSortKey()));
108-
this._dtsTypeDefinitionReferences.sort();
114+
Sort.sortBy(this._dtsEntries, x => x.getSortKey());
115+
Sort.sortSet(this._dtsTypeReferenceDirectives);
116+
Sort.sortSet(this._dtsLibReferenceDirectives);
109117
}
110118

111119
/**
@@ -215,12 +223,16 @@ export class DtsRollupGenerator {
215223
}
216224

217225
// Emit the triple slash directives
218-
for (const typeDirectiveReference of this._dtsTypeDefinitionReferences) {
226+
for (const typeDirectiveReference of this._dtsTypeReferenceDirectives) {
219227
// tslint:disable-next-line:max-line-length
220228
// https://github.com/Microsoft/TypeScript/blob/611ebc7aadd7a44a4c0447698bfda9222a78cb66/src/compiler/declarationEmitter.ts#L162
221229
indentedWriter.writeLine(`/// <reference types="${typeDirectiveReference}" />`);
222230
}
223231

232+
for (const libDirectiveReference of this._dtsLibReferenceDirectives) {
233+
indentedWriter.writeLine(`/// <reference lib="${libDirectiveReference}" />`);
234+
}
235+
224236
// Emit the imports
225237
for (const dtsEntry of this._dtsEntries) {
226238
if (dtsEntry.astSymbol.astImport) {
@@ -546,9 +558,12 @@ export class DtsRollupGenerator {
546558

547559
for (const typeReferenceDirective of sourceFile.typeReferenceDirectives) {
548560
const name: string = sourceFile.text.substring(typeReferenceDirective.pos, typeReferenceDirective.end);
549-
if (this._dtsTypeDefinitionReferences.indexOf(name) < 0) {
550-
this._dtsTypeDefinitionReferences.push(name);
551-
}
561+
this._dtsTypeReferenceDirectives.add(name);
562+
}
563+
564+
for (const libReferenceDirective of sourceFile.libReferenceDirectives) {
565+
const name: string = sourceFile.text.substring(libReferenceDirective.pos, libReferenceDirective.end);
566+
this._dtsLibReferenceDirectives.add(name);
552567
}
553568

554569
}

apps/rush-lib/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
},
2222
"license": "MIT",
2323
"dependencies": {
24-
"@microsoft/node-core-library": "3.5.2",
25-
"@microsoft/package-deps-hash": "2.2.102",
26-
"@microsoft/stream-collator": "3.0.17",
24+
"@microsoft/node-core-library": "3.6.0",
25+
"@microsoft/package-deps-hash": "2.2.103",
26+
"@microsoft/stream-collator": "3.0.18",
2727
"@microsoft/ts-command-line": "4.2.2",
2828
"@pnpm/link-bins": "~1.0.1",
2929
"@pnpm/logger": "~1.0.1",
@@ -51,7 +51,7 @@
5151
},
5252
"devDependencies": {
5353
"@microsoft/rush-stack-compiler-3.0": "0.0.0",
54-
"@microsoft/node-library-build": "6.0.11",
54+
"@microsoft/node-library-build": "6.0.12",
5555
"@types/node": "8.5.8",
5656
"@types/node-fetch": "1.6.9",
5757
"@types/tar": "4.0.0",

apps/rush/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
},
3232
"license": "MIT",
3333
"dependencies": {
34-
"@microsoft/node-core-library": "3.5.2",
34+
"@microsoft/node-core-library": "3.6.0",
3535
"@microsoft/rush-lib": "5.5.2",
3636
"colors": "~1.2.1",
3737
"semver": "~5.3.0"
3838
},
3939
"devDependencies": {
4040
"@microsoft/rush-stack-compiler-3.0": "0.0.0",
41-
"@microsoft/node-library-build": "6.0.11",
41+
"@microsoft/node-library-build": "6.0.12",
4242
"@types/chai": "3.4.34",
4343
"@types/mocha": "5.2.5",
4444
"@types/node": "8.5.8",

build-tests/api-extractor-test-01/dist/beta/api-extractor-test-01.d.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
/// <reference types="jest" />
13+
/// <reference lib="es2018.intl" />
1314

1415
/**
1516
* Example of an abstract class that is directly exported.
@@ -138,8 +139,6 @@ export declare class ForgottenExportConsumer3 {
138139
test2(): IForgottenDirectDependency | undefined;
139140
}
140141

141-
export declare const fullyExportedCustomSymbol: unique symbol;
142-
143142
/**
144143
* This class is directly consumed by ForgottenExportConsumer3.
145144
*/
@@ -194,8 +193,6 @@ export declare interface IInterfaceAsDefaultExport {
194193
export declare interface ISimpleInterface {
195194
}
196195

197-
declare const locallyExportedCustomSymbol: unique symbol;
198-
199196
/**
200197
* This class gets aliased twice before being exported from the package.
201198
* @public
@@ -205,6 +202,10 @@ export declare class ReexportedClass {
205202
getValue(): string;
206203
}
207204

205+
/** @public */
206+
export declare class ReferenceLibDirective extends Intl.PluralRules {
207+
}
208+
208209
/**
209210
* This class has links such as {@link TypeReferencesInAedoc}.
210211
* @public
@@ -224,10 +225,14 @@ export declare class TypeReferencesInAedoc {
224225
getValue3(arg1: TypeReferencesInAedoc): TypeReferencesInAedoc;
225226
}
226227

227-
declare const unexportedCustomSymbol: unique symbol;
228-
229228
/* Excluded from this release type: VARIABLE */
230229

230+
export declare const fullyExportedCustomSymbol: unique symbol;
231+
232+
declare const locallyExportedCustomSymbol: unique symbol;
233+
234+
declare const unexportedCustomSymbol: unique symbol;
235+
231236
/**
232237
* Example decorator
233238
* @public

0 commit comments

Comments
 (0)