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

[0.27]: Seems like Shiki languages have changed; bash & console no longer valid. #2798

Closed
typhonrt opened this issue Dec 4, 2024 · 4 comments

Comments

@typhonrt
Copy link

typhonrt commented Dec 4, 2024

It seems like shiki was updated for 0.27 and bash and console are no longer supported languages.

While it seems like they are still listed in the default configuration internally in Typedoc if copying the default array as seen in Typedoc docs and setting this to highlightLanguages option this will trigger an error in the option validator.

Ahh... I can see this being a consequence of your rebundling of shiki @gerrit0/mini-shiki

If bash and console are no longer valid; easy suggestion is to remove them from Typedoc docs and internal default.

Environment

  • Typedoc version: 0.27.2
@typhonrt typhonrt added the bug Functionality does not match expectation label Dec 4, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 4, 2024

This shouldn't have changed, mini-shiki is meant to be a complete drop in replacement.

@typhonrt
Copy link
Author

typhonrt commented Dec 4, 2024

This is when using the same exact default options IE:

{
    "highlightLanguages": [
        "bash",
        "console",
        "css",
        "html",
        "javascript",
        "json",
        "jsonc",
        "json5",
        "tsx",
        "typescript"
    ]
}

With bash / console:
image

Without bash & console docs generate fine:
image


Despite the error docs generate, but seemingly falls back to the internal default. I just happen to be adding svelte to the languages. This does work sans bash & console, however with them added the error message posts and the Svelte code block is not transformed.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 4, 2024

If you were using TypeDoc's CLI, it would have exited without generating docs due to the configuration error. Options aren't set if they fail validation.

I'm not sure why I decided to only allow non-aliased languages when implementing this ages ago, I experimentally just allowed it and it all works as expected.... makes it an easy default.

@Gerrit0 Gerrit0 closed this as completed in 2741645 Dec 4, 2024
@typhonrt
Copy link
Author

typhonrt commented Dec 4, 2024

Yeah this is programmatic usage / special case / complex docs project.

@Gerrit0 Gerrit0 removed the bug Functionality does not match expectation label Feb 2, 2025
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