From 12d5e74f9b28b1715680c47051a399fc18bf9ffd Mon Sep 17 00:00:00 2001 From: Lee Powell Date: Wed, 27 Mar 2019 15:16:05 +0000 Subject: [PATCH] Add forward ref support --- package-lock.json | 309 +++++++++++++-------------- package.json | 2 +- src/actualNameHandler.js | 6 +- test/fixtures/forwardRef/actual.js | 32 +++ test/fixtures/forwardRef/expected.js | 84 ++++++++ 5 files changed, 264 insertions(+), 169 deletions(-) create mode 100644 test/fixtures/forwardRef/actual.js create mode 100644 test/fixtures/forwardRef/expected.js diff --git a/package-lock.json b/package-lock.json index 10bf86a..5bf093d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, "requires": { "@babel/highlight": "^7.0.0" } @@ -35,7 +34,6 @@ "version": "7.2.2", "resolved": "https://npm.squarespace.net:8443/@/@babel/core/_attachments/core-7.2.2.tgz", "integrity": "sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.2.2", @@ -57,7 +55,6 @@ "version": "4.1.1", "resolved": "https://npm.squarespace.net:8443/d/debug/_attachments/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -65,8 +62,7 @@ "ms": { "version": "2.1.1", "resolved": "https://npm.squarespace.net:8443/m/ms/_attachments/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" } } }, @@ -74,7 +70,6 @@ "version": "7.3.0", "resolved": "https://npm.squarespace.net:8443/@/@babel/generator/_attachments/generator-7.3.0.tgz", "integrity": "sha512-dZTwMvTgWfhmibq4V9X+LMf6Bgl7zAodRn9PvcPdhlzFMbvUutx74dbEv7Atz3ToeEpevYEJtAwfxq/bDCzHWg==", - "dev": true, "requires": { "@babel/types": "^7.3.0", "jsesc": "^2.5.1", @@ -161,7 +156,6 @@ "version": "7.1.0", "resolved": "https://npm.squarespace.net:8443/@/@babel/helper-function-name/_attachments/helper-function-name-7.1.0.tgz", "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.0.0", "@babel/template": "^7.1.0", @@ -172,7 +166,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, "requires": { "@babel/types": "^7.0.0" } @@ -281,7 +274,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, "requires": { "@babel/types": "^7.0.0" } @@ -302,7 +294,6 @@ "version": "7.3.1", "resolved": "https://npm.squarespace.net:8443/@/@babel/helpers/_attachments/helpers-7.3.1.tgz", "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==", - "dev": true, "requires": { "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.5", @@ -313,7 +304,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -859,18 +849,17 @@ } }, "@babel/runtime": { - "version": "7.3.1", - "resolved": "https://npm.squarespace.net:8443/@/@babel/runtime/_attachments/runtime-7.3.1.tgz", - "integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==", + "version": "7.4.2", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/@babel/runtime/-/runtime-7.4.2.tgz", + "integrity": "sha1-9atolzIPFt7NhV7tcLcFkIoxP+g=", "requires": { - "regenerator-runtime": "^0.12.0" + "regenerator-runtime": "^0.13.2" } }, "@babel/template": { "version": "7.2.2", "resolved": "https://npm.squarespace.net:8443/@/@babel/template/_attachments/template-7.2.2.tgz", "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/parser": "^7.2.2", @@ -881,7 +870,6 @@ "version": "7.2.3", "resolved": "https://npm.squarespace.net:8443/@/@babel/traverse/_attachments/traverse-7.2.3.tgz", "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.2.2", @@ -898,7 +886,6 @@ "version": "4.1.1", "resolved": "https://npm.squarespace.net:8443/d/debug/_attachments/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -906,8 +893,7 @@ "ms": { "version": "2.1.1", "resolved": "https://npm.squarespace.net:8443/m/ms/_attachments/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" } } }, @@ -915,7 +901,6 @@ "version": "7.3.0", "resolved": "https://npm.squarespace.net:8443/@/@babel/types/_attachments/types-7.3.0.tgz", "integrity": "sha512-QkFPw68QqWU1/RVPyBe8SO7lXbPfjtqAxRYQKpFpaB8yMq7X2qAqfwK5LKoQufEkSmO5NQ70O6Kc3Afk03RwXw==", - "dev": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.10", @@ -932,7 +917,6 @@ "version": "3.2.1", "resolved": "https://npm.squarespace.net:8443/a/ansi-styles/_attachments/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -950,7 +934,7 @@ }, "arr-diff": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/arr-diff/-/arr-diff-4.0.0.tgz", "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, @@ -962,19 +946,19 @@ }, "arr-union": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, "array-unique": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, "assign-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, @@ -984,11 +968,18 @@ "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" }, "async": { - "version": "2.6.1", - "resolved": "https://npm.squarespace.net:8443/a/async/_attachments/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/async/-/async-2.6.2.tgz", + "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=", "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=" + } } }, "async-each": { @@ -1006,7 +997,7 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { @@ -1165,7 +1156,6 @@ "version": "2.4.2", "resolved": "https://npm.squarespace.net:8443/c/chalk/_attachments/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1247,7 +1237,7 @@ }, "collection-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { @@ -1259,16 +1249,14 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } }, "color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "colors": { "version": "1.3.3", @@ -1283,33 +1271,32 @@ }, "commondir": { "version": "1.0.1", - "resolved": "https://npm.squarespace.net:8443/c/commondir/_attachments/commondir-1.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "component-emitter": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/component-emitter/-/component-emitter-1.2.1.tgz", "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, "requires": { "safe-buffer": "~5.1.1" } }, "copy-descriptor": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, @@ -1321,7 +1308,7 @@ }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true @@ -1354,7 +1341,7 @@ }, "decode-uri-component": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, @@ -1406,9 +1393,9 @@ "dev": true }, "doctrine": { - "version": "2.1.0", - "resolved": "https://npm.squarespace.net:8443/d/doctrine/_attachments/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", "requires": { "esutils": "^2.0.2" } @@ -1421,9 +1408,8 @@ }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "esprima": { "version": "4.0.1", @@ -1432,7 +1418,7 @@ }, "esutils": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "execa": { @@ -1452,7 +1438,7 @@ }, "expand-brackets": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { @@ -1467,7 +1453,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { @@ -1476,7 +1462,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -1487,7 +1473,7 @@ }, "extend-shallow": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { @@ -1573,7 +1559,7 @@ }, "fill-range": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { @@ -1585,7 +1571,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -1616,13 +1602,13 @@ }, "for-in": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, "fragment-cache": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { @@ -1637,7 +1623,7 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, @@ -2184,7 +2170,7 @@ }, "get-value": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/get-value/-/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, @@ -2204,7 +2190,7 @@ }, "glob-parent": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "optional": true, @@ -2215,7 +2201,7 @@ "dependencies": { "is-glob": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "optional": true, @@ -2228,8 +2214,7 @@ "globals": { "version": "11.10.0", "resolved": "https://npm.squarespace.net:8443/g/globals/_attachments/globals-11.10.0.tgz", - "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", - "dev": true + "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==" }, "graceful-fs": { "version": "4.1.15", @@ -2245,13 +2230,12 @@ }, "has-flag": { "version": "3.0.0", - "resolved": "https://npm.squarespace.net:8443/h/has-flag/_attachments/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { @@ -2262,7 +2246,7 @@ }, "has-values": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { @@ -2272,7 +2256,7 @@ "dependencies": { "kind-of": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { @@ -2283,7 +2267,7 @@ }, "he": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, @@ -2295,7 +2279,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { @@ -2305,7 +2289,7 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, @@ -2326,7 +2310,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { @@ -2335,7 +2319,7 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { @@ -2346,7 +2330,7 @@ }, "is-binary-path": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "optional": true, @@ -2362,7 +2346,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { @@ -2371,7 +2355,7 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { @@ -2401,13 +2385,13 @@ }, "is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, @@ -2419,7 +2403,7 @@ }, "is-glob": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "optional": true, @@ -2429,7 +2413,7 @@ }, "is-number": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { @@ -2438,7 +2422,7 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { @@ -2449,7 +2433,7 @@ }, "is-plain-obj": { "version": "1.1.0", - "resolved": "https://npm.squarespace.net:8443/i/is-plain-obj/_attachments/is-plain-obj-1.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, @@ -2476,7 +2460,7 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, @@ -2488,7 +2472,7 @@ }, "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, @@ -2501,20 +2485,17 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "jsesc": { "version": "2.5.2", "resolved": "https://npm.squarespace.net:8443/j/jsesc/_attachments/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "json5": { "version": "2.1.0", "resolved": "https://npm.squarespace.net:8443/j/json5/_attachments/json5-2.1.0.tgz", "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, "requires": { "minimist": "^1.2.0" }, @@ -2522,8 +2503,7 @@ "minimist": { "version": "1.2.0", "resolved": "https://npm.squarespace.net:8443/m/minimist/_attachments/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, @@ -2594,13 +2574,13 @@ }, "map-cache": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, "map-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { @@ -2680,7 +2660,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -2757,7 +2737,7 @@ }, "node-dir": { "version": "0.1.17", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/node-dir/-/node-dir-0.1.17.tgz", "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", "requires": { "minimatch": "^3.0.2" @@ -2765,7 +2745,7 @@ }, "node-modules-regexp": { "version": "1.0.0", - "resolved": "https://npm.squarespace.net:8443/n/node-modules-regexp/_attachments/node-modules-regexp-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", "dev": true }, @@ -2810,7 +2790,7 @@ }, "object-copy": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { @@ -2821,7 +2801,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { @@ -2830,7 +2810,7 @@ }, "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { @@ -2841,7 +2821,7 @@ }, "object-visit": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { @@ -2850,7 +2830,7 @@ }, "object.pick": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { @@ -2859,7 +2839,7 @@ }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { @@ -2920,26 +2900,26 @@ }, "pascalcase": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, "path-dirname": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/path-dirname/-/path-dirname-1.0.2.tgz", "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true, "optional": true }, "path-exists": { "version": "3.0.0", - "resolved": "https://npm.squarespace.net:8443/p/path-exists/_attachments/path-exists-3.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -2952,8 +2932,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "pify": { "version": "3.0.0", @@ -2981,7 +2960,7 @@ }, "posix-character-classes": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, @@ -3004,39 +2983,44 @@ "dev": true }, "react-docgen": { - "version": "3.0.0", - "resolved": "https://npm.squarespace.net:8443/r/react-docgen/_attachments/react-docgen-3.0.0.tgz", - "integrity": "sha512-2UseoLWabFNXuk1Foz4VDPSIAkxz+1Hmmq4qijzUmYHDq0ZSloKDLXtGLpQRcAi/M76hRpPtH1rV4BI5jNAOnQ==", + "version": "4.1.0", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/react-docgen/-/react-docgen-4.1.0.tgz", + "integrity": "sha1-IYiH/rpbLDavM3h5on50vakO18s=", "requires": { - "@babel/parser": "^7.1.3", + "@babel/core": "^7.0.0", "@babel/runtime": "^7.0.0", "async": "^2.1.4", "commander": "^2.19.0", - "doctrine": "^2.0.0", + "doctrine": "^3.0.0", "node-dir": "^0.1.10", - "recast": "^0.16.0" + "recast": "^0.17.3" }, "dependencies": { "ast-types": { - "version": "0.11.7", - "resolved": "https://npm.squarespace.net:8443/a/ast-types/_attachments/ast-types-0.11.7.tgz", - "integrity": "sha512-2mP3TwtkY/aTv5X3ZsMpNAbOnyoC/aMJwJSoaELPkHId0nSQgFcnU4dRW3isxiz7+zBexk0ym3WNVjMiQBnJSw==" + "version": "0.12.2", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/ast-types/-/ast-types-0.12.2.tgz", + "integrity": "sha1-NBZWBJ7jKKwD/IBcFWtJ66seRGI=" + }, + "private": { + "version": "0.1.8", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=" }, "recast": { - "version": "0.16.2", - "resolved": "https://npm.squarespace.net:8443/r/recast/_attachments/recast-0.16.2.tgz", - "integrity": "sha512-O/7qXi51DPjRVdbrpNzoBQH5dnAPQNbfoOFyRiUwreTMJfIHYOEBzwuH+c0+/BTSJ3CQyKs6ILSWXhESH6Op3A==", + "version": "0.17.4", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/recast/-/recast-0.17.4.tgz", + "integrity": "sha1-tn+Ku/1KHYhBSF8D9B8szy4FHYg=", "requires": { - "ast-types": "0.11.7", + "ast-types": "0.12.2", "esprima": "~4.0.0", - "private": "~0.1.5", + "private": "^0.1.8", "source-map": "~0.6.1" } }, "source-map": { "version": "0.6.1", - "resolved": "https://npm.squarespace.net:8443/s/source-map/_attachments/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" } } }, @@ -3102,9 +3086,9 @@ } }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://npm.squarespace.net:8443/r/regenerator-runtime/_attachments/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.2", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc=" }, "regenerator-transform": { "version": "0.13.3", @@ -3175,7 +3159,7 @@ }, "remove-trailing-separator": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, @@ -3187,7 +3171,7 @@ }, "repeat-string": { "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, @@ -3207,14 +3191,13 @@ "version": "1.10.0", "resolved": "https://npm.squarespace.net:8443/r/resolve/_attachments/resolve-1.10.0.tgz", "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, "requires": { "path-parse": "^1.0.6" } }, "resolve-url": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, @@ -3227,12 +3210,11 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -3242,8 +3224,7 @@ "semver": { "version": "5.6.0", "resolved": "https://npm.squarespace.net:8443/s/semver/_attachments/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "set-blocking": { "version": "2.0.0", @@ -3410,9 +3391,8 @@ }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { "version": "0.5.2", @@ -3447,7 +3427,7 @@ }, "source-map-url": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, @@ -3462,7 +3442,7 @@ }, "static-extend": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { @@ -3472,7 +3452,7 @@ "dependencies": { "define-property": { "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { @@ -3520,20 +3500,18 @@ "version": "5.4.0", "resolved": "https://npm.squarespace.net:8443/s/supports-color/_attachments/supports-color-5.4.0.tgz", "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, "requires": { "has-flag": "^3.0.0" } }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://npm.squarespace.net:8443/t/to-fast-properties/_attachments/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "to-object-path": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { @@ -3542,7 +3520,7 @@ "dependencies": { "kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { @@ -3565,7 +3543,7 @@ }, "to-regex-range": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { @@ -3575,9 +3553,8 @@ }, "trim-right": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", @@ -3609,7 +3586,7 @@ }, "union-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { @@ -3621,7 +3598,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -3630,7 +3607,7 @@ }, "set-value": { "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { @@ -3644,7 +3621,7 @@ }, "unset-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { @@ -3654,7 +3631,7 @@ "dependencies": { "has-value": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { @@ -3665,7 +3642,7 @@ "dependencies": { "isobject": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, "requires": { @@ -3676,7 +3653,7 @@ }, "has-values": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true } @@ -3691,7 +3668,7 @@ }, "urix": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/urix/-/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, @@ -3703,7 +3680,7 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true @@ -3772,7 +3749,7 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://avdigitalweb.pkgs.visualstudio.com/_packaging/AvivaDigital.NPM/npm/registry/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, diff --git a/package.json b/package.json index f4bb014..3bbf982 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "lodash": "^4.17.10", - "react-docgen": "^3.0.0", + "react-docgen": "^4.1.0", "recast": "^0.14.7" }, "license": "MIT" diff --git a/src/actualNameHandler.js b/src/actualNameHandler.js index ab1c891..9d1b4fa 100644 --- a/src/actualNameHandler.js +++ b/src/actualNameHandler.js @@ -11,7 +11,7 @@ * This is heavily based on the react-docgen `displayNameHandler` but instead defines an `actualName` property on the * generated docs that is taken first from the component's actual name. This addresses an issue where the name that * the generated docs are stored under is incorrectly named with the `displayName` and not the component's actual name. - * + * */ import { utils } from 'react-docgen'; @@ -30,7 +30,9 @@ export default function actualNameHandler(documentation, path) { documentation.set('actualName', getNameOrValue(path.get('id'))); } else if ( types.ArrowFunctionExpression.check(path.node) || - types.FunctionExpression.check(path.node) + types.FunctionExpression.check(path.node) || + // React.forwardRef + types.CallExpression.check(path.node) ) { if (types.VariableDeclarator.check(path.parentPath.node)) { documentation.set('actualName', getNameOrValue(path.parentPath.get('id'))); diff --git a/test/fixtures/forwardRef/actual.js b/test/fixtures/forwardRef/actual.js new file mode 100644 index 0000000..38fdd9a --- /dev/null +++ b/test/fixtures/forwardRef/actual.js @@ -0,0 +1,32 @@ +import React from 'react'; + +/** + * forwardRef Wrapped Component + */ +const ErrorBox = React.forwardRef(({ children, color }, ref) => { + return ( +
+ {children} +
+ ); +}); + +ErrorBox.displayName = 'ErrorBox'; + +ErrorBox.defaultProps = { + color: 'red' +} + +ErrorBox.propTypes = { + /** + * Children + */ + children: React.PropTypes.node.isRequired, + + /** + * Color + */ + color: React.PropTypes.oneOf(['red', 'green', 'blue']) +}; + +export { ErrorBox } diff --git a/test/fixtures/forwardRef/expected.js b/test/fixtures/forwardRef/expected.js new file mode 100644 index 0000000..0c19702 --- /dev/null +++ b/test/fixtures/forwardRef/expected.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ErrorBox = void 0; + +var _react = _interopRequireDefault(require("react")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * forwardRef Wrapped Component + */ +var ErrorBox = _react.default.forwardRef(function (_ref, ref) { + var children = _ref.children, + color = _ref.color; + return _react.default.createElement("div", { + className: "error-box", + style: { + color: color + } + }, children); +}); + +exports.ErrorBox = ErrorBox; +ErrorBox.displayName = 'ErrorBox'; +ErrorBox.defaultProps = { + color: 'red' +}; +ErrorBox.propTypes = { + /** + * Children + */ + children: _react.default.PropTypes.node.isRequired, + + /** + * Color + */ + color: _react.default.PropTypes.oneOf(['red', 'green', 'blue']) +}; +ErrorBox.__docgenInfo = { + "description": "forwardRef Wrapped Component", + "methods": [], + "displayName": "ErrorBox", + "props": { + "color": { + "defaultValue": { + "value": "'red'", + "computed": false + }, + "type": { + "name": "enum", + "value": [{ + "value": "'red'", + "computed": false + }, { + "value": "'green'", + "computed": false + }, { + "value": "'blue'", + "computed": false + }] + }, + "required": false, + "description": "Color" + }, + "children": { + "type": { + "name": "node" + }, + "required": true, + "description": "Children" + } + } +}; + +if (typeof STORYBOOK_REACT_CLASSES !== "undefined") { + STORYBOOK_REACT_CLASSES["test/fixtures/forwardRef/actual.js"] = { + name: "ErrorBox", + docgenInfo: ErrorBox.__docgenInfo, + path: "test/fixtures/forwardRef/actual.js" + }; +} \ No newline at end of file