Skip to content

[api-extractor] API Extractor 7 review branch (squashed) - #952

Closed
Pete Gonzalez (octogonz) wants to merge 3 commits into
masterfrom
pgonzal/ae-overhaul-codeflow
Closed

Pete Gonzalez (octogonz) wants to merge 3 commits into
masterfrom
pgonzal/ae-overhaul-codeflow

Conversation

@octogonz

@octogonz Pete Gonzalez (octogonz) commented Nov 20, 2018 •

Copy link
Copy Markdown
Collaborator

DO NOT MERGE

This squashed branch was created to facilitate code review of the real PR #951.

That PR has been merged now, but this PR will remain open until I've finished working through the unresolved review comments.

Delete deadwood files

Rename src -> src-old

Bringing over files

Bring over more files

Bring over more files

Bring over more files

Bring over more files

The dtsRollup generator now builds and works correctly

Initial skeleton of AstModel concept

Initial prototype of mixins approach

Fix serialization of AstMemberMixin

Add canonical selector and StaticMixin

Replace canonical selector with canonical reference, and support member overloading

Add ApiInterface and PropertySignature with declaration merging for interfaces

Rename "parameters" to "options" to avoid confusion with TypeScript function parameters

Implement parameter serialization

Deserialization is now working

Set up ApiDeclaration base class for tracking signatures

Rename StaticMixin.ts -> ApiStaticMixin.ts

Add signature

ApiParameter is now a proper ApiDeclaration

Convert ApiDeclaration to a mixin

upgrade tsdoc

rush update

Bring over AedocDefinitions.ts

Doc comments are now parsed and serialized into .api.json

ApiParameter returns docs using tryGetBlockByName

Upgrade tsdoc

rush update

Write a header at the top of the .api.json file

- Remove debug code
- Wire up the .api.json writer feature
- Remove the externalJsonFileFolders feature; if someone really needs this, we'll redesign it

Remove obsolete code from TypeScriptHelpers.ts

Update IndentedWriter to use StringBuilder

Add TSDocFlavor field

The `@packageDocumentation` comment is now being emitted again in the .d.ts rollups, sharing the same scanner as ModelBuilder

Bring over Markup.ts and MarkupElement.ts

Add tsdoc dependency for api-documenter

Update MarkdownRenderer.ts to build again

Expose ModelBuilder as public API

Temporary workaround for declarations that get emitted weirdly by the compiler

Add custom DocNode subclasses that will eliminate the need for MarkupElement

Make ApiModel and ApiPackage easier to traverse

Add ApiItem.getHierarchy()

Add ApiReleaseTagMixin

Add a test that repros the bug where EcmaScript symbols aren't rolled up properly

Fix the bug where EcmaScript symbols were not rolled up correctly

rush update

Add jest as a dependency so we can debug tests

MarkdownDocumenter.ts is now more or less working using TSDoc instead of Markup

Fix various files to use the updated TSDoc API

Add isBaseClassOf() helper for mixins

Export ReleaseTag

Add ApiMethodSignature and ApiProperty classes

Add ApiResultTypeMixin

Add ApiPropertyItem

Fix ApiProperty.kind

Set up new skeleton for MarkdownDocumenter.ts

Function parameters and return value are now documented

Generalize MarkdownRenderer to support link resolution

Implement a basic TSDoc declaration reference resolver

Rename MarkdownRenderer.ts -- MarkdownEmitter.ts

Move the test files

Rename MarkdownRenderer --> MarkdownEmitter

Convert MarkdownEmitter into a non-static class, and separate SimpleWriter into its own source file

Separate the non-TSDoc handling into a CustomMarkdownEmitter subclass

If the link text is omitted, automatically generate it based on the ApiItem name

Add ApiDeclarationMixin.getSignatureWithModifiers()

YamlDocumenter and OfficeYamlDocumenter finally build again

Move documenter classes under "documenters" folder

Move documenter classes under "documenters" folder

Minor fixes

Moving file

Updating imports

Move the core DtsRollupGenerator analysis down into ExtractorContext

Rename ModelBuilder to ApiModelGenerator

Rename ModelBuilder to ApiModelGenerator

Rename ExtractorContext --> Collector, and DtsEntry --> CollectorEntity

Rename ExtractorContext --> Collector, and DtsEntry --> CollectorEntity

Separated package state into CollectorPackage, refactored ApiModelGenerator to reuse the analysis from Collector

Bring over ReviewFileGenerator.ts

Release tag calculation is now centralized in Collector

Fix for GitHub issue #936 where doc comments were not being read for variable declarations

Fix some miscellaneous issues for YamlDocumenter.ts

Complete _writeAedocSynopsis()

Fix .d.ts rollup emitting of doc comments for packages and variable declarations

The API Review File now sorts nested members and injects _getAedocSynopsis() comments while preserving .d.ts indentation

Don't show redundant release tags in the API review file

Fix an issue where getSortKeyIgnoringUnderscore() was case-sensitive and

Fix an issue where DeclarationMetadata.needsDocumentation was false when the doc comment was completely missing

The test *.d.ts files are now built correctly

Disabled API Extractor for projects with incompatibilities:

"The symbol X was also exported as Y; this is not supported yet" (GitHub #950)

"Program Bug: The symbol GulpTask is being imported after it was already registered as non-imported" (GitHub #949)

Add `"tsdocFlavor": "AEDoc"` to projects that build with API Extractor

Add missing release tags for declarations that are now picked up by AE7

Don't report release tag errors for the default export

Fix table of contents generation

The MarkdownDocumenter and YamlDocumenter test output is now correct

Improve appearance of VariableDeclaration in .api.ts files

Delete left over files from src-old/

Add a test illustrating usage of the `@example` tag

MarkdownDocumenter now supports the `@example` tag from TSDoc

Move IndentedWriter.ts under src/api

Bring over IStringBuilder from TSDoc

Merge SimpleWriter and IndentedWriter into a single class

MarkdownDocumenter now writes `@deprecated` warnings

rush update

Manually reapply the fix from PR #948 which got lost in the merge

Improve how Sort.compareByValue() handles "null" and "undefined", and add a unit test

Add test cases that illustrate Enums being handled incorrectly

Update .api.ts files

Fix the issue where Enums were sorted incorrectly by Span.

Add a test case for access modifiers

Add AstDeclaration.modifierFlags and trim private members from *.api.ts and *.api.json
const parserContext: tsdoc.ParserContext = tsdocParser.parseString(documentedJson.docComment);

// TODO: Warn about parser errors

@iclanton Ian Clanton-Thuon (iclanton) Nov 26, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to happen in a subsequent PR? #Pending

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning to do it after merging this PR, but before the non-beta release. It's not difficult, but it's something I want to code review in isolation, because the AE6 design isn't great and possibly will have changes.


In reply to: 236468054 [](ancestors = 236468054)

case ts.SyntaxKind.IndexSignature:
case ts.SyntaxKind.TypeAliasDeclaration:
case ts.SyntaxKind.VariableDeclaration:
default:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these intentionally not do anything?

@octogonz Pete Gonzalez (octogonz) Nov 27, 2018 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to finish some of them before we graduate API Extractor 7 from "beta" status. The weirder stuff like ConstructorSignature can be procrastinated since they weren't supported in AE6 either, and there are design questions about how we would document them. The DocFx templates probably need some work as well.


In reply to: 236471748 [](ancestors = 236471748)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@KevinTCoughlin

Copy link
Copy Markdown
Member

keco yuan (@keco) is added to the review. #Closed

@octogonz Pete Gonzalez (octogonz) changed the title [api-extractor] API Extractor 7 release branch (squashed) [api-extractor] API Extractor 7 review branch (squashed) Nov 29, 2018
@octogonz

Copy link
Copy Markdown
Collaborator Author

The original PR branch that this was based on has already been merged.

PR #985 implements most of the code review feedback. Only a few items are now remaining.

@octogonz

Copy link
Copy Markdown
Collaborator Author

I'm closing this branch because all the feedback has now been addressed, or is being tracked by a separate GitHub issue.

@octogonz
Pete Gonzalez (octogonz) deleted the pgonzal/ae-overhaul-codeflow branch January 20, 2019 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants