Skip to content
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

Fix support for typedoc 0.19 #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hoodmane
Copy link

@hoodmane hoodmane commented Jan 12, 2023

Before this PR:
typedoc v0.15 and 0.16 work

= 0.17 crash (cannot render anything due to ValueError('Could not find deppath'))

After this PR:
v0.15 and 0.16 still work
v0.17 and 0.18 mess up the type name for tuple types due to a bug in these versions of typedoc
TypeNameTests::test_basic - AssertionError: assert '<TODO: other type>' == '[string, number]'
v0.19 works
v0.20+: crash (cannot render anything because "sources" key not always present on nodes and there is another deppath problem).

@rth @ryanking13

@hoodmane
Copy link
Author

It would be nice to add a github workflow matrix that tests against different versions of typedoc and a fixed version of Python.

@hoodmane
Copy link
Author

hoodmane commented Jan 12, 2023

I think the correct definition for _containing_deppath would be simply:

 def _containing_deppath(self, node) -> str:
     return node["sources"][0]['fileName']

The hack I have in the current PR stops working in v0.20 because it seems like the originalName field was removed in this commit: TypeStrong/typedoc@0cf5bea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant