-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
perf: bundle wasm binary in chunk for shiki/wasm
and @shikijs/core/wasm-inlined
#624
Conversation
…/wasm-inlined`
✅ Deploy Preview for shiki-matsu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for shiki-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #624 +/- ##
==========================================
- Coverage 96.17% 96.14% -0.03%
==========================================
Files 70 71 +1
Lines 5698 5709 +11
Branches 751 753 +2
==========================================
+ Hits 5480 5489 +9
- Misses 212 214 +2
Partials 6 6 ☔ View full report in Codecov by Sentry. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [shiki](https://togithub.com/shikijs/shiki) ([source](https://togithub.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`1.1.7` -> `1.2.0`](https://renovatebot.com/diffs/npm/shiki/1.1.7/1.2.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>shikijs/shiki (shiki)</summary> ### [`v1.2.0`](https://togithub.com/shikijs/shiki/releases/tag/v1.2.0) [Compare Source](https://togithub.com/shikijs/shiki/compare/v1.1.7...v1.2.0) ##### 🚀 Features - Upgrade deps, new lang `Gleam`, new theme `Houston` - by [@​antfu](https://togithub.com/antfu) [<samp>(163d8)</samp>](https://togithub.com/shikijs/shiki/commit/163d83b6) ##### 🏎 Performance - Bundle wasm binary in chunk for `shiki/wasm` and `@shikijs/core/wasm-inlined` - by [@​antfu](https://togithub.com/antfu) in [https://github.com/shikijs/shiki/issues/624](https://togithub.com/shikijs/shiki/issues/624) [<samp>(56d1a)</samp>](https://togithub.com/shikijs/shiki/commit/56d1a486) ##### [View changes on GitHub](https://togithub.com/shikijs/shiki/compare/v1.1.7...v1.2.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ariakit/ariakit). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Related: pi0/nuxt-shiki#18
Performance improvements for reduce the request waterflow on requesting wasm binary.
Before this PR,
@shikijs/core/wasm-inlined
had an internal async chunk for lazy loading, but that take away the ability for users to have fine-grain control of when the chunk been loaded.This PR makes the importing
shiki/wasm
and@shikijs/core/wasm-inlined
directly import the binary within that chunk. So you can choice when and how to load the module.More user-facing
import { getWasmInlined } from 'shiki'
renames unchanged