marcj/typedoc-plugin-lerna-packages

Incompatible with Typedoc v0.16.x

favna opened this issue · 7 comments

favna commented

Running typedoc v0.16.7 with this plugin produces the following error:

$ typedoc
Error: The plugin /Users/favna/workspace/air-node-packages/node_modules/typedoc-plugin-lerna-packages could not be loaded.

TypeError: component_1.Option is not a function
    at Object.<anonymous> (/Users/favna/workspace/air-node-packages/node_modules/typedoc-plugin-lerna-packages/plugin.js:138:17)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/favna/workspace/air-node-packages/node_modules/typedoc-plugin-lerna-packages/index.js:1:14)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)

This is likely because typedoc changed their decorators in recent versions.

marcj commented

Mh, that's interesting, because in v0.16.3 they say @Option is deprecated and not removed.

It seems to be renamed to BindOption TypeStrong/typedoc@ef0c17e, but I'm not sure yet, I did just a quick look.

marcj commented

Maybe @Gerrit0 could help us out here? :)

Imports using internal paths may break even in a patch release if code is refactored. @Option was moved to a different file as a part of refactoring the Options class. I'll take a look at your code in a moment.

I do try to avoid even those breaking changes in patches ^ But it might happen. I'm adding modules to the root export of TypeDoc as I become confident in their exported API.

Okay, this is trickier than I thought it was going to be... Just fixing the compilation errors is easy, I also simplified a bit of the logic... but the added reflections aren't showing up in the rendered documentation... there were a couple theme changes, but the way this plugin does it looks to me like it should still work.

https://github.com/Gerrit0/typedoc-plugin-lerna-packages

Looks like that is due to instanceof DeclarationReflection returning false when building the themes... which I believe is because I'm using a linked typedoc theme and it shouldn't be an issue in master.

marcj commented

Fix released in 0.3.0. Thanks everyone!