Repository navigation
chore(assistant): remove unused highlighter and @shikijs dependencies - #1492
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Bundle sizeClient 806.5 kB (no change) · Server 1.67 MB No route loads 100 B more or less before it renders. No prerendered URL's initial load or HTML changes by 100 B or more. Brotli sizes. Changes under 100 B are left out of the tables. Measured by nuxt-bundle-analyzer for |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
AssistantPreStream.vueanduseHighlighter.tshave had no importer since #1284, which moved the assistant's code blocks toAssistantComark(@comark/vue/plugins/shiki). The layer still shipped both files and five@shikijs/*dependencies that only they import.What changed
AssistantPreStream.vueanduseHighlighter.ts.@shikijs/core,@shikijs/engine-javascript,@shikijs/langs,@shikijs/streamand@shikijs/themesfromlayer/package.json. Only@shikijs/streamleaves the lockfile, the other four stay as transitive dependencies.useHighlightersection and replaceshiki-streamwith@comark/vuein the install line.Evidence
Importers on
mainbefore the change, only the two files and the README:Docs bundle,
nuxt-bundle-analyzer@0.2.0with the URLs of thebundle-sizeworkflow, measured on 352819c (before #1491):In that comparison, all 456 files in
docs/.output/public/_nuxtoutsidebuilds/have the same SHA-256 before and after.shikistill resolves for@comark/vue/plugins/shiki. The lockfile keeps@comark/vue@0.9.2(…)(shiki@4.6.0), and the npm starter builds with the assistant enabled (AI_GATEWAY_API_KEY=dummy) and emits the shiki theme chunks.Run locally on b5e5f08: lint, typecheck, unit tests (184 passed), CLI build, docs on the vercel, static and node-server presets with the smoke tests (18 passed, 2 skipped), and both starters.
Notes
shikiis not added to the layer. It reaches@comark/vuethrough@nuxtjs/mdcand@nuxt/content, as it did before.startersjob does not bundleAssistantComark, because the assistant is disabled without an AI Gateway key. The check above sets a dummy key for that reason.ELI5
The assistant used to colour code blocks with its own helper. A later change switched to another tool and left the old helper behind, along with the packages it needed. This removes the leftovers, and the site people download stays exactly the same.
🤖 Generated with Amp, reviewed by @larbish before opening.