Skip to content

Commit d2ef6a7

Browse files
committed
Use temporary fork to get through blocker
1 parent af0daf8 commit d2ef6a7

9 files changed

+112
-61
lines changed

lib/output/util/format_type.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* @flow */
22
'use strict';
3-
var Syntax = require('doctrine').Syntax, u = require('unist-builder');
3+
var Syntax = require('doctrine-temporary-fork').Syntax,
4+
u = require('unist-builder');
45

56
/**
67
* Shortcut to create a new text node

lib/output/util/formatters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33
var remark = require('remark'),
44
html = require('remark-html'),
5-
Syntax = require('doctrine').Syntax,
5+
Syntax = require('doctrine-temporary-fork').Syntax,
66
u = require('unist-builder'),
77
_rerouteLinks = require('./reroute_links'),
88
highlighter = require('../highlighter'),

lib/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
/* @flow */
33

4-
var doctrine = require('doctrine');
4+
var doctrine = require('doctrine-temporary-fork');
55
var parseMarkdown = require('./parse_markdown');
66

77
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"chokidar": "^1.2.0",
2424
"concat-stream": "^1.5.0",
2525
"disparity": "^2.0.0",
26-
"doctrine": "^2.0.0",
26+
"doctrine-temporary-fork": "2.0.0-alpha-allowarrayindex",
2727
"get-comments": "^1.0.1",
2828
"git-url-parse": "^6.0.1",
2929
"github-slugger": "1.1.1",

test/fixture/params.input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ function foo(address) {
101101
* iterator destructure (RestElement)
102102
*
103103
* @param {Array} input
104-
* @param {any} input.x head of iterator
105-
* @param {any[]} ...input.xs body of iterator
104+
* @param {any} input.0 head of iterator
105+
* @param {...any} input.xs body of iterator
106106
*
107107
* @returns {any[]} rotated such that the last element was the first
108108
*/

test/fixture/params.output.json

Lines changed: 66 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,29 +2552,20 @@
25522552
"type": "NameExpression",
25532553
"name": "any"
25542554
},
2555-
"name": "input.x"
2555+
"name": "input.0"
25562556
},
25572557
{
25582558
"title": "param",
2559-
"description": "...input.xs body of iterator",
2559+
"description": "body of iterator",
25602560
"lineNumber": 6,
25612561
"type": {
2562-
"type": "TypeApplication",
2562+
"type": "RestType",
25632563
"expression": {
25642564
"type": "NameExpression",
2565-
"name": "Array"
2566-
},
2567-
"applications": [
2568-
{
2569-
"type": "NameExpression",
2570-
"name": "any"
2571-
}
2572-
]
2565+
"name": "any"
2566+
}
25732567
},
2574-
"name": null,
2575-
"errors": [
2576-
"Missing or invalid tag name"
2577-
]
2568+
"name": "input.xs"
25782569
},
25792570
{
25802571
"title": "returns",
@@ -2618,11 +2609,7 @@
26182609
}
26192610
},
26202611
"augments": [],
2621-
"errors": [
2622-
{
2623-
"message": "Missing or invalid tag name"
2624-
}
2625-
],
2612+
"errors": [],
26262613
"examples": [],
26272614
"params": [
26282615
{
@@ -2636,7 +2623,7 @@
26362623
"properties": [
26372624
{
26382625
"title": "param",
2639-
"name": "input.x",
2626+
"name": "input.0",
26402627
"lineNumber": 5,
26412628
"description": {
26422629
"type": "root",
@@ -2695,17 +2682,68 @@
26952682
"name": "any"
26962683
}
26972684
},
2698-
{
2699-
"title": "param",
2700-
"name": "input.0",
2701-
"lineNumber": 109
2702-
},
27032685
{
27042686
"title": "param",
27052687
"name": "input.xs",
2706-
"lineNumber": 109,
2688+
"lineNumber": 6,
2689+
"description": {
2690+
"type": "root",
2691+
"children": [
2692+
{
2693+
"type": "paragraph",
2694+
"children": [
2695+
{
2696+
"type": "text",
2697+
"value": "body of iterator",
2698+
"position": {
2699+
"start": {
2700+
"line": 1,
2701+
"column": 1,
2702+
"offset": 0
2703+
},
2704+
"end": {
2705+
"line": 1,
2706+
"column": 17,
2707+
"offset": 16
2708+
},
2709+
"indent": []
2710+
}
2711+
}
2712+
],
2713+
"position": {
2714+
"start": {
2715+
"line": 1,
2716+
"column": 1,
2717+
"offset": 0
2718+
},
2719+
"end": {
2720+
"line": 1,
2721+
"column": 17,
2722+
"offset": 16
2723+
},
2724+
"indent": []
2725+
}
2726+
}
2727+
],
2728+
"position": {
2729+
"start": {
2730+
"line": 1,
2731+
"column": 1,
2732+
"offset": 0
2733+
},
2734+
"end": {
2735+
"line": 1,
2736+
"column": 17,
2737+
"offset": 16
2738+
}
2739+
}
2740+
},
27072741
"type": {
2708-
"type": "RestType"
2742+
"type": "RestType",
2743+
"expression": {
2744+
"type": "NameExpression",
2745+
"name": "any"
2746+
}
27092747
}
27102748
}
27112749
]

test/fixture/params.output.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ iterator destructure (RestElement)
133133
**Parameters**
134134

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

140139
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

test/fixture/params.output.md.json

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,7 +2341,7 @@
23412341
"children": [
23422342
{
23432343
"type": "inlineCode",
2344-
"value": "input.x"
2344+
"value": "input.0"
23452345
},
23462346
{
23472347
"type": "text",
@@ -2399,28 +2399,6 @@
23992399
}
24002400
]
24012401
},
2402-
{
2403-
"type": "listItem",
2404-
"children": [
2405-
{
2406-
"type": "paragraph",
2407-
"children": [
2408-
{
2409-
"type": "inlineCode",
2410-
"value": "input.0"
2411-
},
2412-
{
2413-
"type": "text",
2414-
"value": " "
2415-
},
2416-
{
2417-
"type": "text",
2418-
"value": " "
2419-
}
2420-
]
2421-
}
2422-
]
2423-
},
24242402
{
24252403
"type": "listItem",
24262404
"children": [
@@ -2451,6 +2429,41 @@
24512429
{
24522430
"type": "text",
24532431
"value": " "
2432+
},
2433+
{
2434+
"type": "paragraph",
2435+
"children": [
2436+
{
2437+
"type": "text",
2438+
"value": "body of iterator",
2439+
"position": {
2440+
"start": {
2441+
"line": 1,
2442+
"column": 1,
2443+
"offset": 0
2444+
},
2445+
"end": {
2446+
"line": 1,
2447+
"column": 17,
2448+
"offset": 16
2449+
},
2450+
"indent": []
2451+
}
2452+
}
2453+
],
2454+
"position": {
2455+
"start": {
2456+
"line": 1,
2457+
"column": 1,
2458+
"offset": 0
2459+
},
2460+
"end": {
2461+
"line": 1,
2462+
"column": 17,
2463+
"offset": 16
2464+
},
2465+
"indent": []
2466+
}
24542467
}
24552468
]
24562469
}

test/format_type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var _formatType = require('../lib/output/util/format_type'),
55
LinkerStack = require('../lib/output/util/linker_stack'),
66
remark = require('remark'),
7-
parse = require('doctrine').parse,
7+
parse = require('doctrine-temporary-fork').parse,
88
test = require('tap').test;
99

1010
function stringify(children) {

0 commit comments

Comments
 (0)