-
Notifications
You must be signed in to change notification settings - Fork 142
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
feat: bump shiki to v1, migrate to official transformers #1672
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for aquamarine-blini-95325f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
aa5cf68
to
e11037c
Compare
@@ -54,7 +54,7 @@ | |||
"dependencies": { | |||
"@rspress/shared": "workspace:*", | |||
"hast-util-from-html": "2.0.3", | |||
"shiki": "0.14.7", | |||
"shiki": "1.24.2", |
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.
I'm not sure why we lock dep versions in package.json
.
], | ||
}), | ||
], | ||
}); | ||
``` | ||
|
||
接着我们来介绍一下如何使用这些 Transformer 对应的语法。 |
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.
We can not remove exports in this plugin, you should reexport in this plugin and keep all docs here to avoid breaking change.
Furthermore, we can give an example in docs to introduce how to import other transformers in this plugin.
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.
The transformers signatures are changed, so I believe we should make a breaking change for this plugin.
And those builtin transformers are from @shikijs/transformers
, I didn't add it as direct dependency because maybe same users don't use them.
Furthermore, we can give an example in docs to introduce how to import other transformers in this plugin.
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.
breaking change for now is not acceptable, and we can make this breaking change in Rspress 2.0 since all core and package are using same version for now.
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 you want a canary version now, I can release for you for this plugin.
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.
I don't quite understand, all official plugin major versions are bound with rspress core? That would make plugin evolution too slow maybe.
since all core and package are using same version for now.
OK, I understand now. That seems a big challenge.
If you want a canary version now, I can release for you for this plugin.
Sweet. Or maybe I just fork the codes temporarily.
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.
Oh it seems the release workflow can not run in a forked repo, I think you can just patch this plugin using pnpm patch
or other tools in package manager level.
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.
Hah, I mean to copy the codes into our own repo as a thirty-party plugin, I'm building a company level document tool, so local patch won't work.
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.
Got it, this package is MIT license, just do it.
e11037c
to
5bcf142
Compare
5bcf142
to
d8cd2c2
Compare
Summary
Related Issue
related #1634
Checklist