Skip to content

Commit fe5fff1

Browse files
committed
Support TypeDoc 0.26
1 parent 56b6b1a commit fe5fff1

File tree

4 files changed

+181
-143
lines changed

4 files changed

+181
-143
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### 3.0.0 (2024-06-22)
2+
3+
- Support TypeDoc 0.26
4+
- BREAKING: Drop support for TypeDoc before 0.26.
5+
16
### 2.3.0 (2024-06-12)
27

38
- Added `--collapseInternalModule` option.

index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ export function load(app: Application) {
118118
app.converter.on(
119119
Converter.EVENT_CREATE_DECLARATION,
120120
(context: Context, refl: Reflection) => {
121+
// TypeDoc 0.26 doesn't fire EVENT_CREATE_DECLARATION for project
122+
// We need to ensure the project has a program attached to it, so
123+
// do that when the first declaration is created.
124+
if (knownPrograms.size === 0) {
125+
knownPrograms.set(refl.project, context.program);
126+
}
121127
if (refl.kindOf(ModuleLike)) {
122128
knownPrograms.set(refl, context.program);
123129
}
@@ -195,7 +201,6 @@ export function load(app: Application) {
195201
referencedSymbols.clear();
196202
symbolToOwningModule.clear();
197203
},
198-
void 0,
199204
1e9,
200205
);
201206

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typedoc-plugin-missing-exports",
3-
"version": "2.3.0",
3+
"version": "3.0.0",
44
"description": "Include non-exported types in TypeDoc documentation",
55
"exports": "./index.js",
66
"type": "module",
@@ -10,8 +10,8 @@
1010
"@types/node": "18",
1111
"outdent": "^0.8.0",
1212
"prettier": "3.3.2",
13-
"typedoc": "^0.25.13",
14-
"typescript": "^5.4.5",
13+
"typedoc": "^0.26.0",
14+
"typescript": "^5.5.2",
1515
"vitest": "^1.6.0"
1616
},
1717
"repository": {
@@ -25,11 +25,12 @@
2525
"typedoc-plugin"
2626
],
2727
"peerDependencies": {
28-
"typedoc": "0.24.x || 0.25.x"
28+
"typedoc": "0.26.x"
2929
},
3030
"scripts": {
3131
"test": "vitest run test/packages.test.ts",
3232
"test:doc": "typedoc --plugin ./index.js --tsconfig ./test/packages",
33-
"build": "tsc"
33+
"build": "tsc",
34+
"lint": "prettier --check ."
3435
}
3536
}

0 commit comments

Comments
 (0)