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

Not to append package version to the package name in generated json files #1175

Closed
antifree opened this issue Jan 15, 2020 · 3 comments
Closed

Comments

@antifree
Copy link

antifree commented Jan 15, 2020

Problem

Typedoc appends version to package name in json file:

{
	"id": 0,
	"name": "testlib - v1.0.0",
	"kind": 0,
	"flags": {},
	..................
}

It is not comfortable for me when I need to make some logic based on the package name.
Tested with v 15.8.

Suggested Solution

{
	"id": 0,
	"name": "testlib",
        "version": "1.0.0"
	"kind": 0,
	"flags": {},
	..................
}
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 15, 2020

You can set the package name when generating docs with --name

That said, it seems reasonable to split this up, and combine it in the themes...

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 15, 2020

After trying out splitting up the name, I don't think that's the correct solution. Since it changes whenever the containing project's version changes, and cannot (or at least I don't think it makes sense to) be overridden, this breaks tests any time a project that saves the JSON output gets a new version.

I'll instead change including the version in the name to be opt in, according to the new --includeVersion flag. This restores the previous behavior while still allowing users to easily include the version if they want it.

@antifree
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants