Skip to content

Commit 6617bf4

Browse files
committed
Merge branch 'master' into ianc/node-12-in-test-matrix
2 parents e5e80f4 + 35339e2 commit 6617bf4

350 files changed

Lines changed: 4543 additions & 1351 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.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: New Issue
3+
about: Information needed when opening a new issue
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc. ##
10+
11+
**Is this a feature or a bug?**
12+
13+
- [ ] Feature
14+
- [ ] Bug
15+
16+
**Please describe the actual behavior.**
17+
18+
**If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.**
19+
20+
**What is the expected behavior?**
21+
22+
**If this is a bug, please provide the tool version, Node.js version, and OS.**
23+
24+
* **Tool:**
25+
* **Tool Version:**
26+
* **Node Version:**
27+
* **Is this a LTS version?**
28+
* **Have you tested on a LTS version?**
29+
* **OS:**

apps/api-documenter/CHANGELOG.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
{
22
"name": "@microsoft/api-documenter",
33
"entries": [
4+
{
5+
"version": "7.3.10",
6+
"tag": "@microsoft/api-documenter_v7.3.10",
7+
"date": "Tue, 23 Jul 2019 01:13:01 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "Fix an issue where generated filenames sometimes mcontained invalid characters"
12+
}
13+
],
14+
"dependency": [
15+
{
16+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.4\" from `0.1.12` to `0.1.13`"
17+
},
18+
{
19+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.73` to `6.0.74`"
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"version": "7.3.9",
26+
"tag": "@microsoft/api-documenter_v7.3.9",
27+
"date": "Mon, 22 Jul 2019 19:13:10 GMT",
28+
"comments": {
29+
"dependency": [
30+
{
31+
"comment": "Updating dependency \"@microsoft/api-extractor-model\" from `7.2.0` to `7.3.0`"
32+
},
33+
{
34+
"comment": "Updating dependency \"@microsoft/rush-stack-compiler-3.4\" from `0.1.11` to `0.1.12`"
35+
},
36+
{
37+
"comment": "Updating dependency \"@microsoft/node-library-build\" from `6.0.72` to `6.0.73`"
38+
}
39+
]
40+
}
41+
},
442
{
543
"version": "7.3.8",
644
"tag": "@microsoft/api-documenter_v7.3.8",

apps/api-documenter/CHANGELOG.md

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

3-
This log was last generated on Fri, 12 Jul 2019 19:12:46 GMT and should not be manually modified.
3+
This log was last generated on Tue, 23 Jul 2019 01:13:01 GMT and should not be manually modified.
4+
5+
## 7.3.10
6+
Tue, 23 Jul 2019 01:13:01 GMT
7+
8+
### Patches
9+
10+
- Fix an issue where generated filenames sometimes mcontained invalid characters
11+
12+
## 7.3.9
13+
Mon, 22 Jul 2019 19:13:10 GMT
14+
15+
*Version update only*
416

517
## 7.3.8
618
Fri, 12 Jul 2019 19:12:46 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.3.8",
3+
"version": "7.3.10",
44
"description": "Read JSON files from api-extractor, generate documentation pages",
55
"repository": {
66
"type": "git",
@@ -15,20 +15,20 @@
1515
"api-documenter": "./bin/api-documenter"
1616
},
1717
"dependencies": {
18-
"@microsoft/api-extractor-model": "7.2.0",
18+
"@microsoft/api-extractor-model": "7.3.0",
1919
"@microsoft/node-core-library": "3.13.0",
2020
"@microsoft/ts-command-line": "4.2.6",
21-
"@microsoft/tsdoc": "0.12.9",
21+
"@microsoft/tsdoc": "0.12.10",
2222
"colors": "~1.2.1",
2323
"js-yaml": "~3.13.1"
2424
},
2525
"devDependencies": {
26-
"@microsoft/rush-stack-compiler-3.2": "0.3.24",
27-
"@microsoft/node-library-build": "6.0.72",
26+
"@microsoft/rush-stack-compiler-3.4": "0.1.13",
27+
"@microsoft/node-library-build": "6.0.74",
28+
"@types/jest": "23.3.11",
2829
"@types/js-yaml": "3.12.1",
2930
"@types/node": "8.5.8",
30-
"gulp": "~3.9.1",
31-
"@types/jest": "23.3.11",
31+
"gulp": "~4.0.2",
3232
"jest": "~23.6.0"
3333
}
3434
}

apps/api-documenter/src/documenters/MarkdownDocumenter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ export class MarkdownDocumenter {
791791
let baseName: string = '';
792792
for (const hierarchyItem of apiItem.getHierarchy()) {
793793
// For overloaded methods, add a suffix such as "MyClass.myMethod_2".
794-
let qualifiedName: string = hierarchyItem.displayName;
794+
let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);
795795
if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
796796
if (hierarchyItem.overloadIndex > 1) {
797797
// Subtract one for compatibility with earlier releases of API Documenter.
@@ -805,13 +805,13 @@ export class MarkdownDocumenter {
805805
case ApiItemKind.EntryPoint:
806806
break;
807807
case ApiItemKind.Package:
808-
baseName = PackageName.getUnscopedName(hierarchyItem.displayName);
808+
baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));
809809
break;
810810
default:
811811
baseName += '.' + qualifiedName;
812812
}
813813
}
814-
return baseName.toLowerCase() + '.md';
814+
return baseName + '.md';
815815
}
816816

817817
private _getLinkFilenameForApiItem(apiItem: ApiItem): string {

apps/api-documenter/src/documenters/YamlDocumenter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,19 +693,19 @@ export class YamlDocumenter {
693693
case ApiItemKind.EntryPoint:
694694
break;
695695
case ApiItemKind.Package:
696-
result += PackageName.getUnscopedName(current.displayName);
696+
result += Utilities.getSafeFilenameForName(PackageName.getUnscopedName(current.displayName));
697697
break;
698698
default:
699699
if (current.parent && current.parent.kind === ApiItemKind.EntryPoint) {
700700
result += '/';
701701
} else {
702702
result += '.';
703703
}
704-
result += current.displayName;
704+
result += Utilities.getSafeFilenameForName(current.displayName);
705705
break;
706706
}
707707
}
708-
return path.join(this._outputFolder, result.toLowerCase() + '.yml');
708+
return path.join(this._outputFolder, result + '.yml');
709709
}
710710

711711
private _deleteOldOutputFiles(): void {

apps/api-documenter/src/utils/Utilities.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from '@microsoft/api-extractor-model';
88

99
export class Utilities {
10+
private static readonly _badFilenameCharsRegExp: RegExp = /[^a-z0-9_\-\.]/ig;
1011
/**
1112
* Generates a concise signature for a function. Example: "getArea(width, height)"
1213
*/
@@ -16,4 +17,13 @@ export class Utilities {
1617
}
1718
return apiItem.displayName;
1819
}
20+
21+
/**
22+
* Converts bad filename characters to underscores.
23+
*/
24+
public static getSafeFilenameForName(name: string): string {
25+
// TODO: This can introduce naming collisions.
26+
// We will fix that as part of https://github.com/microsoft/web-build-tools/issues/1308
27+
return name.replace(Utilities._badFilenameCharsRegExp, '_').toLowerCase();
28+
}
1929
}

apps/api-documenter/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.2/includes/tsconfig-node.json",
2+
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.4/includes/tsconfig-node.json",
33
"compilerOptions": {
44
"types": [
55
"jest"

apps/api-documenter/tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "@microsoft/rush-stack-compiler-3.2/includes/tslint.json"
2+
"extends": "@microsoft/rush-stack-compiler-3.4/includes/tslint.json"
33
}

apps/api-extractor-model/CHANGELOG.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
22
"name": "@microsoft/api-extractor-model",
33
"entries": [
4+
{
5+
"version": "7.3.0",
6+
"tag": "@microsoft/api-extractor-model_v7.3.0",
7+
"date": "Mon, 22 Jul 2019 19:13:10 GMT",
8+
"comments": {
9+
"minor": [
10+
{
11+
"comment": "Rename `ApiItem.canonicalReference` to `.containerKey`; rename `ApiItemContainerMixin.tryGetMember()` to `.tryGetMemberByKey()`; rename `Api___.getCanonicalReference()` to `.getContainerKey()`"
12+
}
13+
]
14+
}
15+
},
416
{
517
"version": "7.2.0",
618
"tag": "@microsoft/api-extractor-model_v7.2.0",

0 commit comments

Comments
 (0)