From cb2b39348511f0e43d391cd0a66b3b942356309d Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Wed, 17 Apr 2019 20:45:41 -0700 Subject: [PATCH 1/5] feat: Support async functions --- __tests__/__snapshots__/test.js.snap | 1 + __tests__/lib/infer/kind.js | 19 ++++++++++++------- __tests__/lib/parse.js | 8 ++++++++ src/infer/kind.js | 3 +++ src/parse.js | 1 + 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap index 9f4ff1567..d496a23b5 100644 --- a/__tests__/__snapshots__/test.js.snap +++ b/__tests__/__snapshots__/test.js.snap @@ -9823,6 +9823,7 @@ It takes a ", "todos": Array [], }, Object { + "async": true, "augments": Array [], "context": Object { "loc": Object { diff --git a/__tests__/lib/infer/kind.js b/__tests__/lib/infer/kind.js index 854bfc953..448e85354 100644 --- a/__tests__/lib/infer/kind.js +++ b/__tests__/lib/infer/kind.js @@ -82,13 +82,12 @@ test('inferKind', function() { ).kind ).toBe('function'); - expect( - inferKind( - toComment( - '/** Export default function */' + 'export default function foo() {}' - ) - ).kind - ).toBe('function'); + const asyncFunction = inferKind( + toComment('/** Async function */' + 'async function foo() {}') + ); + + expect(asyncFunction.kind).toBe('function'); + expect(asyncFunction.async).toBe(true); expect( inferKind(toComment('class Foo { /** set b */ set b(v) { } }')).kind @@ -106,6 +105,12 @@ test('inferKind', function() { 'function' ); + const asyncMethod = inferKind( + toComment('class Foo { /** b */ async b(v) { } }') + ); + expect(asyncMethod.kind).toBe('function'); + expect(asyncMethod.async).toBe(true); + expect( inferKind( toComment(function() { diff --git a/__tests__/lib/parse.js b/__tests__/lib/parse.js index 6853ba364..7ebfae7a8 100644 --- a/__tests__/lib/parse.js +++ b/__tests__/lib/parse.js @@ -72,6 +72,14 @@ test('parse - @arg', function() {}); test('parse - @argument', function() {}); +test('parse - @async', function() { + expect( + evaluate(function() { + /** @async */ + })[0].async + ).toBe(true); +}); + test('parse - @augments', function() { expect( evaluate(function() { diff --git a/src/infer/kind.js b/src/infer/kind.js index 0314ffd69..303ce1c3c 100644 --- a/src/infer/kind.js +++ b/src/infer/kind.js @@ -25,6 +25,9 @@ function inferKind(comment) { comment.kind = 'class'; } else { comment.kind = 'function'; + if (node.async) { + comment.async = true; + } } } else if (t.isTypeAlias(node)) { comment.kind = 'typedef'; diff --git a/src/parse.js b/src/parse.js index ae9f91e94..880a79558 100644 --- a/src/parse.js +++ b/src/parse.js @@ -23,6 +23,7 @@ const flatteners = { alias: flattenName, arg: synonym('param'), argument: synonym('param'), + async: flattenBoolean, /** * Parse tag * @private From d69b87328289c239f09842dc2dca5dd502e89f60 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Wed, 17 Apr 2019 21:17:05 -0700 Subject: [PATCH 2/5] feat: Support generator functions --- __tests__/__snapshots__/index.js.snap | 2 + __tests__/__snapshots__/test.js.snap | 165 ++++++++++++++++++++++++++ __tests__/lib/infer/kind.js | 13 ++ __tests__/lib/parse.js | 56 +++++++++ src/infer/kind.js | 3 + src/parse.js | 24 +++- 6 files changed, 262 insertions(+), 1 deletion(-) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index 109f90e23..0ff049c8b 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -90,6 +90,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -177,6 +178,7 @@ exports[`build 3`] = ` \\"sees\\": [], \\"throws\\": [], \\"todos\\": [], + \\"yields\\": [], \\"name\\": \\"name\\", \\"members\\": { \\"global\\": [], diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap index d496a23b5..a99ae50ee 100644 --- a/__tests__/__snapshots__/test.js.snap +++ b/__tests__/__snapshots__/test.js.snap @@ -176,6 +176,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -277,6 +278,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -453,6 +455,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -554,6 +557,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -797,6 +801,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -969,6 +974,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -1141,6 +1147,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -1322,6 +1329,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -3072,6 +3080,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -3244,6 +3253,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -3336,6 +3346,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -3816,6 +3827,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -3993,6 +4005,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -4092,6 +4105,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -4672,6 +4686,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -4782,6 +4797,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -4982,6 +4998,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -5001,6 +5018,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5058,6 +5076,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5149,6 +5168,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5207,6 +5227,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5271,6 +5292,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [ @@ -5331,6 +5353,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5389,6 +5412,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5453,6 +5477,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -5481,6 +5506,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5536,6 +5562,7 @@ Array [ "name": "boolean", "type": "NameExpression", }, + "yields": Array [], }, Object { "augments": Array [], @@ -5585,6 +5612,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5704,6 +5732,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5794,6 +5823,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5851,6 +5881,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5914,6 +5945,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -5969,6 +6001,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6026,6 +6059,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -6043,6 +6077,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6094,6 +6129,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6145,6 +6181,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6200,6 +6237,7 @@ Array [ "name": "number", "type": "NameExpression", }, + "yields": Array [], }, Object { "augments": Array [], @@ -6255,6 +6293,7 @@ Array [ "name": "string", "type": "NameExpression", }, + "yields": Array [], }, Object { "augments": Array [], @@ -6310,6 +6349,7 @@ Array [ "name": "string", "type": "NameExpression", }, + "yields": Array [], }, Object { "augments": Array [], @@ -6371,6 +6411,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6461,6 +6502,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -6478,6 +6520,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6590,6 +6633,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -6680,6 +6724,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -6697,6 +6742,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -7609,6 +7655,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -7666,6 +7713,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -7754,6 +7802,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -7923,6 +7972,7 @@ have any parameter descriptions.", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8062,6 +8112,7 @@ have any parameter descriptions.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8329,6 +8380,7 @@ have any parameter descriptions.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8530,6 +8582,7 @@ class A { "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8639,6 +8692,7 @@ class A { "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8766,6 +8820,7 @@ class A { "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -8880,6 +8935,7 @@ as a property.", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [ @@ -8991,6 +9047,7 @@ as a property.", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -9162,6 +9219,7 @@ class A { ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -9334,6 +9392,7 @@ class A { ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -9595,6 +9654,7 @@ It takes a ", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -9706,6 +9766,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -9821,6 +9882,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "async": true, @@ -9924,6 +9986,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -10096,6 +10159,7 @@ It takes a ", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -10205,6 +10269,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "access": "protected", @@ -10314,6 +10379,7 @@ It takes a ", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "access": "public", @@ -10423,6 +10489,7 @@ It takes a ", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -10523,6 +10590,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -10701,6 +10769,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -10821,6 +10890,7 @@ It takes a ", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -13459,6 +13529,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -13664,6 +13735,7 @@ Array [ "name": "string", "type": "NameExpression", }, + "yields": Array [], }, ], "static": Array [], @@ -13704,6 +13776,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -13834,6 +13907,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -14461,6 +14535,7 @@ Array [ "name": "boolean", "type": "NameExpression", }, + "yields": Array [], }, Object { "augments": Array [], @@ -14590,6 +14665,7 @@ Array [ "name": "string", "type": "NameExpression", }, + "yields": Array [], }, ], "static": Array [], @@ -14609,6 +14685,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -14879,6 +14956,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -15124,6 +15202,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -15224,6 +15303,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -15396,6 +15476,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -15986,6 +16067,7 @@ Array [ "name": "Object", "type": "NameExpression", }, + "yields": Array [], }, ] `; @@ -16471,6 +16553,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -16813,6 +16896,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -17083,6 +17167,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -17142,6 +17227,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -17265,6 +17351,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -17594,6 +17681,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -17775,6 +17863,7 @@ Array [ }, "type": "FunctionType", }, + "yields": Array [], }, Object { "augments": Array [], @@ -17912,6 +18001,7 @@ Array [ }, "type": "FunctionType", }, + "yields": Array [], }, Object { "augments": Array [], @@ -18049,6 +18139,7 @@ Array [ }, "type": "FunctionType", }, + "yields": Array [], }, ] `; @@ -18619,6 +18710,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -18638,6 +18730,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -18854,6 +18947,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -18913,6 +19007,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -19249,6 +19344,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -19675,6 +19771,7 @@ and ", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -20370,6 +20467,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -20692,6 +20790,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -20989,6 +21088,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -21240,6 +21340,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -21491,6 +21592,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -21525,6 +21627,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -22176,6 +22279,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -22262,6 +22366,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -22832,6 +22937,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [ @@ -23011,6 +23117,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -23042,6 +23149,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -23703,6 +23811,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -24412,6 +24521,7 @@ Array [ "throws": Array [], "todos": Array [], "version": "1.0.0", + "yields": Array [], }, ] `; @@ -25061,6 +25171,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -25303,6 +25414,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -26206,6 +26318,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -27105,6 +27218,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -27577,6 +27691,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -28686,6 +28801,7 @@ still work in the markdown table.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -28973,6 +29089,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -29194,6 +29311,7 @@ Array [ ], "type": "RecordType", }, + "yields": Array [], }, ] `; @@ -29597,6 +29715,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -29798,6 +29917,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -29922,6 +30042,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -30188,6 +30309,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -30207,6 +30329,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -30405,6 +30528,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], }, @@ -30422,6 +30546,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -30879,6 +31004,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -31429,6 +31555,7 @@ The latter is preferable in case of large GeoJSON files.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -31679,6 +31806,7 @@ values specified in code.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -31852,6 +31980,7 @@ or any type information we could infer from annotations.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -32217,6 +32346,7 @@ iterator destructure (RestElement)", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -34903,6 +35033,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -35101,6 +35232,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -35210,6 +35342,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -35357,6 +35490,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -35376,6 +35510,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -35575,6 +35710,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -35695,6 +35831,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -35714,6 +35851,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -35816,6 +35954,7 @@ that doesn't crash anything!", "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -36435,6 +36574,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -36820,6 +36960,7 @@ plus 3.", ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -37083,6 +37224,7 @@ plus 3.", "name": "Function", "type": "NameExpression", }, + "yields": Array [], }, ] `; @@ -37741,6 +37883,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -38178,6 +38321,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -38508,6 +38652,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38566,6 +38711,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38624,6 +38770,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38682,6 +38829,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -38701,6 +38849,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38792,6 +38941,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38850,6 +39000,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38908,6 +39059,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -38966,6 +39118,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -38985,6 +39138,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -39036,6 +39190,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -39087,6 +39242,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -39285,6 +39441,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -39393,6 +39550,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -39526,6 +39684,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -39666,6 +39825,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -39698,6 +39858,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, Object { "augments": Array [], @@ -39838,6 +39999,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ], "static": Array [], @@ -39870,6 +40032,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -40285,6 +40448,7 @@ Array [ ], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; @@ -40538,6 +40702,7 @@ Array [ "tags": Array [], "throws": Array [], "todos": Array [], + "yields": Array [], }, ] `; diff --git a/__tests__/lib/infer/kind.js b/__tests__/lib/infer/kind.js index 448e85354..64212772c 100644 --- a/__tests__/lib/infer/kind.js +++ b/__tests__/lib/infer/kind.js @@ -89,6 +89,13 @@ test('inferKind', function() { expect(asyncFunction.kind).toBe('function'); expect(asyncFunction.async).toBe(true); + const generatorFunction = inferKind( + toComment('/** Generator function */' + 'function *foo() {}') + ); + + expect(generatorFunction.kind).toBe('function'); + expect(generatorFunction.generator).toBe(true); + expect( inferKind(toComment('class Foo { /** set b */ set b(v) { } }')).kind ).toBe('member'); @@ -111,6 +118,12 @@ test('inferKind', function() { expect(asyncMethod.kind).toBe('function'); expect(asyncMethod.async).toBe(true); + const generatorMethod = inferKind( + toComment('class Foo { /** b */ *b(v) { } }') + ); + expect(generatorMethod.kind).toBe('function'); + expect(generatorMethod.generator).toBe(true); + expect( inferKind( toComment(function() { diff --git a/__tests__/lib/parse.js b/__tests__/lib/parse.js index 7ebfae7a8..6eb7f643f 100644 --- a/__tests__/lib/parse.js +++ b/__tests__/lib/parse.js @@ -460,6 +460,14 @@ test('parse - @function', function() { ).toBeUndefined(); }); +test('parse - @generator', function() { + expect( + evaluate(function() { + /** @generator */ + })[0].generator + ).toBe(true); +}); + test('parse - @global', function() { expect( evaluate(function() { @@ -1050,6 +1058,54 @@ test('parse - @version', function() {}); test('parse - @virtual', function() {}); +test('parse - @yield', function() { + expect( + evaluate(function() { + /** @yield test */ + })[0].yields[0] + ).toEqual({ + title: 'yields', + description: remark().parse('test') + }); + + expect( + evaluate(function() { + /** @yield {number} test */ + })[0].yields[0] + ).toEqual({ + description: remark().parse('test'), + title: 'yields', + type: { + name: 'number', + type: 'NameExpression' + } + }); +}); + +test('parse - @yields', function() { + expect( + evaluate(function() { + /** @yields test */ + })[0].yields[0] + ).toEqual({ + title: 'yields', + description: remark().parse('test') + }); + + expect( + evaluate(function() { + /** @yields {number} test */ + })[0].yields[0] + ).toEqual({ + description: remark().parse('test'), + title: 'yields', + type: { + name: 'number', + type: 'NameExpression' + } + }); +}); + test('parse - unknown tag', function() { expect( evaluate(function() { diff --git a/src/infer/kind.js b/src/infer/kind.js index 303ce1c3c..5ab86850e 100644 --- a/src/infer/kind.js +++ b/src/infer/kind.js @@ -28,6 +28,9 @@ function inferKind(comment) { if (node.async) { comment.async = true; } + if (node.generator) { + comment.generator = true; + } } } else if (t.isTypeAlias(node)) { comment.kind = 'typedef'; diff --git a/src/parse.js b/src/parse.js index 880a79558..c67d180a8 100644 --- a/src/parse.js +++ b/src/parse.js @@ -158,6 +158,7 @@ const flatteners = { fires: todo, func: synonym('function'), function: flattenKindShorthand, + generator: flattenBoolean, /** * Parse tag * @private @@ -401,7 +402,27 @@ const flatteners = { result.variation = tag.variation; }, version: flattenDescription, - virtual: synonym('abstract') + virtual: synonym('abstract'), + yield: synonym('yields'), + /** + * Parse tag + * @private + * @param {Object} result target comment + * @param {Object} tag the tag + * @returns {undefined} has side-effects + */ + yields(result, tag) { + const yields = { + description: parseMarkdown(tag.description), + title: 'yields' + }; + + if (tag.type) { + yields.type = tag.type; + } + + result.yields.push(yields); + } }; /** @@ -593,6 +614,7 @@ function parseJSDoc(comment, loc, context) { result.sees = []; result.throws = []; result.todos = []; + result.yields = []; if (result.description) { result.description = parseMarkdown(result.description); From 6efd87f09b995861440b75520a2a8de6a1e81041 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Wed, 17 Apr 2019 21:47:11 -0700 Subject: [PATCH 3/5] feat: Add flow inference for generators --- __tests__/lib/infer/return.js | 22 ++++++++++++++++++++++ src/infer/return.js | 19 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/__tests__/lib/infer/return.js b/__tests__/lib/infer/return.js index 979d640b0..6c7be8135 100644 --- a/__tests__/lib/infer/return.js +++ b/__tests__/lib/infer/return.js @@ -41,4 +41,26 @@ test('inferReturn', function() { name: 'string', type: 'NameExpression' }); + const generatorFn = evaluate( + '/** */function *a(): Generator {}' + ); + expect(generatorFn.generator).toBe(true); + expect(generatorFn.yields).toEqual([ + { + title: 'yields', + type: { + name: 'Foo', + type: 'NameExpression' + } + } + ]); + expect(generatorFn.returns).toEqual([ + { + title: 'returns', + type: { + name: 'Bar', + type: 'NameExpression' + } + } + ]); }); diff --git a/src/infer/return.js b/src/infer/return.js index c192307a5..0cb929194 100644 --- a/src/infer/return.js +++ b/src/infer/return.js @@ -30,10 +30,27 @@ function inferReturn(comment) { } if (t.isFunction(fn) && fn.returnType && fn.returnType.typeAnnotation) { - const returnType = flowDoctrine(fn.returnType.typeAnnotation); + let returnType = flowDoctrine(fn.returnType.typeAnnotation); if (comment.returns && comment.returns.length > 0) { comment.returns[0].type = returnType; } else { + if ( + fn.generator && + returnType.type === 'TypeApplication' && + returnType.expression.name === 'Generator' && + returnType.applications.length === 3 + ) { + comment.generator = true; + comment.yields = [ + { + title: 'yields', + type: returnType.applications[0] + } + ]; + + returnType = returnType.applications[1]; + } + comment.returns = [ { title: 'returns', From 3fcab78c4af29fd481e975f76ca14f2cbf656d32 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 18 Apr 2019 09:43:50 -0700 Subject: [PATCH 4/5] chore(deps): Update doctrine --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8ad0a98f1..3ced2d893 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "chokidar": "^2.0.4", "concat-stream": "^1.6.0", "disparity": "^2.0.0", - "doctrine-temporary-fork": "2.0.1", + "doctrine-temporary-fork": "2.1.0", "get-port": "^4.0.0", "git-url-parse": "^10.0.1", "github-slugger": "1.2.0", diff --git a/yarn.lock b/yarn.lock index a684d2264..0aa6355a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2040,9 +2040,10 @@ disparity@^2.0.0: ansi-styles "^2.0.1" diff "^1.3.2" -doctrine-temporary-fork@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/doctrine-temporary-fork/-/doctrine-temporary-fork-2.0.1.tgz#23f0b6275c65f48893324b02338178e496b2e4bf" +doctrine-temporary-fork@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine-temporary-fork/-/doctrine-temporary-fork-2.1.0.tgz#36f2154f556ee4f1e60311d391cd23de5187ed57" + integrity sha512-nliqOv5NkE4zMON4UA6AMJE6As35afs8aYXATpU4pTUdIKiARZwrJVEP1boA3Rx1ZXHVkwxkhcq4VkqvsuRLsA== dependencies: esutils "^2.0.2" From 93b9ca9ea34a7482179a16e2f3c2642a05174d39 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 18 Apr 2019 09:44:35 -0700 Subject: [PATCH 5/5] chore(deps): Update husky --- package.json | 8 +++- yarn.lock | 104 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 99 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 3ced2d893..50a8184ec 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "eslint": "^5.0.1", "eslint-config-prettier": "^3.0.1", "fs-extra": "^7.0.0", - "husky": "^0.14.3", + "husky": "^1.3.1", "jest": "^23.0.0", "json-schema": "0.2.3", "lint-staged": "^7.2.0", @@ -110,7 +110,6 @@ "scripts": { "build": "npm run doc", "release": "standard-version", - "precommit": "lint-staged", "prepublish": "npm run build", "format": "prettier --write '{src,__tests__,declarations,bin,default_theme}/**/*.js'", "doc": "node ./bin/documentation.js build src/index.js -f md --access=public > docs/NODE_API.md", @@ -145,5 +144,10 @@ "ignore": [ "remote-origin-url" ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } } diff --git a/yarn.lock b/yarn.lock index 0aa6355a8..07fd53a21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1361,12 +1361,26 @@ cached-path-relative@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" dependencies: callsites "^0.2.0" +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" @@ -1497,6 +1511,11 @@ ci-info@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" @@ -1828,6 +1847,16 @@ cosmiconfig@^5.0.2: js-yaml "^3.9.0" parse-json "^4.0.0" +cosmiconfig@^5.0.7: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.0.tgz#45038e4d28a7fe787203aede9c25bca4a08b12c8" + integrity sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.0" + parse-json "^4.0.0" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2939,13 +2968,21 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -husky@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" +husky@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-1.3.1.tgz#26823e399300388ca2afff11cfa8a86b0033fae0" + integrity sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg== dependencies: - is-ci "^1.0.10" - normalize-path "^1.0.0" - strip-indent "^2.0.0" + cosmiconfig "^5.0.7" + execa "^1.0.0" + find-up "^3.0.0" + get-stdin "^6.0.0" + is-ci "^2.0.0" + pkg-dir "^3.0.0" + please-upgrade-node "^3.1.1" + read-pkg "^4.0.1" + run-node "^1.0.0" + slash "^2.0.0" iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" @@ -2963,6 +3000,14 @@ ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" @@ -3093,6 +3138,13 @@ is-ci@^1.0.10: dependencies: ci-info "^1.5.0" +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3745,6 +3797,14 @@ js-yaml@^3.10.0, js-yaml@^3.12.0, js-yaml@^3.9.0: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.13.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@^3.7.0: version "3.12.2" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.2.tgz#ef1d067c5a9d9cb65bd72f285b5d8105c77f14fc" @@ -4484,10 +4544,6 @@ normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" - normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -4900,7 +4956,14 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -please-upgrade-node@^3.0.2: +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" dependencies: @@ -5096,6 +5159,15 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read-pkg@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= + dependencies: + normalize-package-data "^2.3.2" + parse-json "^4.0.0" + pify "^3.0.0" + readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.6" resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -5469,6 +5541,11 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== + rxjs@^6.1.0: version "6.3.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" @@ -5572,6 +5649,11 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"