-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Switch to Promises everywhere. Adopt Node v4 ES6 (#648)
* feat(core): Switch to Promises everywhere. Adopt Node v4 ES6 Big changes: * Uses template strings where appropriate * Config and argument parsing is unified and there is no such thing as formatterOptions anymore. All user-passed options go through mergeConfig. * The node API surface changed (again): `buildSync` is removed, building operations return Promises. * Now using Flow for internal type annotations. More changes: * Remove buildSync command * feat(inference): Partially implement object shorthand support * Refs #649 * Use Flow annotations to enforce types * Keep flow but switch to comment syntax * Clarify types * More flow improvements * Turn server into class * LinkerStack becomes class too * Fix comment description type * Run flow on lint * Many more flow fixes * More intense flow refactoring * Simplify inference steps * Update inference tests, flow errors down to 1 * Continue refining types * Fix more flow issues * Use 'use strict' everywhere * Make 'ast' property configurable * Fix many tests * Fix more tests * Fix more tests * Fix augments * Test Markdown meta support * Improve test coverage * Switch back from for of to for for speed
- Loading branch information
Showing
225 changed files
with
4,506 additions
and
13,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ignore] | ||
.*node_modules/.cache/.* | ||
.*node_modules/conventional-changelog-core/test/fixtures/.* | ||
.*/test/fixture/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
declarations/ | ||
|
||
[options] | ||
module.ignore_non_literal_requires=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
declare type DocumentationConfig = { | ||
polyglot?: boolean, | ||
inferPrivate?: boolean, | ||
noPackage?: boolean, | ||
toc?: Array<Object>, | ||
paths?: { [key: string]: number }, | ||
defaultGlobals?: boolean, | ||
defaultGlobalsEnvs?: Array<string>, | ||
external?: Array<string>, | ||
theme: string, | ||
requireExtension?: Array<string>, | ||
parseExtension: Array<string> | ||
}; | ||
|
||
declare type InputsConfig = { | ||
inputs: Array<SourceFile>, | ||
config: DocumentationConfig | ||
}; | ||
|
||
declare type CommentError = { | ||
message: string, | ||
commentLineNumber?: number | ||
}; | ||
|
||
declare type DoctrineType = { | ||
elements?: Array<DoctrineType>, | ||
expression?: DoctrineType, | ||
applications?: Array<DoctrineType>, | ||
type: string, | ||
name?: string | ||
}; | ||
|
||
declare type CommentLoc = { | ||
start: { | ||
line: number | ||
}, | ||
end: { | ||
line: number | ||
} | ||
}; | ||
|
||
declare type SourceFile = { | ||
source?: string, | ||
file: string | ||
}; | ||
|
||
declare type CommentContext = { | ||
sortKey: string, | ||
file: string, | ||
ast: Object, | ||
loc: CommentLoc, | ||
code: string, | ||
github?: CommentContextGitHub | ||
}; | ||
|
||
declare type CommentContextGitHub = { | ||
path: string, | ||
url: string | ||
}; | ||
|
||
declare type CommentTag = { | ||
name?: string, | ||
title: string, | ||
description?: Object, | ||
default?: any, | ||
lineNumber?: number, | ||
type?: DoctrineType, | ||
properties?: Array<CommentTag> | ||
}; | ||
|
||
declare type CommentMembers = { | ||
static: Array<Comment>, | ||
instance: Array<Comment>, | ||
events: Array<Comment> | ||
}; | ||
|
||
declare type CommentExample = { | ||
caption?: string, | ||
description?: Object | ||
}; | ||
|
||
declare type Remark = { | ||
type: string, | ||
children: Array<Object> | ||
}; | ||
|
||
declare type Comment = { | ||
errors: Array<CommentError>, | ||
tags: Array<CommentTag>, | ||
|
||
augments: Array<CommentTag>, | ||
errors: Array<CommentExample>, | ||
examples: Array<CommentExample>, | ||
params: Array<CommentTag>, | ||
properties: Array<CommentTag>, | ||
returns: Array<CommentTag>, | ||
sees: Array<CommentTag>, | ||
throws: Array<CommentTag>, | ||
todos: Array<CommentTag>, | ||
|
||
description?: Remark, | ||
summary?: Remark, | ||
deprecated?: Remark, | ||
classdesc?: Remark, | ||
|
||
members: CommentMembers, | ||
|
||
name?: string, | ||
kind?: string, | ||
memberof?: string, | ||
scope?: string, | ||
access?: string, | ||
alias?: string, | ||
|
||
copyright?: string, | ||
author?: string, | ||
license?: string, | ||
version?: string, | ||
since?: string, | ||
lends?: string, | ||
override?: boolean, | ||
|
||
type?: DoctrineType, | ||
|
||
context: CommentContext, | ||
|
||
path?: Array<{ | ||
name: string, | ||
scope: string | ||
}> | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.