From b7d53b80729ddcf5be241a92973f91f5a0cde0d8 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 25 Aug 2023 15:29:33 -0600 Subject: [PATCH] Add TypeDoc 0.25 support --- CHANGELOG.md | 4 ++++ package.json | 8 ++++---- test/packages.test.ts | 34 ++++++++++++++++++++-------------- yarn.lock | 26 +++++++++++++------------- 4 files changed, 41 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00d0d7e..6d60bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 2.0.2 (2023-08-25) + +- Added support for TypeDoc 0.25.x + ### 2.0.1 (2023-07-29) - Fixed memory leak when running in watch mode / packages mode, TypeStrong/typedoc#2339 diff --git a/package.json b/package.json index 02a3723..0de620b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typedoc-plugin-missing-exports", - "version": "2.0.1", + "version": "2.0.2", "description": "Include non-exported types in TypeDoc documentation", "main": "./index.js", "exports": "./index.js", @@ -9,8 +9,8 @@ "devDependencies": { "@types/node": "16", "prettier": "3.0.0", - "typedoc": "^0.24.8", - "typescript": "^5.1.6", + "typedoc": "^0.25.0", + "typescript": "^5.2.2", "vitest": "^0.33.0" }, "repository": { @@ -24,7 +24,7 @@ "typedoc-plugin" ], "peerDependencies": { - "typedoc": "0.24.x" + "typedoc": "0.24.x || 0.25.x" }, "scripts": { "test": "vitest run test/packages.test.ts", diff --git a/test/packages.test.ts b/test/packages.test.ts index 40d22d6..b19d872 100644 --- a/test/packages.test.ts +++ b/test/packages.test.ts @@ -6,23 +6,29 @@ import { LogLevel, TSConfigReader, } from "typedoc"; -import { test, expect } from "vitest"; +import { test, expect, beforeAll } from "vitest"; import { load } from ".."; -const app = new Application(); -app.options.addReader(new TSConfigReader()); -app.bootstrap({ - tsconfig: join(__dirname, "packages", "tsconfig.json"), - excludeExternals: true, - excludeInternal: true, - logLevel: LogLevel.Warn, +let app: Application; +let program: ts.Program; + +beforeAll(async () => { + app = await Application.bootstrap( + { + tsconfig: join(__dirname, "packages", "tsconfig.json"), + excludeExternals: true, + excludeInternal: true, + logLevel: LogLevel.Warn, + }, + [new TSConfigReader()], + ); + load(app); + + program = ts.createProgram( + app.options.getFileNames(), + app.options.getCompilerOptions(), + ); }); -load(app); - -const program = ts.createProgram( - app.options.getFileNames(), - app.options.getCompilerOptions(), -); test("No missing exports", () => { const entry: DocumentationEntryPoint = { diff --git a/yarn.lock b/yarn.lock index 364aaa4..4c85544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -374,10 +374,10 @@ marked@^4.3.0: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== -minimatch@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56" - integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w== +minimatch@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" @@ -567,20 +567,20 @@ type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -typedoc@^0.24.8: - version "0.24.8" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e" - integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== +typedoc@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.0.tgz#287f83d01c1c2186766884f4e04d698820d68115" + integrity sha512-FvCYWhO1n5jACE0C32qg6b3dSfQ8f2VzExnnRboowHtqUD6ARzM2r8YJeZFYXhcm2hI4C2oCRDgNPk/yaQUN9g== dependencies: lunr "^2.3.9" marked "^4.3.0" - minimatch "^9.0.0" + minimatch "^9.0.3" shiki "^0.14.1" -typescript@^5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== +typescript@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== ufo@^1.1.1: version "1.1.1"