1198 Commits

Author SHA1 Message Date
Tom MacWright
cfaaf214cc test(fixtures): Update test fixtures for rc.0 (#750) 2017-04-24 12:29:18 -04:00
Tom MacWright
7f7ea0837c style(prettier): Include declarations, bin, and default_theme in prettier scope (#747)
This ensures all our formatting everywhere is consistent
2017-04-21 19:04:11 -04:00
Tom Macwright
b595c8f33f
chore(release): 4.0.0-rc.0 v4.0.0-rc.0 2017-04-21 19:01:10 -04:00
Tom MacWright
e5ea56d2d3 build(yarn): Include yarn.lock (#746)
https://yarnpkg.com/blog/2016/11/24/lockfiles-for-all/
2017-04-21 18:53:48 -04:00
Tom MacWright
9554b2f117 fix(html output): Fix github links in HTML output (#745)
Fixes #738
2017-04-21 18:16:02 -04:00
Tom MacWright
a15b0716fe refactor: Move index.js to lib (#744)
Fixes https://github.com/documentationjs/documentation/issues/736
2017-04-21 17:50:09 -04:00
Tom MacWright
73747306a0 refactor(nest): Better nesting implementation (#732)
* refactor(nest): Better nesting implementation

This nesting implementation uses a proper recursive tree algorithm

Fixes https://github.com/documentationjs/documentation/issues/554

BREAKING CHANGE: referencing inferred destructure params without
renaming them, like $0.x, from JSDoc comments will no longer
work. To reference them, instead add a param tag to name the
destructuring param, and then refer to members of that name.

Before:

```js
/**
 * @param {number} $0.x a member of x
 */
function a({ x }) {}
```

After:

```js
/**
 * @param {Object} options
 * @param {number} options.x a member of x
 */
function a({ x }) {}
```

* Address review comments

* Reduce testing node requirement back down to 4

* Don't output empty properties, reduce diff noise

* Rearrange and document params

* Simplify param inference, update test fixtures. This is focused around Array destructuring: documenting destructured array elements with indices instead of names, because the names are purely internal details

* Use temporary fork to get through blocker
2017-04-21 17:28:53 -04:00
Tom MacWright
9eca36cdc3 build(husky): Run git add on formatted updated files (#733) 2017-04-15 15:59:55 -04:00
Tom MacWright
d8ec5da121 refactor(exported-extractor): Use Map object instead of Object.create(null) (#730)
The map object provides a cleaner and more predictable way to deal with indexed data in JavaScript.
I wrote something about that here http://www.macwright.org/2017/03/13/maps-not-strictly-better.html
2017-04-14 17:35:27 -04:00
greenkeeper[bot]
fc1cd13e57 chore(package): update flow-bin to version 0.44.0 (#723)
https://greenkeeper.io/
2017-04-13 12:54:11 -04:00
Leon Pearce
6961ee8c98 fix(params): added code path for type RestElement
* FIX: added code path for type RestElement

* TEST: integration test for documenting RestElement node
2017-04-13 12:53:32 -04:00
Tom MacWright
191056edf4 test(format_type): Test formatting of string enums (#721)
Fixes #662
2017-04-12 12:37:52 -04:00
Tom MacWright
5b48290395 test(description-tag): Confirm behavior of description tag with tests (#720)
The `@description` tag allows people to specify a description of a node in any place in the JSDoc
comment, instead of only at the beginning.

Fixes https://github.com/documentationjs/documentation/issues/341
2017-04-12 12:22:50 -04:00
Tom Macwright
e4e7866823 test(fixtures): Update test fixtures for new version 2017-04-10 18:57:48 -04:00
Tom Macwright
09d282b073 chore(release): 4.0.0-beta.19 v4.0.0-beta.19 2017-04-10 18:46:06 -04:00
Tom MacWright
38b628ec66 chore(standard-version): Use standard-version to release new versions (#717)
https://github.com/documentationjs/documentation/issues/715
2017-04-10 18:45:37 -04:00
Tom MacWright
d7fb94e075 docs(readme): Improve README: add new logo, simplify (#714)
Also moves the GreenKeeper badge to the correct line
2017-04-10 17:23:16 -04:00
Tom MacWright
3a92ab9621 build(package): Remove extend, debounce, and resolve dependencies (#713)
extend and debounce are swapped for lodash versions, and resolve was no longer used

Fixes #712
2017-04-10 16:33:31 -04:00
greenkeeper[bot]
cf2ef2bc50 Update dependencies to enable Greenkeeper 🌴 (#711)
* chore(package): update dependencies

https://greenkeeper.io/

* docs(readme): add Greenkeeper badge 

https://greenkeeper.io/

* chore(greenkeeper): Exclude remote-origin-url and yargs from Greenkeeper for now
2017-04-10 16:19:11 -04:00
Tom MacWright
25152edeb9 style(prettier): Use prettier for code formatting (#710)
* style(prettier): Use prettier for code formatting

This saves us style issues. Also adds husky and lint-staged for pre-commit testing

Refs https://github.com/documentationjs/documentation/issues/709
2017-04-10 14:25:45 -04:00
Tom MacWright
e2915dc19c feat(core): Support Flow interface declarations
* Add support for interface declarations

* Support exported interfaces/type aliases

* Update test fixtures

* Add interface type, fix test

* Fix comment style and typo
2017-04-10 13:14:04 -04:00
Anton
5fe1859da8 text(windows): Fix tests on Windows platform
* Fixed find_git test for windows platform.

* Fixed github test on windows platform.

* Fixed bin tests which are executed process from node.js

* On windows platform uses DOUBLE EXCLAMATION MARK instead of WARNING SIGN.
2017-03-30 21:35:11 -04:00
John Kerssens
72e04b885c chore(docs): fixing spelling 2017-03-26 15:16:59 -04:00
Andrei Mihailov
d053391b5e Update README.md (#695)
Fixes #693
2017-03-16 09:57:43 -04:00
Glenn Reyes
a92b9ff28e Switch to shield style CircleCI badge (#692) 2017-03-11 14:55:11 -05:00
Tom MacWright
f07285a920 feat(markdown): Add @see tag output in Markdown (#682)
Refs https://github.com/documentationjs/documentation/issues/673
2017-02-24 16:33:12 -05:00
Tom MacWright
84c9215811 fix(inference): Refactor membership inference
- Tags with `@lends` are now filtered out early on, so they never
  generate documentation. Lends tags are structural hints only.
- Uses built-in type checks instead of babel-types where appropriate.
- More internal documentation
- Now reuses code for parsing lends between different forms

Previously broken syntax, now working:

```js
/** parent */
export default function() {
  /** child */
  this.a = 1;
}
```
2017-02-24 15:36:55 -05:00
Tom MacWright
802dc4cf2c fix(inference): Robust parsing for shorthand object methods
This extends findTarget and the membership interference steps, treating ObjectProperty within var-assigned objects the same as we did for ObjectMethods. It also adds tests that specifically test findTarget directly.

Fixes https://github.com/documentationjs/documentation/issues/649 and fixes https://github.com/documentationjs/documentation/issues/678
2017-02-24 11:56:00 -05:00
Tom MacWright
7530a2baf8 Merge branch 'master' of github.com:documentationjs/documentation 2017-02-24 10:35:24 -05:00
Erik Arvidsson
2c2087d22e Fix(flow): Allow unnamed parameters (#674)
This allows `type T = number => string`. Previously we were only
handling `type T = (x: number) => string` correctly.

Followup to #672 that:
 - Adds a test fixture
 - Fixes lint errors
2017-02-19 14:02:09 -08:00
Andrew Gallant
5bd42d6815 Fix bug parsing anonymous closure types from Flow. (#672)
If no parameter name exists in a function type, then set it to empty. Also,
fix the formatter so that `{param}: {ty}` is formatted as `{ty}` when
`{param}` is empty.

Fixes #671
2017-02-19 13:26:24 -08:00
Tom MacWright
1409aeb158 Merge branch 'master' of github.com:documentationjs/documentation 2017-01-29 19:10:09 -05:00
Tom MacWright
cd65dc39cf Support deprecated tag (#666) 2017-01-29 19:10:04 -05:00
Tom MacWright
d884fc725e Support deprecated tag 2017-01-29 18:54:44 -05:00
Tom MacWright
8cc34b661f fix(scopes): Support inner scope (#665)
* fix(scopes): Support inner scope

The purpose and usage of inner is still unclear, unfortunately, so this is an interim fix at best.

Fixes https://github.com/documentationjs/documentation/issues/652

* Improve comment typedef while we're at it
2017-01-29 18:35:19 -05:00
Tom MacWright
8295363bed console.errors when in html serving mode 2017-01-29 17:04:19 -05:00
Tom MacWright
631c6925d4 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
2017-01-27 16:14:19 -05:00
Erik Arvidsson
898faa07ce Fix expectations after #653 (#657) 2017-01-12 09:51:48 -08:00
Dano Alexander
98f86d70ea Fix typo (#656) 2017-01-12 10:17:41 -05:00
Reinier Battenberg
ffc5c0f676 Fix anchor for not toc targets (#653)
Clicking on toc items generated from the documentation.yaml file didnt work. The target id was not properly slugged. Always slug your target. Very important.
2017-01-11 20:41:59 -08:00
Tom MacWright
ec03e0b407 v4.0.0-beta.18 v4.0.0-beta.18 2016-12-29 16:52:30 -05:00
Tom MacWright
2cf84297f9 docs(markdown): Document approaches to Markdown theming (#647)
Fixes https://github.com/documentationjs/documentation/issues/550
2016-12-29 16:32:57 -05:00
Tom MacWright
88c8f9a668 fix(cli): Fix error reporting in the CLI 2016-12-28 22:25:45 -05:00
Tom MacWright
dd9c03a19e refactor(args): Improve the way we use yargs to simplify the markdown-toc option 2016-12-28 22:25:45 -05:00
Tom MacWright
5bfc660a98 test(coverage): Improve test coverage of document exported 2016-12-28 22:25:45 -05:00
Tom MacWright
4c66fb14c7 feat(markdown): Add table of contents support for Markdown mode (#645)
Adds a new option, `--no-markdown-toc`, to turn off Table of Contents generation. Table of contents are now generated by default with markdown output, including through the `readme` command.

Fixes https://github.com/documentationjs/documentation/issues/220
2016-12-28 21:12:33 -05:00
Tom MacWright
2ae5d8f304 fix(markdown): Start headings in Markdown at h2 (#644)
Fixes https://github.com/documentationjs/documentation/issues/641
2016-12-28 20:12:17 -05:00
Tom MacWright
813dfbbc29 docs(nodeapi): Fix node API documentation: formatters call (err, res) (#643)
Fixes https://github.com/documentationjs/documentation/issues/642
2016-12-28 18:16:08 -05:00
Tom MacWright
3b26b9c169 ci(coverage): Switch back to coveralls for code coverage (#639)
node-tap removed built-in codecov support, so back to coveralls we go

Fixes https://github.com/documentationjs/documentation/issues/638
2016-12-26 11:08:07 -05:00
Tom MacWright
e8831e76c5 test(parse): Improve test coverage of glob and doc parsing (#637) 2016-12-26 10:57:24 -05:00