-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeDoc doesn't render comments with Handlebars 4.6.0 #1159
Comments
I'm experiencing a similar issue, although it's the local installation that's not rendering the comments in the HTML output. When I add the |
+1 |
This is.... really weird. I can confirm the global/local issue, no idea what's causing it yet. Looking into it. @jeremyrea could you provide a repo with a repro for the issue when run locally? |
It seems like the global install has been broken for a long time... [email protected] also has this issue. |
@Gerrit0 https://github.com/jeremyrea/typedoc-comment-repro Let me know how it goes or if there's anything else I can do. |
Looks like Handlebars is the cause of this break (global + local I'm guessing, I bet the local install that works has a lower version of handlebars pinned in package-lock.json) - handlebars-lang/handlebars.js#1633... I'm not exactly sure how we should go about fixing this... listing out all of the prototype methods that we expect a template (as suggested in the handlebars PR) to be able to access isn't feasible and is very likely to break in the future whenever a new method is added. For now, I'll pin handlebars to a lower version and release a patch with that change. |
Fixed in v0.15.7, thanks for the report @socsieng + @jeremyrea! Leaving this open to track finding a better solution. I don't want to be stuck on an old version of handlebars forever. |
Thanks @Gerrit0, can confirm that it works for me. |
Handlebars 4.7.0 has been release with options to disable prototype restrictions: |
Thanks @nknapp! I'll release 0.15.8 with a handlebars version bump to 4.7.0 later today :) |
v0.15.8 is released |
As per TypeStrong/typedoc#1159, in response to security concerns, handlebars 4.6.0 changed in a way that broke our version of typedoc. This was fixed and made available in 0.15.7. This is fortunate as typedoc 0.16.0 makes a breaking change that exposes a lot more than I think we want to: https://github.com/TypeStrong/typedoc/releases/tag/v0.16.0 The current lead maintainer outlines a new vision for a "library" mode here which may be of interest in future: TypeStrong/typedoc#1266 Signed-off-by: Thomas Chetwin <[email protected]>
For those, who use old versions of typedoc, there workaround. Add npm i [email protected] -g -D [email protected] |
Expected Behavior
Comments should be rendered when generating documents using globally installed typedoc. (i.e.
npm install typedoc --global
)Note that it works as expected when installed locally.
Expected:
Actual Behavior
Comments aren't included when run using typedoc global install.
The comment section is missing from the html output:
Steps to reproduce the bug
Command:
npm install typedoc --global git clone https://github.com/socsieng/typedoc-plugin-typescript-declaration.git cd typedoc-plugin-typescript-declaration/example typedoc --out docs open docs/classes/_index_.example.animal.html
Environment
The text was updated successfully, but these errors were encountered: