Skip to content

Commit

Permalink
Merge pull request #1 from microsoft/master
Browse files Browse the repository at this point in the history
Merge from origin.
  • Loading branch information
halfnibble authored May 31, 2019
2 parents 4637b27 + 64ee674 commit e6afa14
Show file tree
Hide file tree
Showing 138 changed files with 1,349 additions and 317 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ temp
# Rush files
common/temp/**
package-deps.json

# OS X
.DS_Store
26 changes: 26 additions & 0 deletions apps/api-documenter/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
{
"name": "@microsoft/api-documenter",
"entries": [
{
"version": "7.2.1",
"tag": "@microsoft/api-documenter_v7.2.1",
"date": "Mon, 27 May 2019 04:13:44 GMT",
"comments": {
"patch": [
{
"comment": "Improve the markdown generator to document class constructors"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.0` to `7.1.1`"
},
{
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.4` to `4.2.5`"
},
{
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.2\" from `0.3.13` to `0.3.14`"
},
{
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.61` to `6.0.62`"
}
]
}
},
{
"version": "7.2.0",
"tag": "@microsoft/api-documenter_v7.2.0",
Expand Down
9 changes: 8 additions & 1 deletion apps/api-documenter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @microsoft/api-documenter

This log was last generated on Thu, 16 May 2019 22:15:20 GMT and should not be manually modified.
This log was last generated on Mon, 27 May 2019 04:13:44 GMT and should not be manually modified.

## 7.2.1
Mon, 27 May 2019 04:13:44 GMT

### Patches

- Improve the markdown generator to document class constructors

## 7.2.0
Thu, 16 May 2019 22:15:20 GMT
Expand Down
10 changes: 5 additions & 5 deletions apps/api-documenter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api-documenter",
"version": "7.2.0",
"version": "7.2.1",
"description": "Read JSON files from api-extractor, generate documentation pages",
"repository": {
"type": "git",
Expand All @@ -15,16 +15,16 @@
"api-documenter": "./bin/api-documenter"
},
"dependencies": {
"@microsoft/api-extractor-model": "7.1.0",
"@microsoft/api-extractor-model": "7.1.1",
"@microsoft/node-core-library": "3.13.0",
"@microsoft/ts-command-line": "4.2.4",
"@microsoft/ts-command-line": "4.2.5",
"@microsoft/tsdoc": "0.12.9",
"colors": "~1.2.1",
"js-yaml": "~3.13.1"
},
"devDependencies": {
"@microsoft/rush-stack-compiler-3.2": "0.3.13",
"@microsoft/node-library-build": "6.0.61",
"@microsoft/rush-stack-compiler-3.2": "0.3.14",
"@microsoft/node-library-build": "6.0.62",
"@types/js-yaml": "3.12.1",
"@types/node": "8.5.8",
"gulp": "~3.9.1",
Expand Down
28 changes: 28 additions & 0 deletions apps/api-documenter/src/documenters/MarkdownDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export class MarkdownDocumenter {
case ApiItemKind.Interface:
output.appendNode(new DocHeading({ configuration, title: `${scopedName} interface` }));
break;
case ApiItemKind.Constructor:
case ApiItemKind.ConstructSignature:
output.appendNode(new DocHeading({ configuration, title: scopedName }));
break;
case ApiItemKind.Method:
case ApiItemKind.MethodSignature:
output.appendNode(new DocHeading({ configuration, title: `${scopedName} method` }));
Expand Down Expand Up @@ -182,6 +186,8 @@ export class MarkdownDocumenter {
case ApiItemKind.Interface:
this._writeInterfaceTables(output, apiItem as ApiInterface);
break;
case ApiItemKind.Constructor:
case ApiItemKind.ConstructSignature:
case ApiItemKind.Method:
case ApiItemKind.MethodSignature:
case ApiItemKind.Function:
Expand Down Expand Up @@ -376,6 +382,10 @@ export class MarkdownDocumenter {
headerTitles: [ 'Property', 'Modifiers', 'Type', 'Description' ]
});

const constructorsTable: DocTable = new DocTable({ configuration,
headerTitles: [ 'Constructor', 'Modifiers', 'Description' ]
});

const propertiesTable: DocTable = new DocTable({ configuration,
headerTitles: [ 'Property', 'Modifiers', 'Type', 'Description' ]
});
Expand All @@ -387,6 +397,18 @@ export class MarkdownDocumenter {
for (const apiMember of apiClass.members) {

switch (apiMember.kind) {
case ApiItemKind.Constructor: {
constructorsTable.addRow(
new DocTableRow({ configuration }, [
this._createTitleCell(apiMember),
this._createModifiersCell(apiMember),
this._createDescriptionCell(apiMember)
])
);

this._writeApiItemPage(apiMember);
break;
}
case ApiItemKind.Method: {
methodsTable.addRow(
new DocTableRow({ configuration }, [
Expand Down Expand Up @@ -433,6 +455,11 @@ export class MarkdownDocumenter {
output.appendNode(eventsTable);
}

if (constructorsTable.rows.length > 0) {
output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Constructors' }));
output.appendNode(constructorsTable);
}

if (propertiesTable.rows.length > 0) {
output.appendNode(new DocHeading({ configuration: this._tsdocConfiguration, title: 'Properties' }));
output.appendNode(propertiesTable);
Expand Down Expand Up @@ -502,6 +529,7 @@ export class MarkdownDocumenter {
for (const apiMember of apiClass.members) {

switch (apiMember.kind) {
case ApiItemKind.ConstructSignature:
case ApiItemKind.MethodSignature: {
methodsTable.addRow(
new DocTableRow({ configuration }, [
Expand Down
15 changes: 15 additions & 0 deletions apps/api-extractor-model/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@microsoft/api-extractor-model",
"entries": [
{
"version": "7.1.1",
"tag": "@microsoft/api-extractor-model_v7.1.1",
"date": "Mon, 27 May 2019 04:13:44 GMT",
"comments": {
"patch": [
{
"comment": "Make the strings returned by ApiItem.displayName less verbose"
},
{
"comment": "Improve formatting of the strings returned by ApiItem.getScopedNameWithinPackage()"
}
]
}
},
{
"version": "7.1.0",
"tag": "@microsoft/api-extractor-model_v7.1.0",
Expand Down
10 changes: 9 additions & 1 deletion apps/api-extractor-model/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Change Log - @microsoft/api-extractor-model

This log was last generated on Tue, 16 Apr 2019 11:01:37 GMT and should not be manually modified.
This log was last generated on Mon, 27 May 2019 04:13:44 GMT and should not be manually modified.

## 7.1.1
Mon, 27 May 2019 04:13:44 GMT

### Patches

- Make the strings returned by ApiItem.displayName less verbose
- Improve formatting of the strings returned by ApiItem.getScopedNameWithinPackage()

## 7.1.0
Tue, 16 Apr 2019 11:01:37 GMT
Expand Down
2 changes: 1 addition & 1 deletion apps/api-extractor-model/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api-extractor-model",
"version": "7.1.0",
"version": "7.1.1",
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
"repository": {
"type": "git",
Expand Down
19 changes: 15 additions & 4 deletions apps/api-extractor-model/src/items/ApiItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ export class ApiItem {
*/
public get displayName(): string {
switch (this.kind) {
case ApiItemKind.CallSignature: return '(call signature)';
case ApiItemKind.CallSignature: return '(call)';
case ApiItemKind.Constructor: return '(constructor)';
case ApiItemKind.ConstructSignature: return '(construct signature)';
case ApiItemKind.ConstructSignature: return '(new)';
case ApiItemKind.IndexSignature: return '(indexer)';
case ApiItemKind.Model: return '(model)';
}
Expand Down Expand Up @@ -166,8 +166,19 @@ export class ApiItem {
}
if (reversedParts.length !== 0) {
reversedParts.push('.');
} else if (ApiParameterListMixin.isBaseClassOf(current)) { // tslint:disable-line:no-use-before-declare
reversedParts.push('()');
} else {
switch (current.kind) {
case ApiItemKind.CallSignature:
case ApiItemKind.ConstructSignature:
case ApiItemKind.Constructor:
case ApiItemKind.IndexSignature:
// These functional forms don't have a proper name, so we don't append the "()" suffix
break;
default:
if (ApiParameterListMixin.isBaseClassOf(current)) { // tslint:disable-line:no-use-before-declare
reversedParts.push('()');
}
}
}
reversedParts.push(current.displayName);
}
Expand Down
20 changes: 20 additions & 0 deletions apps/api-extractor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
{
"name": "@microsoft/api-extractor",
"entries": [
{
"version": "7.1.6",
"tag": "@microsoft/api-extractor_v7.1.6",
"date": "Mon, 27 May 2019 04:13:44 GMT",
"comments": {
"patch": [
{
"comment": "Fix incorrect path resolution for the \"extends\" field when loading tsconfig.json"
}
],
"dependency": [
{
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.1.0` to `7.1.1`"
},
{
"comment": "Updating dependency \"@microsoft/ts-command-line\" from `4.2.4` to `4.2.5`"
}
]
}
},
{
"version": "7.1.5",
"tag": "@microsoft/api-extractor_v7.1.5",
Expand Down
9 changes: 8 additions & 1 deletion apps/api-extractor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @microsoft/api-extractor

This log was last generated on Mon, 13 May 2019 02:08:35 GMT and should not be manually modified.
This log was last generated on Mon, 27 May 2019 04:13:44 GMT and should not be manually modified.

## 7.1.6
Mon, 27 May 2019 04:13:44 GMT

### Patches

- Fix incorrect path resolution for the "extends" field when loading tsconfig.json

## 7.1.5
Mon, 13 May 2019 02:08:35 GMT
Expand Down
6 changes: 3 additions & 3 deletions apps/api-extractor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api-extractor",
"version": "7.1.5",
"version": "7.1.6",
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",
"keywords": [
"typescript",
Expand Down Expand Up @@ -35,9 +35,9 @@
"build": "gulp test --clean"
},
"dependencies": {
"@microsoft/api-extractor-model": "7.1.0",
"@microsoft/api-extractor-model": "7.1.1",
"@microsoft/node-core-library": "3.13.0",
"@microsoft/ts-command-line": "4.2.4",
"@microsoft/ts-command-line": "4.2.5",
"@microsoft/tsdoc": "0.12.9",
"colors": "~1.2.1",
"lodash": "~4.17.5",
Expand Down
4 changes: 3 additions & 1 deletion apps/api-extractor/src/api/CompilerState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ export class CompilerState {
public static create(extractorConfig: ExtractorConfig, options?: ICompilerStateCreateOptions): CompilerState {

let tsconfig: {} | undefined = extractorConfig.overrideTsconfig;
let configBasePath: string = extractorConfig.projectFolder;
if (!tsconfig) {
// If it wasn't overridden, then load it from disk
tsconfig = JsonFile.load(extractorConfig.tsconfigFilePath);
configBasePath = path.resolve(path.dirname(extractorConfig.tsconfigFilePath));
}

const commandLine: ts.ParsedCommandLine = ts.parseJsonConfigFileContent(
tsconfig,
ts.sys,
extractorConfig.projectFolder
configBasePath
);

if (!commandLine.options.skipLibCheck && extractorConfig.skipLibCheck) {
Expand Down
10 changes: 5 additions & 5 deletions apps/rush-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"license": "MIT",
"dependencies": {
"@microsoft/node-core-library": "3.13.0",
"@microsoft/package-deps-hash": "2.2.152",
"@microsoft/stream-collator": "3.0.67",
"@microsoft/ts-command-line": "4.2.4",
"@microsoft/package-deps-hash": "2.2.153",
"@microsoft/stream-collator": "3.0.68",
"@microsoft/ts-command-line": "4.2.5",
"@pnpm/link-bins": "~1.0.1",
"@pnpm/logger": "~1.0.1",
"@yarnpkg/lockfile": "~1.0.2",
Expand All @@ -49,8 +49,8 @@
"z-schema": "~3.18.3"
},
"devDependencies": {
"@microsoft/rush-stack-compiler-3.2": "0.3.13",
"@microsoft/node-library-build": "6.0.61",
"@microsoft/rush-stack-compiler-3.2": "0.3.14",
"@microsoft/node-library-build": "6.0.62",
"@types/node": "8.5.8",
"@types/node-fetch": "1.6.9",
"@types/tar": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/rush-lib/src/cli/actions/AddAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class AddAction extends BaseRushAction {
description: '(Required) The name of the package which should be added as a dependency.'
+ ' A SemVer version specifier can be appended after an "@" sign. WARNING: Symbol characters'
+ ' are usually interpreted by your shell, so it\'s recommended to use quotes.'
+ ' For example, write "rush add --project "example@^1.2.3"" instead of "rush add --project example@^1.2.3".'
+ ' For example, write "rush add --package "example@^1.2.3"" instead of "rush add --package example@^1.2.3".'
});
this._exactFlag = this.defineFlagParameter({
parameterLongName: '--exact',
Expand Down
Loading

0 comments on commit e6afa14

Please sign in to comment.