752 Commits

Author SHA1 Message Date
Tom MacWright
7ccf89d83c Fix linkerStack resolution order (#564) 2016-10-11 18:08:13 -04:00
Tom MacWright
145c199a68 Update package for beta11 v4.0.0-beta11 2016-10-10 20:10:23 -04:00
Tom MacWright
324e0b9c53 Update changelog for beta11 2016-10-10 20:10:07 -04:00
Erik Arvidsson
384ccbcf5e Fix inferring return type of var function (#545)
I accidentally broke the detection of the return type in:

```js
var f = function(x: number): boolean {}
```
2016-10-10 17:18:07 -04:00
Tom MacWright
df8efa4d3d Update dependencies (#560)
* also deprecated --private option in favor of --access
2016-10-10 17:16:31 -04:00
Erik Arvidsson
803f4a8465 Update Babel deps (#561)
Fixes #551
2016-10-09 14:48:05 -07:00
Christoph Kettelhoit
473a7a2dce Membership inference improvements (#558)
* Add test for memberof normalization: @memberof Foo#, @memberof Foo.prototype

* Add memberof normalization for @memberof Foo#, @memberof Foo.prototype

* Add test to infer membership of properties defined inside constructor

* Added inference of membership for properties defined inside constructor

* Fix Membership spelling, switch let for var to keep node compat broad

* Change memberof normalization to use RegExp
2016-10-05 15:22:13 -04:00
Tom MacWright
58c6892c22 Fix parameter sorting: avoid nesting errors and keep params together 2016-09-21 11:47:07 -04:00
Erik Arvidsson
0c3f17872f Update docs for which files are included (#548)
* Update docs for which files are included

* Copyedits

* More copyedits
2016-09-19 13:00:57 -04:00
Erik Arvidsson
16da8bb225 Infer optional record fields in object types (#547)
This is done with Doctrine's OptionalType, which Doctrine is only
using for parameter types as of now.

Towards #512
2016-09-19 12:54:56 -04:00
Erik Arvidsson
71922c7c8a Handle assignments in document exported (#544)
This improves detection of cases where we have:

```js
export const f = function () {};
export const o = { ... };
```

and similarly indirection using default/named.

```js
const f = function () {};
export {f};
```

Fixes #543
2016-09-19 12:53:18 -04:00
Erik Arvidsson
8ea9e834e5 Expose formatParameter as a formatter (#546)
This allows custom themes to override it
2016-09-14 17:06:14 -07:00
Erik Arvidsson
2eff668edf Infer type for variable declarations and class properties (#540)
This infers the type from Flow type annotations for variable
declarations and class properties.

This also moves the logic for setting the `type` for typedefs
to the same type inferrer.

Also infer the type for statements like:

```js
const x = 42;
```

same as:

```js
const x: number = 42;
```
2016-09-13 12:40:24 -07:00
Erik Arvidsson
a71bb03681 Fix sort order alpha (#542)
The old code didn't work correctly with regards to making the sort
aware of memberof.
2016-09-12 16:41:28 -07:00
Erik Arvidsson
e11c1ab3b5 Change document-exported to traverse the code (#533)
* Change document-exported to traverse the code

Instead of traversing over all input files this changes
documentExported to traverse from the exports in the input files,
loading, parsing and traversing the module specifier as needed.

Fixes #515

* Move parseToAst to its own module

* Skip non export declarations for speed
2016-09-09 11:07:26 -04:00
Erik Arvidsson
7809669751 Update babel dependencies (#536)
This is to pick up bug fix for #523

Fixes #523
2016-09-08 18:06:34 -07:00
Erik Arvidsson
a5ac4a798c Add a --sort-order option (#535)
Valid values for the `--sort-order` flag are `"source"` (default) and
`"alpha"`. When set to `"alpa"` the order of the entries in the docs
are sorted alphabetically.

Fixes #534
2016-09-08 18:26:02 -04:00
Erik Arvidsson
85ff818714 Fix issue with watch and shallow (#532)
When doing `--shallow --watch` we called `generator` (which
synchronously called `updateWatcher`/`addNewFiles`) but the watcher has
not been created yet. Instead create the watcher first before
`generator` is called.

Fixes #531
2016-09-08 18:14:13 -04:00
Erik Arvidsson
b1f288dab9 Fix invalid ES6 test with multiple default exports (#529)
The test had 2 default exports. Only 1 is allowed!
Move the second default export to its own test fixture.
2016-09-06 11:27:32 -07:00
Erik Arvidsson
895775df7b Cleanup literal types (#522)
This updates Doctrine to 1.3 to pick up its support for literal types
(doctrine still does not support boolean literals types).

Towards #373
2016-09-04 16:43:28 -04:00
ikokostya
28d51fcaf8 Fix github link generation for Node.js 6 (#524)
In Node.js 6 additional assertions was added in path module:
https://github.com/nodejs/node/pull/5348
2016-09-04 16:41:06 -04:00
Tom MacWright
0a97e0eccc Continue to close the gap with flow (#520)
* Adds test support for flow difference
* New support for FunctionTypeAnnotation
* New support for ObjectTypeAnnotation
* New support for MixedTypeAnnotation
2016-09-01 16:32:47 -04:00
Erik Arvidsson
d2b93aee94 Add support for null and void types (#519)
This adds support for `void` and `null` in type annotations:

```js
function f(): void {}
function g(): null {
  return null;
}
```

Towards #512
2016-09-01 15:18:42 -04:00
Erik Arvidsson
6b981e0780 Add the type property to typedef comments (#517)
* Add the type property to typedef comments

When using Flow type aliases we didn't add the `type` property
to the JSDoc comment for the inferred `typedef`.

Fixes #516

* Rename files and update test expectations
2016-09-01 10:12:30 -04:00
Erik Arvidsson
b469bb7079 Fix the name of infer membership for non named export default (#508)
When inferring the membership of a class that is an unnamed default
export we hit a null pointer exception.

```js
export default class {
  /** */
  member() {}
}
```

Inferring the name for the class above fails

Fixes #506
2016-08-25 11:09:49 -04:00
Erik Arvidsson
dc846b4219 Handle flow tuple syntax (#511)
This fixes issues with Flow tuples `[T, V]` and
Flow array types `T[]`.

Fixes #510
2016-08-25 11:08:32 -04:00
Erik Arvidsson
cec558ddd5 Merge pull request #507 from arv/update-test-expectations
Update test expectations
2016-08-24 12:40:45 -07:00
Erik Arvidsson
128e75f7cd Update test expectations
The test file needed an update after #503
2016-08-24 12:25:33 -07:00
Tom MacWright
500b6858fd Beta10 v4.0.0-beta10 2016-08-24 11:11:14 -04:00
Erik Arvidsson
2e9376cf46 Fix issue where exported declarations did not set the kind (#503)
* Fix issue where exported declarations did not set the kind

For cases like:

```js
/** */ export class C {}
/** */ export function f {}
/** */ export const k = 42;
```

the kind did not get set properly.

Towards #484

* Infer kind for export default too

Towards #484
2016-08-24 11:03:06 -04:00
Erik Arvidsson
f53e1e72b7 Use provided name for export default (#505)
If a binding name is provided we should use that in the documentation.

For example:

```js
// test.js
/** */
export default function find() {}
```

Should use the name `find` and not `test`.

Fixes #504
2016-08-24 11:01:31 -04:00
Tom MacWright
49347c82e7 Arv document exported (#502)
* Add a flag to document all exported bindings

This adds a boolean flag called `document-exported` (defaults to false)
that effectively adds an empty comment to all exported bindings that do
not already have a JSDoc comment. It also does the same for the
members of exported classes and objects.

```js
export class C {
  method() {}
}
```

Both `C` and `C#method` are now part of the generated documentation.

Related to #424

* Fix lint error

* Rebase and use options pragma in test file

* Create extractor type as a generalized comment/export getter

* Document exported extractor
2016-08-24 10:58:15 -04:00
Erik Arvidsson
662c2f96ed Testing: Support defining options for fixture tests (#492)
This reads the fixture file and looks for

```js
// Options: <JSON>
```

which it uses as the options for documentation.build and
documentation.buildSync.
2016-08-22 17:19:02 -04:00
Tom MacWright
06412eaad8 Turbo v1 (#497) 2016-08-19 12:22:54 -04:00
Tom MacWright
f0af5b86ae Add generator comment to Markdown output (#496) 2016-08-19 10:08:06 -04:00
Anand Thakker
51fa35c2bf Infer name for string-literal property keys (#487) 2016-08-18 16:59:56 -04:00
Tom MacWright
8229ff5886 Cache nyc coverage (#494) 2016-08-18 16:42:52 -04:00
Tom MacWright
e65c24d9ab Options should be the second argment to tap.test. Refs #492 (#493) 2016-08-18 16:02:06 -04:00
Tom MacWright
bec5d7b4b8 Refs #451. Any -> any (#491) 2016-08-18 08:01:12 -04:00
Tom MacWright
b506893cb0 Run lint in our own tests. Fixes #240 (#480) 2016-07-19 15:43:42 -04:00
Tom MacWright
14cfdb5e93 to beta9 v4.0.0-beta9 2016-07-19 12:08:14 -04:00
Tom MacWright
e32169db8c Update tap, eslint, and vfile-reporter 2016-07-19 12:02:21 -04:00
Fernando Montoya
12b5451d98 Show chevron icon by default on methods name (#478) 2016-07-18 21:51:35 -04:00
Tom MacWright
9e47ec103b Lint all type-containing tags. Fixes #380 (#477) 2016-07-16 20:26:45 -04:00
Tom MacWright
f00c7bd153 Robertleeplummerjr master (#476)
* Expose imports between templates

Exposes `renderSectionList`, and `renderSection` & `renderNote` for consistency. Fixes #462

* Fixes #440

Resolve typo

* Resolve variable name conflict

* Change formatters to master
2016-07-16 20:10:15 -04:00
Tom MacWright
b83bc2eff6 Merge branch 'master' of https://github.com/documentationjs/documentation 2016-07-16 19:52:44 -04:00
Tom MacWright
b89afcf9e3 Improve linkerstack internal documentation 2016-07-16 19:52:00 -04:00
Tom MacWright
c7726bbb19 Report bad TOC entries. Fixes #442 (#475) 2016-07-16 19:40:17 -04:00
Tom MacWright
211a26027c Allow the user to specify port. (#474)
Fixes #464
2016-07-14 13:51:43 -04:00
Fernando Montoya
2f59200378 Fix methods description visibility when clicked on its name (#472)
* Fix methods description visibility when clicked on its name

* Updated test fixtures
2016-07-13 18:15:49 -04:00