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

[Feature]: support typedoc 0.24.6 #369

Open
y-polonsk opened this issue May 2, 2023 · 12 comments
Open

[Feature]: support typedoc 0.24.6 #369

y-polonsk opened this issue May 2, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@y-polonsk
Copy link

y-polonsk commented May 2, 2023

Plugin

@knodes/typedoc-plugin-pages

What would you want ?

I need to use the latest version of typedoc (0.24.6). However, I get a dependency error during install of this plugin. I tried npm i --force but then get runtime error when running typedoc. Any estimate on when this plugin will be available for typedoc 0.24.6?

Thanks.

@y-polonsk y-polonsk added enhancement New feature or request triage labels May 2, 2023
@y-polonsk y-polonsk changed the title [Feature]: work with typedoc 0.24.6 [Feature]: support typedoc 0.24.6 May 2, 2023
@GerkinDev GerkinDev removed the triage label May 2, 2023
@GerkinDev
Copy link
Member

Hi, latest develop branch is about this and almost finished; but I probably won't have enough time to finish it before the end of the month. Yet, you can be sure the next version will be for Typedoc 0.24

@y-polonsk
Copy link
Author

y-polonsk commented May 3, 2023

Thanks. Are there branches that already work with typedoc 0.24? I noticed the branch renovate/typedoc-0.x already has typedoc 0.24 in package.json. Can i build off that branch?

@GerkinDev
Copy link
Member

Well to be honest tooling is a mess (npm & monorepos did not worked well when I started those plug-ins) and the branch still has lots of failing tests. So you might try, but I don't recommend it.

If you really need a tested & functional version of the plug-in now, I recommend you downgrade Typedoc if you don't have strong reasons to keep latest Typedoc.

I hate having to say that, but I definitely won't have the time to continue the update before at least 2 weeks.

@kozi
Copy link

kozi commented Jun 21, 2023

I just wanted to ask nicely when there will be a version for the current typedoc version (0.24.x)?

@GerkinDev
Copy link
Member

GerkinDev commented Jun 21, 2023

Hey there,

Support for 0.24.x is blocked by a change of behavior from 0.23.x I heavily relied on, and now depends on TypeStrong/typedoc#2309

So I won't be able to go forwards while the PR is not merged

@dzek69
Copy link

dzek69 commented Oct 9, 2023

@GerkinDev any update on this? I see on the PR you decided to possibly go another way, meanwhile typedoc went 0.25.0.

It's getting harder and harder to stay on older version, mostly because TypeScript is going forward and older versions of typedoc have random issues with 5.1 or 5.2.

I'd even donate some dollars to have this, but I see you have no sponsor feature enabled.

@GerkinDev
Copy link
Member

Hi, unfortunately no; I've been quite overworked those last months and I have a personnal situation. So the issue is really not the will, but entirely the time.

When I'll be able to (no engagement on "when" will be), I'll look around latest typedoc versions to see if I can get around the issue I had.

I'm really sorry for not having that much time.

@dzek69
Copy link

dzek69 commented Oct 12, 2023

Do not worry, I understand that.

I wish you all the best!

@pjeby
Copy link

pjeby commented Dec 21, 2023

I was able to get the plugin to work (sort of) with typedoc 0.25.4 by hacking the base plugin's rootDir getter to just return ".".

(I say "sort of" because there are no table of contents entries for any of the pages, and if I navigate to any pages directly, they all say "Namespace (Page Name Here)" at the top.)

It looks like the issue is that the default theme's nav system has been completely reworked so the nav data is rendered on the fly on the client, in a .js file that's only rendered once. The navigation is built in the theme's buildNavigation method during the RendererEvent.BEGIN phase, while the plugin is trying to alter the nav data on a page-by-page basis. In addition, the way the buildNavigation function works, it would generate blank items even if it were seeing modified data. In addition, if the navigation includeCategories or includeGroups options are used, it won't even look at the items even if they were added.

So, it looks like the navigation part(s) would need to be significantly altered for it to work with the current version. In contrast, the pages themselves only need to not have the "Namespace X" title, but I haven't investigated that.

@pjeby
Copy link

pjeby commented Dec 26, 2023

So, after a fair amount of work, I've managed to hack together a script that lets you run the pages plugin with typedoc 0.25.4.

It's an ugly assortment of hacks, and I use tsx to run it so I don't have to compile it. Hopefully someone can use this as a basis for one or more pull requests for this project; I've filed issue #526 for a couple of things I'm patching around in the script, but those are just the relatively-straightforward-to-fix things. My other hacks are pretty questionable as to how robust they are for projects that don't look like the one I'm working on right now; if you figure out how to make them better, I'm all ears.

@jameslan
Copy link

Hey there,

Support for 0.24.x is blocked by a change of behavior from 0.23.x I heavily relied on, and now depends on TypeStrong/typedoc#2309

So I won't be able to go forwards while the PR is not merged

TypeDoc 0.26 added a Comment.sourcePath API, according to TypeStrong/typedoc#2309 (comment)
Will it help to a new version compatible to TypeDoc 0.26?

@GerkinDev
Copy link
Member

@jameslan Yes it helps, I'm looking around. But is it still needed given that Typedoc now supports it directly ? https://typedoc.org/guides/documents/

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

No branches or pull requests

6 participants