Skip to content

Commit

Permalink
Use temporary fork to get through blocker
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Apr 21, 2017
1 parent af0daf8 commit d2ef6a7
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 61 deletions.
3 changes: 2 additions & 1 deletion lib/output/util/format_type.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */
'use strict';
var Syntax = require('doctrine').Syntax, u = require('unist-builder');
var Syntax = require('doctrine-temporary-fork').Syntax,
u = require('unist-builder');

/**
* Shortcut to create a new text node
Expand Down
2 changes: 1 addition & 1 deletion lib/output/util/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';
var remark = require('remark'),
html = require('remark-html'),
Syntax = require('doctrine').Syntax,
Syntax = require('doctrine-temporary-fork').Syntax,
u = require('unist-builder'),
_rerouteLinks = require('./reroute_links'),
highlighter = require('../highlighter'),
Expand Down
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
/* @flow */

var doctrine = require('doctrine');
var doctrine = require('doctrine-temporary-fork');
var parseMarkdown = require('./parse_markdown');

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"chokidar": "^1.2.0",
"concat-stream": "^1.5.0",
"disparity": "^2.0.0",
"doctrine": "^2.0.0",
"doctrine-temporary-fork": "2.0.0-alpha-allowarrayindex",
"get-comments": "^1.0.1",
"git-url-parse": "^6.0.1",
"github-slugger": "1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions test/fixture/params.input.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function foo(address) {
* iterator destructure (RestElement)
*
* @param {Array} input
* @param {any} input.x head of iterator
* @param {any[]} ...input.xs body of iterator
* @param {any} input.0 head of iterator
* @param {...any} input.xs body of iterator
*
* @returns {any[]} rotated such that the last element was the first
*/
Expand Down
94 changes: 66 additions & 28 deletions test/fixture/params.output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2552,29 +2552,20 @@
"type": "NameExpression",
"name": "any"
},
"name": "input.x"
"name": "input.0"
},
{
"title": "param",
"description": "...input.xs body of iterator",
"description": "body of iterator",
"lineNumber": 6,
"type": {
"type": "TypeApplication",
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "Array"
},
"applications": [
{
"type": "NameExpression",
"name": "any"
}
]
"name": "any"
}
},
"name": null,
"errors": [
"Missing or invalid tag name"
]
"name": "input.xs"
},
{
"title": "returns",
Expand Down Expand Up @@ -2618,11 +2609,7 @@
}
},
"augments": [],
"errors": [
{
"message": "Missing or invalid tag name"
}
],
"errors": [],
"examples": [],
"params": [
{
Expand All @@ -2636,7 +2623,7 @@
"properties": [
{
"title": "param",
"name": "input.x",
"name": "input.0",
"lineNumber": 5,
"description": {
"type": "root",
Expand Down Expand Up @@ -2695,17 +2682,68 @@
"name": "any"
}
},
{
"title": "param",
"name": "input.0",
"lineNumber": 109
},
{
"title": "param",
"name": "input.xs",
"lineNumber": 109,
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "body of iterator",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "RestType"
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "any"
}
}
}
]
Expand Down
5 changes: 2 additions & 3 deletions test/fixture/params.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ iterator destructure (RestElement)
**Parameters**

- `input` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)**
- `input.x` **any** head of iterator
- `input.0`
- `input.xs` **...any**
- `input.0` **any** head of iterator
- `input.xs` **...any** body of iterator

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any>** rotated such that the last element was the first
59 changes: 36 additions & 23 deletions test/fixture/params.output.md.json
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@
"children": [
{
"type": "inlineCode",
"value": "input.x"
"value": "input.0"
},
{
"type": "text",
Expand Down Expand Up @@ -2399,28 +2399,6 @@
}
]
},
{
"type": "listItem",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "input.0"
},
{
"type": "text",
"value": " "
},
{
"type": "text",
"value": " "
}
]
}
]
},
{
"type": "listItem",
"children": [
Expand Down Expand Up @@ -2451,6 +2429,41 @@
{
"type": "text",
"value": " "
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "body of iterator",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion test/format_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var _formatType = require('../lib/output/util/format_type'),
LinkerStack = require('../lib/output/util/linker_stack'),
remark = require('remark'),
parse = require('doctrine').parse,
parse = require('doctrine-temporary-fork').parse,
test = require('tap').test;

function stringify(children) {
Expand Down

0 comments on commit d2ef6a7

Please sign in to comment.