christopherthielen / typedoc-plugin-external-module-name

Specify the Typedoc Module of a file using @module annotation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs generation breaks with custom module name generation when using typedoc v0.19.2

anmolarora1 opened this issue · comments

Screenshot 2020-10-22 at 2 58 44 PM

The typedoc generation fails with v0.19.2 when a custom module name generation mapper is used because it's assumed that the rootFileNames would always be a non-empty array.

Screenshot 2020-10-22 at 2 44 01 PM

There's no such expectation in the method definition in though - check getRootFileNames method (taken from Typescript)

As a result, the function breaks unexpectedly when there are no rootFileNames

The solution might be fiddlier than it seems, but adding an empty array check on this line prevents unexpected errors for now.

The root path auto-detection code assumed you used files in your tsconfig.json and didn't account for includes syntax.
This fix should fall back to using the current directory instead when includes is used.

Released in version 4.0.4

@anmolarora1