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

feat: upgrade shiki, support custom embedded languages ts-type and vue-html #232

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

antfu
Copy link
Member

@antfu antfu commented Jun 21, 2024

See shikijs/shiki#702

getHighlighterCore is renamed to createHighlighterCore

@antfu antfu requested a review from farnabaz June 27, 2024 13:01
package.json Outdated
@@ -100,7 +100,7 @@
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"scule": "^1.3.0",
"shiki": "^1.6.4",
"shiki": "^1.9.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antfu Should we use 1.10? 😊

@farnabaz
Copy link
Collaborator

@danielroe Seems that when we have another entry in build.config.ts the generated dist/types.d.ts is wrong and does not include exported types from module.ts
Do you have an idea?

@antfu antfu changed the title chore: upgrade shiki feat: upgrade shiki, support custom embedded languages ts-type and vue-html Jun 28, 2024
@antfu
Copy link
Member Author

antfu commented Jun 28, 2024

Pushed a commit to support embedded languages ts-type and vue-html based on shikijs/shiki#712, so it made easier to highlight type snippet:

Screenshot 2024-06-28 at 13 00 37

@danielroe
Copy link
Contributor

@farnabaz do you mean in dev mode? pushed a fix to nuxt/module-builder@6b1970d and will release shortly

@farnabaz
Copy link
Collaborator

farnabaz commented Jun 28, 2024

@farnabaz do you mean in dev mode? pushed a fix to nuxt/module-builder@6b1970d and will release shortly

It is happening on build. @benjamincanac helped me to fix this issue by changing the types entry point to dist/module.d.ts instead of dist/types.d.ts. c8b12d5


Update: Just checked with 0.8.1 and still seems that only some types are exported from dist/types.d.ts not all of them
Screenshot 2024-06-28 at 18 10 25

@farnabaz farnabaz merged commit 8659fe0 into main Jun 28, 2024
2 checks passed
@antfu antfu deleted the chore/upgrade-shiki branch June 28, 2024 16:27
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

Successfully merging this pull request may close these issues.

4 participants