-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bump shikiji, use transformers API, expose transformers API #9643
Conversation
🦋 Changeset detectedLatest commit: 7d24b32 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@blackmann please a have at the CI, it seems TypeScript can't build the project |
I'm getting this error when trying to build
Any idea what it means. It's hard trying to understand what it means. I don't know much about how Ideas? @ematipico Edit: I imported the types into |
All tests passing locally for me. I can't tell what the failure is with the CIs. @ematipico please have a look¿ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've pushed some commits to fix the test and some clean-ups. And it looks good to me now. Marking this as minor to be merged on our next minor release push.
For the documentation, we can update https://docs.astro.build/en/guides/markdown-content/#shiki-configuration to add the new option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking, as it will be part of our next minor release. We will merge it in the next merge day :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this adds a new user-configurable option, there needs to be documentation and an example showing this. Where is the config set (code snippet)? What are the values you can set, and what do they do?
I'm going from the description provided in the changeset. If this is not user-configurable, then "exposes a new config option" is not the right way to describe this change, because it implies that there is something you can do here!
Co-authored-by: Sarah Rainsberger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking this, because we have no documentation.
We will need:
- JSDoc content to update the configuration reference page automatically <- looks like we don't go into that level of Shiki config here, so only the docs PR is required!
- a PR to docs to update the Shiki configuration section as appropriate.
For a minor release, not opposed to showing a code snippet of the config in the changeset if you so decide, either!
@blackmann could you please help us with documentation? If not provided, we won't be able to release this PR on Thursday |
Yes. On it! |
Updated docs: withastro/docs#6402 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small light edits to the changeset, for your consideration, but otherwise docs is happy!
Co-authored-by: Sarah Rainsberger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final approval for docs!
Changes
shikiji
versiontranforms
is deprecated.transformers
API so that some tranformer presets or community transformers can be used.Testing
There's are existing tests for this and they pass.
Docs
We'll need to update the docs to indicate that
transformers
can be supplied toastro.config.js
>markdown.shikiConfig.transformers
/cc @withastro/maintainers-docs for feedback!