Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-extractor] API Extractor 7 release branch #951

Merged
merged 140 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
4de49bf
Fix spacing
pgonzal Oct 18, 2018
f06a01e
Delete deadwood files
pgonzal Oct 18, 2018
cc12e32
Rename src -> src-old
pgonzal Oct 18, 2018
cb86e93
Bringing over files
pgonzal Oct 18, 2018
77e1f75
Bring over more files
pgonzal Oct 19, 2018
c4443d0
Bring over more files
pgonzal Oct 19, 2018
eef0081
Bring over more files
pgonzal Oct 19, 2018
e5aa1f0
Bring over more files
pgonzal Oct 19, 2018
1534b3b
The dtsRollup generator now builds and works correctly
pgonzal Oct 19, 2018
cb30a4c
Initial skeleton of AstModel concept
pgonzal Oct 19, 2018
a624a87
Initial prototype of mixins approach
pgonzal Oct 20, 2018
228d890
Fix serialization of AstMemberMixin
pgonzal Oct 20, 2018
834cdfb
Add canonical selector and StaticMixin
pgonzal Oct 20, 2018
368cfbb
Replace canonical selector with canonical reference, and support memb…
pgonzal Oct 22, 2018
4dc3b68
Add ApiInterface and PropertySignature with declaration merging for i…
pgonzal Oct 22, 2018
6344c02
Rename "parameters" to "options" to avoid confusion with TypeScript f…
pgonzal Oct 22, 2018
74af4f5
Implement parameter serialization
pgonzal Oct 22, 2018
f15cbf7
Deserialization is now working
pgonzal Oct 23, 2018
c250041
Set up ApiDeclaration base class for tracking signatures
pgonzal Oct 23, 2018
62bd1c8
Rename StaticMixin.ts -> ApiStaticMixin.ts
pgonzal Oct 23, 2018
e2dc0a2
Add signature
pgonzal Oct 23, 2018
672380d
ApiParameter is now a proper ApiDeclaration
pgonzal Oct 22, 2018
23d9a16
Convert ApiDeclaration to a mixin
pgonzal Oct 23, 2018
160e2a0
upgrade tsdoc
pgonzal Oct 26, 2018
f9a7106
rush update
pgonzal Oct 26, 2018
1b89082
Bring over AedocDefinitions.ts
pgonzal Oct 26, 2018
048776d
Doc comments are now parsed and serialized into .api.json
pgonzal Oct 26, 2018
a56368e
ApiParameter returns docs using tryGetBlockByName
pgonzal Oct 27, 2018
fb2e559
Upgrade tsdoc
pgonzal Oct 27, 2018
1018402
Merge remote-tracking branch 'remotes/origin/master' into pgonzal/ae-…
pgonzal Oct 27, 2018
623187d
rush update
pgonzal Oct 27, 2018
b8d9506
Write a header at the top of the .api.json file
pgonzal Oct 27, 2018
4a86ae6
- Remove debug code
pgonzal Oct 27, 2018
50d31a4
Remove obsolete code from TypeScriptHelpers.ts
pgonzal Oct 27, 2018
8d3b518
Update IndentedWriter to use StringBuilder
pgonzal Oct 27, 2018
7d32e4f
Add TSDocFlavor field
pgonzal Oct 27, 2018
9c89940
The `@packageDocumentation` comment is now being emitted again in the…
pgonzal Oct 27, 2018
1d6230a
Bring over Markup.ts and MarkupElement.ts
pgonzal Oct 28, 2018
c19f4c0
Add tsdoc dependency for api-documenter
pgonzal Oct 28, 2018
911a017
Update MarkdownRenderer.ts to build again
pgonzal Oct 28, 2018
80209d9
Expose ModelBuilder as public API
pgonzal Oct 28, 2018
d61b472
Temporary workaround for declarations that get emitted weirdly by the…
pgonzal Oct 29, 2018
fb9cbdf
Add custom DocNode subclasses that will eliminate the need for Markup…
pgonzal Oct 30, 2018
57a4e17
Make ApiModel and ApiPackage easier to traverse
pgonzal Oct 30, 2018
1d0f07a
Add ApiItem.getHierarchy()
pgonzal Oct 30, 2018
de17297
Add ApiReleaseTagMixin
pgonzal Oct 30, 2018
80d9f5e
Add a test that repros the bug where EcmaScript symbols aren't rolled…
pgonzal Nov 1, 2018
1007462
Fix the bug where EcmaScript symbols were not rolled up correctly
pgonzal Nov 1, 2018
8f14183
Merge remote-tracking branch 'remotes/origin/master' into pgonzal/ae-…
pgonzal Nov 1, 2018
b503b56
rush update
pgonzal Nov 1, 2018
2add3cc
Add jest as a dependency so we can debug tests
pgonzal Nov 2, 2018
8fc4e1c
MarkdownDocumenter.ts is now more or less working using TSDoc instead…
pgonzal Nov 3, 2018
e4878dc
Fix various files to use the updated TSDoc API
pgonzal Nov 3, 2018
2187260
Add isBaseClassOf() helper for mixins
pgonzal Nov 3, 2018
975bc41
Export ReleaseTag
pgonzal Nov 6, 2018
97c3091
Add ApiMethodSignature and ApiProperty classes
pgonzal Nov 6, 2018
a5945e5
Add ApiResultTypeMixin
pgonzal Nov 7, 2018
6012b2b
Add ApiPropertyItem
pgonzal Nov 7, 2018
3b8263e
Fix ApiProperty.kind
pgonzal Nov 7, 2018
541b5fb
Set up new skeleton for MarkdownDocumenter.ts
pgonzal Nov 7, 2018
1a008ce
Function parameters and return value are now documented
pgonzal Nov 8, 2018
0e3315b
Generalize MarkdownRenderer to support link resolution
pgonzal Nov 8, 2018
1a9432f
Implement a basic TSDoc declaration reference resolver
pgonzal Nov 9, 2018
d1425e3
Rename MarkdownRenderer.ts -- MarkdownEmitter.ts
pgonzal Nov 9, 2018
2f7d05a
Move the test files
pgonzal Nov 9, 2018
9d0ebb4
Rename MarkdownRenderer --> MarkdownEmitter
pgonzal Nov 9, 2018
60bd769
Convert MarkdownEmitter into a non-static class, and separate SimpleW…
pgonzal Nov 9, 2018
e6e2b83
Separate the non-TSDoc handling into a CustomMarkdownEmitter subclass
pgonzal Nov 9, 2018
83a904a
If the link text is omitted, automatically generate it based on the A…
pgonzal Nov 9, 2018
24696a9
Add ApiDeclarationMixin.getSignatureWithModifiers()
pgonzal Nov 11, 2018
eaf8b55
YamlDocumenter and OfficeYamlDocumenter finally build again
pgonzal Nov 11, 2018
3574f10
Move documenter classes under "documenters" folder
pgonzal Nov 11, 2018
9b8a6ca
Move documenter classes under "documenters" folder
pgonzal Nov 11, 2018
44cbc2e
Minor fixes
pgonzal Nov 11, 2018
a3144f4
Moving file
pgonzal Nov 12, 2018
3287c67
Updating imports
pgonzal Nov 12, 2018
ac58d93
Move the core DtsRollupGenerator analysis down into ExtractorContext
pgonzal Nov 12, 2018
d561e9c
Rename ModelBuilder to ApiModelGenerator
pgonzal Nov 12, 2018
61165ae
Rename ModelBuilder to ApiModelGenerator
pgonzal Nov 12, 2018
8488d19
Rename ExtractorContext --> Collector, and DtsEntry --> CollectorEntity
pgonzal Nov 12, 2018
f9a6387
Rename ExtractorContext --> Collector, and DtsEntry --> CollectorEntity
pgonzal Nov 12, 2018
c9f529a
Separated package state into CollectorPackage, refactored ApiModelGen…
pgonzal Nov 12, 2018
1eec8ad
Bring over ReviewFileGenerator.ts
pgonzal Nov 14, 2018
a444a90
Release tag calculation is now centralized in Collector
pgonzal Nov 15, 2018
b5a1ca7
Fix for GitHub issue #936 where doc comments were not being read for …
pgonzal Nov 14, 2018
364a590
Fix some miscellaneous issues for YamlDocumenter.ts
pgonzal Nov 15, 2018
c94a245
Complete _writeAedocSynopsis()
pgonzal Nov 15, 2018
0049d77
Fix .d.ts rollup emitting of doc comments for packages and variable d…
pgonzal Nov 16, 2018
be454d8
The API Review File now sorts nested members and injects _getAedocSyn…
pgonzal Nov 17, 2018
4b49def
Don't show redundant release tags in the API review file
pgonzal Nov 16, 2018
60a98be
Fix an issue where getSortKeyIgnoringUnderscore() was case-sensitive and
pgonzal Nov 17, 2018
32ab468
Fix an issue where DeclarationMetadata.needsDocumentation was false w…
pgonzal Nov 17, 2018
75463b6
The test *.d.ts files are now built correctly
pgonzal Nov 17, 2018
16f00c9
Disabled API Extractor for projects with incompatibilities:
pgonzal Nov 17, 2018
92dd389
Add `"tsdocFlavor": "AEDoc"` to projects that build with API Extractor
pgonzal Nov 17, 2018
15f7512
Add missing release tags for declarations that are now picked up by AE7
pgonzal Nov 17, 2018
529071a
Don't report release tag errors for the default export
pgonzal Nov 17, 2018
768e828
Fix table of contents generation
pgonzal Nov 17, 2018
50cd8ad
The MarkdownDocumenter and YamlDocumenter test output is now correct
pgonzal Nov 17, 2018
ba84389
Improve appearance of VariableDeclaration in .api.ts files
pgonzal Nov 17, 2018
04fc03b
Delete left over files from src-old/
pgonzal Nov 17, 2018
3265f13
Add a test illustrating usage of the `@example` tag
pgonzal Nov 20, 2018
dccd009
MarkdownDocumenter now supports the `@example` tag from TSDoc
pgonzal Nov 20, 2018
796a68e
Move IndentedWriter.ts under src/api
pgonzal Nov 20, 2018
792a252
Bring over IStringBuilder from TSDoc
pgonzal Nov 20, 2018
af43975
Merge SimpleWriter and IndentedWriter into a single class
pgonzal Nov 20, 2018
fc3ff0e
MarkdownDocumenter now writes `@deprecated` warnings
pgonzal Nov 20, 2018
db98a39
Merge remote-tracking branch 'remotes/origin/master' into pgonzal/ae-…
pgonzal Nov 21, 2018
dfe7800
rush update
pgonzal Nov 21, 2018
6630d48
Manually reapply the fix from PR #948 which got lost in the merge
pgonzal Nov 21, 2018
beca022
Improve how Sort.compareByValue() handles "null" and "undefined", and…
pgonzal Nov 21, 2018
f2e8997
Add test cases that illustrate Enums being handled incorrectly
pgonzal Nov 21, 2018
0e539bd
Update .api.ts files
pgonzal Nov 21, 2018
2f1bdcb
Fix the issue where Enums were sorted incorrectly by Span.
pgonzal Nov 21, 2018
9f3535b
Add a test case for access modifiers
pgonzal Nov 22, 2018
c97680a
Add AstDeclaration.modifierFlags and trim private members from *.api.…
pgonzal Nov 22, 2018
8fce858
Add PackageJsonLookup.loadOwnPackageJson() API to node-core-library
pgonzal Nov 27, 2018
aa98b9b
Update various projects to use PackageJsonLookup.loadOwnPackageJson()
pgonzal Nov 27, 2018
82b636c
Add Extractor.version API
pgonzal Nov 27, 2018
d1fed5e
Implement preliminary support for reading/writing tsdoc-metadata.json
pgonzal Nov 27, 2018
da7e110
Fix an issue where PackageMetadataManager was getting consulted for f…
pgonzal Nov 27, 2018
ffa7023
Improve logging
pgonzal Nov 27, 2018
f035e73
Implement enums
pgonzal Nov 27, 2018
3dd2d37
PR feedback: eliminate pathToPackageJsonFolder parameter
pgonzal Nov 28, 2018
6990779
Remove obsolete code that was asking for "tsdocFlavor"
pgonzal Nov 28, 2018
ff8ffc6
Replace ApiResultTypeMixin with new Excerpt concept
pgonzal Nov 28, 2018
952d1c1
ApiModelGenerator should trim @internal and @alpha entries, since the…
pgonzal Nov 28, 2018
25d834c
YamlDocumenter now supports MethodSignature, PropertySignature, and e…
pgonzal Nov 28, 2018
5ddbde1
Convert ExcerptName to use camelCase and be a key for IDeclarationExc…
pgonzal Nov 28, 2018
177c436
PR feedback
pgonzal Nov 28, 2018
45716f8
PR feedback: disableMergingForNextToken replaces lastReferencedIndex
pgonzal Nov 28, 2018
3e3b1ec
Merge pull request #957 from Microsoft/susurana/extendssupport
pgonzal Nov 28, 2018
03b326c
Merge pull request #963 from natalieethell/addUIDsToExtends
pgonzal Nov 28, 2018
12672a3
Merge remote-tracking branch 'remotes/origin/master' into pgonzal/ae-…
pgonzal Nov 29, 2018
8edf5e0
rush update --full
pgonzal Nov 29, 2018
dc45146
rebuild after merge
pgonzal Nov 29, 2018
821aa9b
Temporarily pin back api-extractor for RSC and GCB-typescript, since …
pgonzal Nov 29, 2018
a7424d3
rush update
pgonzal Nov 29, 2018
1518121
Prepare to publish api-extractor 7.0.0
pgonzal Nov 29, 2018
9f479e5
Since cyclic dependencies are turned on, the API review files get tem…
pgonzal Nov 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 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": "1.5.59",
"version": "6.0.0",
"description": "Read JSON files from api-extractor, generate documentation pages",
"repository": {
"type": "git",
Expand All @@ -18,6 +18,7 @@
"@microsoft/api-extractor": "6.3.0",
"@microsoft/node-core-library": "3.7.0",
"@microsoft/ts-command-line": "4.2.2",
"@microsoft/tsdoc": "0.12.4",
"colors": "~1.2.1",
"js-yaml": "~3.9.1"
},
Expand All @@ -27,6 +28,7 @@
"@types/js-yaml": "3.9.1",
"@types/node": "8.5.8",
"gulp": "~3.9.1",
"@types/jest": "21.1.10"
"@types/jest": "21.1.10",
"jest": "~22.4.3"
}
}
12 changes: 5 additions & 7 deletions apps/api-documenter/src/cli/BaseAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import {
CommandLineAction,
CommandLineStringParameter
} from '@microsoft/ts-command-line';

