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

new packages strategy breaks plugin #2236

Closed
boneskull opened this issue Apr 11, 2023 · 3 comments
Closed

new packages strategy breaks plugin #2236

boneskull opened this issue Apr 11, 2023 · 3 comments
Labels
question Question about functionality

Comments

@boneskull
Copy link
Contributor

Search Terms

legacy-packages
legacypackages

Problem

I have a plugin that considers a multi-package project as a whole, basically. It expects a couple specific packages to exist, and creates new reflections in other packages based on the reflections found in those required packages. The new packages mode seems to run in isolation, so my plugin cannot make the connections.

I'm also receiving warnings about use of typedoc.entryPoint in package.json when run w/ legacy-packages, which mention it will be ignored--but I'm not aware of any alternative. Because of this, TypeDoc complains that it cannot find entry points. I would rather not require my users to know the specific entry point of the required package(s).

Suggested Solution

Do not eliminate legacy-packages and/or support typedoc.entryPoint and/or suggest a workaround.

@boneskull boneskull added the enhancement Improved functionality label Apr 11, 2023
@boneskull
Copy link
Contributor Author

Maybe this is a bug, idk.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 15, 2023

Yes, the whole point of 0.24's packages mode is to run in isolation and then merge the project together when done, see #2197 for details on that.

Your plugin should probably be listening to Application.EVENT_PROJECT_REVIVE. When that fires, it will be passed a ProjectReflection which contains everything.

In packages mode, TypeDoc effectively makes a completely separate run in each child package, so each of those packages should configure their entryPoints option as if docs were to be built for only that package. Gerrit0/typedoc-packages-example has a setup using this.

I'm also receiving warnings about use of typedoc.entryPoint in package.json when run w/ legacy-packages

That shouldn't happen... a minimal repro would be great.

@Gerrit0 Gerrit0 added question Question about functionality and removed enhancement Improved functionality labels Apr 15, 2023
@boneskull
Copy link
Contributor Author

Thanks, I'll give this a try tomorrow and get that MCVE if it's still a problem.

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

No branches or pull requests

2 participants