Coder Social home page Coder Social logo

Comments (16)

j-perezr avatar j-perezr commented on July 22, 2024 1

Hello! thank you for your quick response.
Here you have https://github.com/jperezruiz/typedoc-024-plugin-merge-modules

In the main branch I have created the example using [email protected] and [email protected]

I have also created a branch called 0.23 with [email protected] and [email protected]

You can execute typedoc by running npm run build:docs and launch a preview with npm run serve:docs.

In the 0.23 branch you will see
image

And in the main branch
image

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024 1

Thank you for the test repository.

The problem should be fixed in version 5.0.0 that I just released on NPM. 🎉

The problem was that TypeDoc 0.24 creates a separate converter for every package when using the entry point strategies "merge" or "package" which resulted in the merge getting called too early. I had to change the TypeDoc events the plugin subscribes to in order to get it working. Unfortunately while doing this I also had to drop support for TypeDoc version 0.23 as that version doesn't include the new events. 😞

Please report back after you updated to and tested the new version so that we can close this issue.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024 1

I confirm is working now, thank you!

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024 1

The good news: I can reproduce the problem and added an automated test to the plugin's repo that currently fails because of this issue: https://github.com/krisztianb/typedoc-plugin-merge-modules/blob/master/test/merge-module-monorepo/test.cy.ts#L32

The (somewhat) bad news: I'm not sure what the problem is. It seems to be unrelated to the plugin's code itself. Either it is a bug in TypeDoc or the plugin is executed too late after the index has already been generated by TypeDoc. I created an issue for this in the TypeDoc repo: TypeStrong/typedoc#2281

Hopefully Gerrit will be able to take a look at this and hint me into the right direction.

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024 1

Hi. I released version 5.0.1 which also merges categories and groups and sorts them alphabetically. Please give me feedback if it is working correctly for you. Thanks.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024 1

Hi!
I confirm that works nicely 👏
Again, thank you very much for your effort

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024

Hi. I must have missed these changes when I looked at the change log of TypeDoc 0.24. If you can provide an example repository I can look into this when I find the time.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Thank you very much! Your plugin is amazing, to the point that it should be part of typedoc

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024

Thanks. I also think that this functionality should be part of TypeDoc. Maybe someday it will be.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Hi @krisztianb
I just discovered something about the merging :(
To give you context, in my case, I have a module for the type aliases and another for the actual implementation, it seems that the merge is partially done, because the members appears in the side nav, but it doesn't appear in the index, the main page with the README.

I will update the repo with the example

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024

Hi. Ok. Please post the current behaviour and how you would like it to be. Then I can take a look.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Hi!
thanks for your fast response ^^
I updated the same example repo.

Here the result using 0.23 and typedoc-plugin-merge-modules@4
image

And here using 0.24 and typedoc-plugin-merge-modules@5
image

The merge is well done, all declarations appear in the sidenav and I can navigate to them:
image
but only the declarations from the first module appear in the index

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Hi! Thank you very much, I hope typedoc devs can take a look at it.

from typedoc-plugin-merge-modules.

krisztianb avatar krisztianb commented on July 22, 2024

It looks like that this can't be solved 100% correctly for the time being.

Since the problem is that the index is generated before the plugin merges the modules, what we could do is to "recreate" the index on our own after the merge. The only problem is as Gerrit pointed out, that the sort order of the index entries can be specified in the config and we don't have access to the sorting function that is used to do the sort.

Are you using any kind of specific sort settings in your config? If not we could simply implement an alphabetical sorting. Even if it is not always "correct" it is better than having an incomplete index.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Hi! No, I'm not using the sort config. Re-creating the index sounds good as a solution for now with the restriction of the sorting.

from typedoc-plugin-merge-modules.

j-perezr avatar j-perezr commented on July 22, 2024

Hi @krisztianb ,
Thank you very much for all the effort, I really appreciate it.
I will check it and let you know.

from typedoc-plugin-merge-modules.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.