From 91cfe2e676f3d4d95e1022ce7532c218d3dfd06e Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Thu, 9 Jan 2020 10:19:25 -0700 Subject: [PATCH 01/10] chore: Bump version --- package-lock.json | 238 +++++++++++++++++++++++++++++++++++----------- package.json | 8 +- 2 files changed, 187 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index 412516de4..93bf707a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typedoc", - "version": "0.15.6", + "version": "0.15.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -321,9 +321,9 @@ "dev": true }, "@types/node": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.1.tgz", - "integrity": "sha512-hx6zWtudh3Arsbl3cXay+JnkvVgCKzCWKv42C9J01N2T2np4h8w5X8u6Tpz5mj38kE3M9FM0Pazx8vKFFMnjLQ==", + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.6.tgz", + "integrity": "sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg==", "dev": true }, "@types/shelljs": { @@ -367,6 +367,16 @@ "color-convert": "^1.9.0" } }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "append-transform": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", @@ -404,6 +414,12 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -413,6 +429,15 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -454,6 +479,22 @@ "supports-color": "^5.3.0" } }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -604,21 +645,22 @@ "dev": true }, "es-abstract": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", - "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.0", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.6.0", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" } }, "es-to-primitive": { @@ -656,6 +698,15 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-cache-dir": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", @@ -723,6 +774,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -748,6 +806,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -792,9 +859,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "hasha": { @@ -858,6 +925,15 @@ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", @@ -865,15 +941,21 @@ "dev": true }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "dev": true }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { @@ -882,13 +964,28 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", "dev": true, "requires": { - "has": "^1.0.1" + "has": "^1.0.3" } }, "is-stream": { @@ -898,12 +995,12 @@ "dev": true }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, "is-typedarray": { @@ -1171,13 +1268,14 @@ } }, "mocha": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", - "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz", + "integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==", "dev": true, "requires": { "ansi-colors": "3.2.3", "browser-stdout": "1.3.1", + "chokidar": "3.3.0", "debug": "3.2.6", "diff": "3.5.0", "escape-string-regexp": "1.0.5", @@ -1190,7 +1288,7 @@ "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", - "node-environment-flags": "1.0.5", + "node-environment-flags": "1.0.6", "object.assign": "4.1.0", "strip-json-comments": "2.0.1", "supports-color": "6.0.0", @@ -1320,9 +1418,9 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", "dev": true, "requires": { "object.getownpropertydescriptors": "^2.0.3", @@ -1346,6 +1444,12 @@ "process-on-spawn": "^1.0.0" } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "nyc": { "version": "15.0.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.0.tgz", @@ -1433,9 +1537,9 @@ } }, "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", "dev": true }, "object-keys": { @@ -1457,13 +1561,13 @@ } }, "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "once": { @@ -1550,6 +1654,12 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, + "picomatch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==", + "dev": true + }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -1609,6 +1719,15 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -1790,9 +1909,9 @@ } }, "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -1800,9 +1919,9 @@ } }, "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -1872,6 +1991,15 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", @@ -1958,9 +2086,9 @@ } }, "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==" }, "universalify": { "version": "0.1.2", diff --git a/package.json b/package.json index 070e2014b..227d88cca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.15.6", + "version": "0.15.7", "homepage": "https://typedoc.org", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -32,7 +32,7 @@ "dependencies": { "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "^4.5.3", + "handlebars": "~4.5.3", "highlight.js": "^9.17.1", "lodash": "^4.17.15", "marked": "^0.8.0", @@ -48,9 +48,9 @@ "@types/marked": "^0.7.2", "@types/mocha": "^5.2.7", "@types/mockery": "^1.4.29", - "@types/node": "^13.1.1", + "@types/node": "^13.1.6", "@types/shelljs": "^0.8.6", - "mocha": "^6.2.2", + "mocha": "^7.0.0", "mockery": "^2.1.0", "nyc": "15.0.0", "tslint": "^5.20.1" From 7e1f65e40024dc4fc280960159fc13edddc0228e Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 10 Jan 2020 10:06:16 -0700 Subject: [PATCH 02/10] fix: Update handlebars to 4.7 --- package-lock.json | 12 ++++++------ package.json | 2 +- src/lib/output/plugins/MarkedPlugin.ts | 2 +- src/lib/output/renderer.ts | 2 +- src/lib/output/utils/resources/templates.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ecccd718..672087a30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -766,9 +766,9 @@ "dev": true }, "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.0.tgz", + "integrity": "sha512-PaZ6G6nYzfJ0Hd1WIhOpsnUPWh1R0Pg//r4wEYOtzG65c2V8RJQ/++yYlVmuoQ7EMXcb4eri5+FB2XH1Lwed9g==", "requires": { "neo-async": "^2.6.0", "optimist": "^0.6.1", @@ -1948,9 +1948,9 @@ "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==" }, "uglify-js": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", - "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.4.tgz", + "integrity": "sha512-tinYWE8X1QfCHxS1lBS8yiDekyhSXOO6R66yNOCdUJeojxxw+PX2BHAz/BWyW7PQ7pkiWVxJfIEbiDxyLWvUGg==", "optional": true, "requires": { "commander": "~2.20.3", diff --git a/package.json b/package.json index 976c90f6b..f843c1c2c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "^4.5.3", + "handlebars": "^4.7.0", "highlight.js": "^9.17.1", "lodash": "^4.17.15", "marked": "^0.8.0", diff --git a/src/lib/output/plugins/MarkedPlugin.ts b/src/lib/output/plugins/MarkedPlugin.ts index e5ec73051..8b506e386 100644 --- a/src/lib/output/plugins/MarkedPlugin.ts +++ b/src/lib/output/plugins/MarkedPlugin.ts @@ -139,7 +139,7 @@ export class MarkedPlugin extends ContextAwareRendererComponent { const contents = FS.readFileSync(path, 'utf-8'); if (path.substr(-4).toLocaleLowerCase() === '.hbs') { const template = Handlebars.compile(contents); - return template(context); + return template(context, { allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); } else { return contents; } diff --git a/src/lib/output/renderer.ts b/src/lib/output/renderer.ts index beb0e9004..47d91687c 100644 --- a/src/lib/output/renderer.ts +++ b/src/lib/output/renderer.ts @@ -163,7 +163,7 @@ export class Renderer extends ChildableComponent // Theme must be set as this is only called in render, and render ensures theme is set. page.template = page.template || this.theme!.resources.templates.getResource(page.templateName)!.getTemplate(); - page.contents = page.template(page); + page.contents = page.template(page, { allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); this.trigger(PageEvent.END, page); if (page.isDefaultPrevented) { diff --git a/src/lib/output/utils/resources/templates.ts b/src/lib/output/utils/resources/templates.ts index ef495c281..84b43da65 100644 --- a/src/lib/output/utils/resources/templates.ts +++ b/src/lib/output/utils/resources/templates.ts @@ -17,9 +17,9 @@ export class Template extends Resource { return this.template; } - render(context: any, options?: any): string { + render(context: any, options?: Handlebars.RuntimeOptions): string { const template = this.getTemplate(); - return template(context, options); + return template(context, { ...options, allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); } } From 6bce37b9aca4e39a06c692f754955da088893b17 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 10 Jan 2020 10:07:02 -0700 Subject: [PATCH 03/10] chore: Bump version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 672087a30..41de5faa1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typedoc", - "version": "0.16.0-3", + "version": "0.16.0-4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f843c1c2c..fe11aa7da 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.16.0-3", + "version": "0.16.0-4", "homepage": "https://typedoc.org", "main": "dist/index.js", "typings": "dist/index.d.ts", From 2cbb0897a1a78011fb8547370ab60e1dc5a1a6ad Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 10 Jan 2020 10:06:16 -0700 Subject: [PATCH 04/10] fix: Update handlebars to 4.7 --- package-lock.json | 12 ++++++------ package.json | 2 +- src/lib/output/plugins/MarkedPlugin.ts | 2 +- src/lib/output/renderer.ts | 2 +- src/lib/output/utils/resources/templates.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93bf707a9..31b2ba3e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -833,9 +833,9 @@ "dev": true }, "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.0.tgz", + "integrity": "sha512-PaZ6G6nYzfJ0Hd1WIhOpsnUPWh1R0Pg//r4wEYOtzG65c2V8RJQ/++yYlVmuoQ7EMXcb4eri5+FB2XH1Lwed9g==", "requires": { "neo-async": "^2.6.0", "optimist": "^0.6.1", @@ -2076,9 +2076,9 @@ "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==" }, "uglify-js": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", - "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.4.tgz", + "integrity": "sha512-tinYWE8X1QfCHxS1lBS8yiDekyhSXOO6R66yNOCdUJeojxxw+PX2BHAz/BWyW7PQ7pkiWVxJfIEbiDxyLWvUGg==", "optional": true, "requires": { "commander": "~2.20.3", diff --git a/package.json b/package.json index 227d88cca..f9bfcded8 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "~4.5.3", + "handlebars": "^4.7.0", "highlight.js": "^9.17.1", "lodash": "^4.17.15", "marked": "^0.8.0", diff --git a/src/lib/output/plugins/MarkedPlugin.ts b/src/lib/output/plugins/MarkedPlugin.ts index e5ec73051..8b506e386 100644 --- a/src/lib/output/plugins/MarkedPlugin.ts +++ b/src/lib/output/plugins/MarkedPlugin.ts @@ -139,7 +139,7 @@ export class MarkedPlugin extends ContextAwareRendererComponent { const contents = FS.readFileSync(path, 'utf-8'); if (path.substr(-4).toLocaleLowerCase() === '.hbs') { const template = Handlebars.compile(contents); - return template(context); + return template(context, { allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); } else { return contents; } diff --git a/src/lib/output/renderer.ts b/src/lib/output/renderer.ts index beb0e9004..47d91687c 100644 --- a/src/lib/output/renderer.ts +++ b/src/lib/output/renderer.ts @@ -163,7 +163,7 @@ export class Renderer extends ChildableComponent // Theme must be set as this is only called in render, and render ensures theme is set. page.template = page.template || this.theme!.resources.templates.getResource(page.templateName)!.getTemplate(); - page.contents = page.template(page); + page.contents = page.template(page, { allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); this.trigger(PageEvent.END, page); if (page.isDefaultPrevented) { diff --git a/src/lib/output/utils/resources/templates.ts b/src/lib/output/utils/resources/templates.ts index ef495c281..84b43da65 100644 --- a/src/lib/output/utils/resources/templates.ts +++ b/src/lib/output/utils/resources/templates.ts @@ -17,9 +17,9 @@ export class Template extends Resource { return this.template; } - render(context: any, options?: any): string { + render(context: any, options?: Handlebars.RuntimeOptions): string { const template = this.getTemplate(); - return template(context, options); + return template(context, { ...options, allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true }); } } From aa59c1edb141c43d386e1e9d1a902ee95694b1ad Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 10 Jan 2020 10:34:09 -0700 Subject: [PATCH 05/10] chore: Bump version to 0.15.8 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31b2ba3e9..3e4f2acac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typedoc", - "version": "0.15.7", + "version": "0.15.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f9bfcded8..9a5578a4f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.15.7", + "version": "0.15.8", "homepage": "https://typedoc.org", "main": "dist/index.js", "typings": "dist/index.d.ts", From 89c4041629b000aa63ec4a935f21936f550a97eb Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 10 Jan 2020 11:38:11 -0700 Subject: [PATCH 06/10] fix!: Correctly check if symbols are exported This corrects the change made in 9c3114d6bedeafc440d294646a0df07a76188ca6 to use the type checker. Also reworks converter.test.ts to remove dead code + simplify adding new tests. --- scripts/rebuild_specs.js | 9 +- src/lib/converter/factories/declaration.ts | 9 +- src/test/converter.test.ts | 245 ++++-------------- .../converter/declaration/declaration.d.ts | 5 + .../declaration/export-declaration.d.ts | 3 + src/test/converter/declaration/specs.d.json | 182 +++++++++++++ .../classes/_flattened_.flattenedclass.html | 52 ++-- ...script_1_3_.classwithprotectedmembers.html | 56 ++-- ...ipt_1_3_.subclasswithprotectedmembers.html | 42 +-- .../specs/interfaces/_generics_.a.html | 30 +-- .../specs/interfaces/_generics_.ab.html | 46 ++-- .../specs/interfaces/_generics_.abnumber.html | 46 ++-- .../specs/interfaces/_generics_.abstring.html | 46 ++-- .../specs/interfaces/_generics_.b.html | 38 +-- .../renderer/specs/modules/_flattened_.html | 36 +-- .../renderer/specs/modules/_generics_.html | 58 ++--- .../specs/modules/_typescript_1_3_.html | 20 +- .../specs/modules/_typescript_1_5_.html | 82 +++--- 18 files changed, 533 insertions(+), 472 deletions(-) create mode 100644 src/test/converter/declaration/declaration.d.ts create mode 100644 src/test/converter/declaration/export-declaration.d.ts create mode 100644 src/test/converter/declaration/specs.d.json diff --git a/scripts/rebuild_specs.js b/scripts/rebuild_specs.js index a66d8be84..267ed6e05 100644 --- a/scripts/rebuild_specs.js +++ b/scripts/rebuild_specs.js @@ -17,7 +17,8 @@ const app = new TypeDoc.Application({ "lib.es2015.iterable.d.ts", "lib.es2015.collection.d.ts" ], - name: 'typedoc' + name: 'typedoc', + excludeExternals: true }); // Note that this uses the test files in dist, not in src, this is important since @@ -27,6 +28,10 @@ const base = path.join(__dirname, '../dist/test/converter'); /** @type {[string, () => void, () => void][]} */ const conversions = [ ['specs', () => { }, () => { }], + ['specs.d', + () => app.options.setValue('includeDeclarations', true), + () => app.options.setValue('includeDeclarations', false) + ], ['specs-without-exported', () => app.options.setValue('excludeNotExported', true), () => app.options.setValue('excludeNotExported', false) @@ -73,7 +78,9 @@ async function rebuildRendererTest() { const out = path.join(__dirname, '../src/test/renderer/specs'); await fs.remove(out) + app.options.setValue('excludeExternals', false); app.generateDocs(app.expandInputFiles([src]), out) + app.options.setValue('excludeExternals', true); await fs.remove(path.join(out, 'assets')) /** diff --git a/src/lib/converter/factories/declaration.ts b/src/lib/converter/factories/declaration.ts index cb2db72d0..eef95c024 100644 --- a/src/lib/converter/factories/declaration.ts +++ b/src/lib/converter/factories/declaration.ts @@ -82,7 +82,14 @@ export function createDeclaration(context: Context, node: ts.Declaration, kind: while (![ts.SyntaxKind.SourceFile, ts.SyntaxKind.ModuleDeclaration].includes(parentNode.kind)) { parentNode = parentNode.parent; } - isExported = !!context.getSymbolAtLocation(parentNode)?.exports?.get(symbol.escapedName); + const parentSymbol = context.getSymbolAtLocation(parentNode); + if (!parentSymbol) { + // This is a file with no imports/exports, so everything is + // global and therefore exported. + isExported = true; + } else { + isExported = !!parentSymbol.exports?.get(symbol.escapedName); + } } } else { isExported = container.flags.isExported; diff --git a/src/test/converter.test.ts b/src/test/converter.test.ts index ebb09ae07..d05be395a 100644 --- a/src/test/converter.test.ts +++ b/src/test/converter.test.ts @@ -1,79 +1,38 @@ import { Application, resetReflectionID, normalizePath, ProjectReflection } from '..'; import * as FS from 'fs'; import * as Path from 'path'; -import Assert = require('assert'); - -function compareReflections(fixture, spec, path?: string) { - path = (path ? path + '/' : '') + spec.name; - Assert.deepEqual(fixture, spec); - - for (let key in spec) { - if (!spec.hasOwnProperty(key)) { - continue; - } - Assert(fixture.hasOwnProperty(key), path + ': Missing property "' + key + '"'); - } - - for (let key in fixture) { - if (!fixture.hasOwnProperty(key) || typeof fixture[key] === 'undefined') { - continue; - } - Assert(spec.hasOwnProperty(key), path + ': Unknown property "' + key + '"'); - - const a = fixture[key]; - const b = spec[key]; - Assert(a instanceof Object === b instanceof Object, path + ': Property "' + key + '" type mismatch'); - - if (a instanceof Object) { - switch (key) { - case 'signatures': - case 'typeParameters': - case 'children': - compareChildren(a, b, path); - break; - case 'indexSignature': - case 'getSignature': - case 'setSignature': - compareReflections(a, b, path); - break; - default: - Assert.deepEqual(a, b, path + ': Property "' + key + '" value mismatch'); - } - } else { - Assert(a === b, path + ': Property "' + key + '" value mismatch'); - } - } -} - -function compareChildren(fixture, spec, path) { - const a = fixture.map(function(child) { return child.id; }); - const b = spec.map(function(child) { return child.id; }); - - Assert(a.length === b.length, path + ': Number of children differs'); - Assert(a.every(function(u, i) { return u === b[i]; }), path + ': Children are different'); - - fixture.forEach(function(a, index) { - compareReflections(a, spec[index], path); - }); -} +import { deepStrictEqual as equal, ok } from 'assert'; describe('Converter', function() { const base = Path.join(__dirname, 'converter'); - let app: Application; - - before('constructs', function() { - app = new Application({ - mode: 'Modules', - logger: 'none', - target: 'ES5', - module: 'CommonJS', - experimentalDecorators: true, - jsx: 'react', - name: 'typedoc', - ignoreCompilerErrors: true - }); + const app = new Application({ + mode: 'Modules', + logger: 'none', + target: 'ES5', + module: 'CommonJS', + experimentalDecorators: true, + jsx: 'react', + name: 'typedoc', + ignoreCompilerErrors: true, + excludeExternals: true }); + const checks: [string, () => void, () => void][] = [ + ['specs', () => { }, () => { }], + ['specs.d', + () => app.options.setValue('includeDeclarations', true), + () => app.options.setValue('includeDeclarations', false) + ], + ['specs-without-exported', + () => app.options.setValue('excludeNotExported', true), + () => app.options.setValue('excludeNotExported', false) + ], + ['specs-with-lump-categories', + () => app.options.setValue('categorizeByGroup', false), + () => app.options.setValue('categorizeByGroup', true) + ] + ]; + FS.readdirSync(base).forEach(function (directory) { const path = Path.join(base, directory); if (!FS.lstatSync(path).isDirectory()) { @@ -81,133 +40,31 @@ describe('Converter', function() { } describe(directory, function() { - let result: ProjectReflection | undefined; - - it('converts fixtures', function() { - resetReflectionID(); - result = app.convert(app.expandInputFiles([path])); - Assert(result instanceof ProjectReflection, 'No reflection returned'); - }); - - it('matches specs', function() { - const specs = JSON.parse(FS.readFileSync(Path.join(path, 'specs.json')).toString()); - let data = JSON.stringify(app.serializer.toObject(result), null, ' '); - data = data.split(normalizePath(base)).join('%BASE%'); - - compareReflections(JSON.parse(data), specs); - }); - }); - }); -}); - -describe('Converter with categorizeByGroup=false', function() { - const base = Path.join(__dirname, 'converter'); - const categoryDir = Path.join(base, 'category'); - const classDir = Path.join(base, 'class'); - let app: Application; - - before('constructs', function() { - app = new Application({ - mode: 'Modules', - logger: 'none', - target: 'ES5', - module: 'CommonJS', - experimentalDecorators: true, - categorizeByGroup: false, - jsx: 'react', - name: 'typedoc', - ignoreCompilerErrors: true - }); - }); - - let result: ProjectReflection | undefined; - - describe('category', () => { - it('converts fixtures', function() { - resetReflectionID(); - result = app.convert(app.expandInputFiles([categoryDir])); - Assert(result instanceof ProjectReflection, 'No reflection returned'); - }); - - it('matches specs', function() { - const specs = JSON.parse(FS.readFileSync(Path.join(categoryDir, 'specs-with-lump-categories.json')).toString()); - let data = JSON.stringify(result!.toObject(), null, ' '); - data = data.split(normalizePath(base)).join('%BASE%'); - - compareReflections(JSON.parse(data), specs); - }); - }); - - // verify that no categories are used when not specified during lump categorization - describe('class', () => { - it('converts fixtures', function() { - resetReflectionID(); - result = app.convert(app.expandInputFiles([classDir])); - Assert(result instanceof ProjectReflection, 'No reflection returned'); - }); - - it('matches specs', function() { - const specs = JSON.parse(FS.readFileSync(Path.join(classDir, 'specs.json')).toString()); - let data = JSON.stringify(result!.toObject(), null, ' '); - data = data.split(normalizePath(base)).join('%BASE%'); - - compareReflections(JSON.parse(data), specs); + for (const [file, before, after] of checks) { + const specsFile = Path.join(path, `${file}.json`); + if (!FS.existsSync(specsFile)) { + continue; + } + + let result: ProjectReflection | undefined; + + it(`[${file}] converts fixtures`, function() { + before(); + resetReflectionID(); + result = app.convert(app.expandInputFiles([path])); + after(); + ok(result instanceof ProjectReflection, 'No reflection returned'); + }); + + it(`[${file}] matches specs`, function() { + const specs = JSON.parse(FS.readFileSync(specsFile, 'utf-8')); + let data = JSON.stringify(app.serializer.toObject(result), null, ' '); + data = data.split(normalizePath(base)).join('%BASE%'); + + equal(JSON.parse(data), specs); + }); + } }); }); }); -describe('Converter with excludeNotExported=true', function() { - const base = Path.join(__dirname, 'converter'); - const exportWithLocalDir = Path.join(base, 'export-with-local'); - const classDir = Path.join(base, 'class'); - let app: Application; - - before('constructs', function() { - app = new Application({ - mode: 'Modules', - logger: 'none', - target: 'ES5', - module: 'CommonJS', - experimentalDecorators: true, - excludeNotExported: true, - jsx: 'react', - name: 'typedoc', - ignoreCompilerErrors: true - }); - }); - - let result: ProjectReflection | undefined; - - describe('export-with-local', () => { - it('converts fixtures', function() { - resetReflectionID(); - result = app.convert(app.expandInputFiles([exportWithLocalDir])); - Assert(result instanceof ProjectReflection, 'No reflection returned'); - }); - - it('matches specs', function() { - const specs = JSON.parse(FS.readFileSync(Path.join(exportWithLocalDir, 'specs-without-exported.json')).toString()); - let data = JSON.stringify(result!.toObject(), null, ' '); - data = data.split(normalizePath(base)).join('%BASE%'); - - compareReflections(JSON.parse(data), specs); - }); - }); - - describe('class', () => { - it('converts fixtures', function() { - resetReflectionID(); - result = app.convert(app.expandInputFiles([classDir])); - Assert(result instanceof ProjectReflection, 'No reflection returned'); - }); - - it('matches specs', function() { - const specs = JSON.parse(FS.readFileSync(Path.join(classDir, 'specs-without-exported.json')).toString()); - let data = JSON.stringify(result!.toObject(), null, ' '); - data = data.split(normalizePath(base)).join('%BASE%'); - - compareReflections(JSON.parse(data), specs); - }); - }); - -}); diff --git a/src/test/converter/declaration/declaration.d.ts b/src/test/converter/declaration/declaration.d.ts new file mode 100644 index 000000000..8c7e5e01d --- /dev/null +++ b/src/test/converter/declaration/declaration.d.ts @@ -0,0 +1,5 @@ +declare class Decl { + prop: number; +} + +declare const x: number diff --git a/src/test/converter/declaration/export-declaration.d.ts b/src/test/converter/declaration/export-declaration.d.ts new file mode 100644 index 000000000..d8bdd162e --- /dev/null +++ b/src/test/converter/declaration/export-declaration.d.ts @@ -0,0 +1,3 @@ +export declare class Exported {} + +declare class NotExported {} diff --git a/src/test/converter/declaration/specs.d.json b/src/test/converter/declaration/specs.d.json new file mode 100644 index 000000000..e42288d8c --- /dev/null +++ b/src/test/converter/declaration/specs.d.json @@ -0,0 +1,182 @@ +{ + "id": 0, + "name": "typedoc", + "kind": 0, + "flags": {}, + "children": [ + { + "id": 1, + "name": "\"declaration.d\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/declaration/declaration.d.ts", + "children": [ + { + "id": 2, + "name": "Decl", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 3, + "name": "prop", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "declaration.d.ts", + "line": 2, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 3 + ] + } + ], + "sources": [ + { + "fileName": "declaration.d.ts", + "line": 1, + "character": 18 + } + ] + }, + { + "id": 4, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "declaration.d.ts", + "line": 5, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 2 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 4 + ] + } + ], + "sources": [ + { + "fileName": "declaration.d.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 5, + "name": "\"export-declaration.d\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/declaration/export-declaration.d.ts", + "children": [ + { + "id": 6, + "name": "Exported", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "export-declaration.d.ts", + "line": 1, + "character": 29 + } + ] + }, + { + "id": 7, + "name": "NotExported", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "export-declaration.d.ts", + "line": 3, + "character": 25 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 6, + 7 + ] + } + ], + "sources": [ + { + "fileName": "export-declaration.d.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "External modules", + "kind": 1, + "children": [ + 1, + 5 + ] + } + ] +} \ No newline at end of file diff --git a/src/test/renderer/specs/classes/_flattened_.flattenedclass.html b/src/test/renderer/specs/classes/_flattened_.flattenedclass.html index 0494dc7f5..1c9b8fdff 100644 --- a/src/test/renderer/specs/classes/_flattened_.flattenedclass.html +++ b/src/test/renderer/specs/classes/_flattened_.flattenedclass.html @@ -88,30 +88,30 @@

Hierarchy

Index

-
+

Constructors

-
+

constructor

-
    +
      @@ -170,9 +170,9 @@

      Returns

-
+

Properties

-
+

callback

callback: function
@@ -190,7 +190,7 @@

callback

Type declaration

  • -
      +
      • (param: number, optionalParam?: string): string
        @@ -217,7 +217,7 @@

        Returns string

-
+

indexed

indexed: object
@@ -254,7 +254,7 @@
test: +

multipleCallSignatures

multipleCallSignatures: function
@@ -277,7 +277,7 @@

multipleCallSignatures

Type declaration

  • -
-
+

options

options: object
@@ -422,35 +422,35 @@
Optional value diff --git a/src/test/renderer/specs/classes/_typescript_1_3_.classwithprotectedmembers.html b/src/test/renderer/specs/classes/_typescript_1_3_.classwithprotectedmembers.html index 07a99a02d..b347ec282 100644 --- a/src/test/renderer/specs/classes/_typescript_1_3_.classwithprotectedmembers.html +++ b/src/test/renderer/specs/classes/_typescript_1_3_.classwithprotectedmembers.html @@ -93,28 +93,28 @@

Hierarchy

Index

-
+

Properties

-
+

Private privateProperty

privateProperty: [boolean, string, string]
@@ -129,7 +129,7 @@

Private privateProperty

-
+

Protected protectedProperty

protectedProperty: string
@@ -144,7 +144,7 @@

Protected protectedPrope

-
+

publicProperty

publicProperty: string
@@ -160,12 +160,12 @@

publicProperty

-
+

Methods

-
+

Private privateMethod

-
    +
    • privateMethod(): void
      @@ -184,10 +184,10 @@

      Returns void

-
+

Protected protectedMethod

-
    +
    • protectedMethod(): void
      @@ -206,10 +206,10 @@

      Returns void

-
+

publicMethod

-
-
+

Properties

-
+

Protected protectedProperty

protectedProperty: string
@@ -128,7 +128,7 @@

Protected protectedPrope

-
+

publicProperty

publicProperty: string
@@ -145,12 +145,12 @@

publicProperty

-
+

Methods

-
+

Protected protectedMethod

-
    +
    • protectedMethod(): void
      @@ -170,10 +170,10 @@

      Returns void

-
+

publicMethod

-
-
+

Methods

-
+

getT

-
-
+

Methods

-
+

getC

-
    +
    • getC(): boolean
      @@ -155,10 +155,10 @@

      Returns boolean

-
+

getT

-
    +
    • getT(): T
      @@ -179,10 +179,10 @@

      Returns T<

-
+

setT

-
-
+

Methods

-
+

getC

-
    +
    • getC(): boolean
      @@ -130,10 +130,10 @@

      Returns boolean

-
+

getT

-
    +
    • getT(): number
      @@ -154,10 +154,10 @@

      Returns number

-
+

setT

-
-
+

Methods

-
+

getC

-
    +
    • getC(): boolean
      @@ -130,10 +130,10 @@

      Returns boolean

-
+

getT

-
    +
    • getT(): string
      @@ -154,10 +154,10 @@

      Returns string

-
+

setT

-
-
+

Methods

-
+

getC

-
    +
    • getC(): C
      @@ -149,10 +149,10 @@

      Returns C<

-
+

setT

-
-
+

Functions

-
+

flattenedCallback

-
    +
    • flattenedCallback(callback: function): void
      @@ -116,7 +116,7 @@
      callback: function
      • -
          +
          • (param: number, optionalParam?: string): string
            @@ -147,10 +147,10 @@

            Returns void

-
+

flattenedIndexSignature

-
    +
    • flattenedIndexSignature(indexed: object): void
      @@ -197,10 +197,10 @@

      Returns void

-
+

flattenedParameter

-
-
+

Type aliases

-
+

HorribleRecursiveTypeThatShouldNotBeUsedByAnyone

HorribleRecursiveTypeThatShouldNotBeUsedByAnyone<T, R>: object[T["length"] extends 0 ? 0 : 1]
@@ -124,7 +124,7 @@

R

-
+

PopFront

PopFront<T>: function extends function ? R : never
@@ -146,12 +146,12 @@

T: +

Functions

-
+

getGenericArray

-
    +
    • getGenericArray(): Array<string>
      @@ -171,10 +171,10 @@

      Returns Array

-
+

testFunction

-
-
+

Variables

-
+

tupleType

tupleType: [string, ClassWithProtectedMembers] = ['test', new ClassWithProtectedMembers()]
@@ -163,13 +163,13 @@

tupleType

-
+

Variables

-
+

destructArrayA

destructArrayA: number
@@ -107,7 +107,7 @@

destructArrayA

-
+

destructArrayB

destructArrayB: string
@@ -117,7 +117,7 @@

destructArrayB

-
+

destructArrayC

destructArrayC: number = 10
@@ -127,7 +127,7 @@

destructArrayC

-
+

destructArrayWithIgnoresA

destructArrayWithIgnoresA: number
@@ -137,7 +137,7 @@

destructArrayWithIgnoresA

-
+

destructArrayWithIgnoresRest

destructArrayWithIgnoresRest: [number, number]
@@ -147,7 +147,7 @@

destructArrayWithIgnoresRest

-
+

destructArrayWithRest

destructArrayWithRest: [number, number]
@@ -157,7 +157,7 @@

destructArrayWithRest

-
+

destructArrayWithRestA

destructArrayWithRestA: number
@@ -167,7 +167,7 @@

destructArrayWithRestA

-
+

destructArrayWithRestB

destructArrayWithRestB: number
@@ -177,7 +177,7 @@

destructArrayWithRestB

-
+

destructObjectA

destructObjectA: number
@@ -187,7 +187,7 @@

destructObjectA

-
+

destructObjectB

destructObjectB: string
@@ -197,7 +197,7 @@

destructObjectB

-
+

destructObjectC

destructObjectC: number
@@ -208,12 +208,12 @@

destructObjectC

-
+

Functions

-
+

drawText

-
    +
    • drawText(__namedParameters: object): void
      @@ -318,40 +318,40 @@

      Returns void