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

Fails to merge when entryPoints is a file array #667

Closed
adenhertog opened this issue Aug 7, 2024 · 2 comments
Closed

Fails to merge when entryPoints is a file array #667

adenhertog opened this issue Aug 7, 2024 · 2 comments
Labels
bug Issue raised as a bug. fixed Fix implemented in latest version.

Comments

@adenhertog
Copy link

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

I have a package that exports a DI injectable module only (this is later loaded into an api host). Since the package doesn't export the controllers, I've set entryPoints: ["src/controllers/*/*controller.ts"]

This will resolve all the controller definitions, but when calling generateDocs() (overrides.ts:9), it fails to render. For each file it shows the error:

loggers.js:203```

The source of the error is `page.header.ts:105`. `undefined` is returned from `this.getPackageMetaData()`. 

Looking at `getPackageMetaData` on line `markdown-themeContext.ts:121` it has:

this.packagesMetaData[packageName]


This function is called with `packageName = 'src/controller-a'` which doesn't map to the packages metadata of `@scope/my-controller-package` and hence why `undefined` is returned.

### TypeDoc configuration

versions:

"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.3",

Package config:

{
"extends": ["../../../typedoc.base.jsonc"],
"entryPoints": ["src/controllers/*/*controller.ts"],
"entryPointStrategy": "resolve"
}


Root package config:

{
  // Typedoc is used to extract our codedoc into markdown files, which are then uploaded to an Open AI assistant
  // This corpus is accessible in slack via the `@suppress ai` app user
  "entryPoints": [ "company/apis/sub-api"],
  "name": "company",
  "entryPointStrategy": "packages",
  "includeVersion": false,
  "plugin": ["typedoc-plugin-markdown"]
}


### Expected behavior

Ideally, it should render each controller class to a README.md 
@adenhertog adenhertog added the bug Issue raised as a bug. label Aug 7, 2024
@tgreyuk
Copy link
Member

tgreyuk commented Aug 13, 2024

Thanks. Although I couldn't fully replicate your use case the docs will no longer fail in typedoc-plugin-markdown@4.2.4.

@adenhertog
Copy link
Author

thanks @tgreyuk i'll check it out 👍

@tgreyuk tgreyuk added the fixed Fix implemented in latest version. label Aug 25, 2024
@tgreyuk tgreyuk closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue raised as a bug. fixed Fix implemented in latest version.
Projects
None yet
Development

No branches or pull requests

2 participants