import { FileSystem } from '@microsoft/node-core-library';

import { DocItemSet } from '../utils/DocItemSet';
import { ApiModel } from '@microsoft/api-extractor';

export abstract class BaseAction extends CommandLineAction {
protected inputFolder: string;
Expand Down Expand Up @@ -38,8 +36,8 @@ export abstract class BaseAction extends CommandLineAction {
});
}

protected buildDocItemSet(): DocItemSet {
const docItemSet: DocItemSet = new DocItemSet();
protected buildApiModel(): ApiModel {
const apiModel: ApiModel = new ApiModel();

this.inputFolder = this._inputFolderParameter.value || './input';
if (!FileSystem.exists(this.inputFolder)) {
Expand All @@ -53,10 +51,10 @@ export abstract class BaseAction extends CommandLineAction {
if (filename.match(/\.api\.json$/i)) {
console.log(`Reading ${filename}`);
const filenamePath: string = path.join(this.inputFolder, filename);
docItemSet.loadApiJsonFile(filenamePath);
apiModel.loadPackage(filenamePath);
}
}

return docItemSet;
return apiModel;
}
}
8 changes: 4 additions & 4 deletions apps/api-documenter/src/cli/MarkdownAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { DocItemSet } from '../utils/DocItemSet';
import { MarkdownDocumenter } from '../markdown/MarkdownDocumenter';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';
import { ApiModel } from '@microsoft/api-extractor';

export class MarkdownAction extends BaseAction {
constructor(parser: ApiDocumenterCommandLine) {
Expand All @@ -17,8 +17,8 @@ export class MarkdownAction extends BaseAction {
}

protected onExecute(): Promise<void> { // override
const docItemSet: DocItemSet = this.buildDocItemSet();
const markdownDocumenter: MarkdownDocumenter = new MarkdownDocumenter(docItemSet);
const apiModel: ApiModel = this.buildApiModel();
const markdownDocumenter: MarkdownDocumenter = new MarkdownDocumenter(apiModel);
markdownDocumenter.generateFiles(this.outputFolder);
return Promise.resolve();
}
Expand Down
12 changes: 6 additions & 6 deletions apps/api-documenter/src/cli/YamlAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {

import { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { DocItemSet } from '../utils/DocItemSet';

import { YamlDocumenter } from '../yaml/YamlDocumenter';
import { OfficeYamlDocumenter } from '../yaml/OfficeYamlDocumenter';
import { YamlDocumenter } from '../documenters/YamlDocumenter';
import { OfficeYamlDocumenter } from '../documenters/OfficeYamlDocumenter';
import { ApiModel } from '@microsoft/api-extractor';

export class YamlAction extends BaseAction {
private _officeParameter: CommandLineFlagParameter;
Expand All @@ -35,11 +35,11 @@ export class YamlAction extends BaseAction {
}

protected onExecute(): Promise<void> { // override
const docItemSet: DocItemSet = this.buildDocItemSet();
const apiModel: ApiModel = this.buildApiModel();

const yamlDocumenter: YamlDocumenter = this._officeParameter.value
? new OfficeYamlDocumenter(docItemSet, this.inputFolder)
: new YamlDocumenter(docItemSet);
? new OfficeYamlDocumenter(apiModel, this.inputFolder)
: new YamlDocumenter(apiModel);

yamlDocumenter.generateFiles(this.outputFolder);
return Promise.resolve();
Expand Down
Loading