Skip to content

Commit 45968cd

Browse files
authored
fix: cache markdown it instance and properly dispose shiki on config reload (#4321)
This results in over 5x speedup in build times of certain projects. But this comes at the cost of correctness. `createMarkdownRenderer` now ignores any arguments passed by user. But from our GitHub code search we didn't find any user passing options different than their siteConfig to this function. If you are doing that, please open an issue and we can discuss the best way forward. --- Co-authored-by: Divyansh Singh <[email protected]>
1 parent 81fc148 commit 45968cd

File tree

6 files changed

+469
-423
lines changed

6 files changed

+469
-423
lines changed

package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@
100100
"dependencies": {
101101
"@docsearch/css": "^3.6.2",
102102
"@docsearch/js": "^3.6.2",
103-
"@shikijs/core": "^1.22.0",
104-
"@shikijs/transformers": "^1.22.0",
105-
"@shikijs/types": "^1.22.0",
103+
"@shikijs/core": "^1.22.2",
104+
"@shikijs/transformers": "^1.22.2",
105+
"@shikijs/types": "^1.22.2",
106106
"@types/markdown-it": "^14.1.2",
107107
"@vitejs/plugin-vue": "^5.1.4",
108-
"@vue/devtools-api": "^7.4.6",
108+
"@vue/devtools-api": "^7.5.4",
109109
"@vue/shared": "^3.5.12",
110110
"@vueuse/core": "^11.1.0",
111111
"@vueuse/integrations": "^11.1.0",
112112
"focus-trap": "^7.6.0",
113113
"mark.js": "8.11.1",
114114
"minisearch": "^7.1.0",
115-
"shiki": "^1.22.0",
116-
"vite": "^5.4.8",
115+
"shiki": "^1.22.2",
116+
"vite": "^5.4.10",
117117
"vue": "^3.5.12"
118118
},
119119
"devDependencies": {
@@ -127,7 +127,7 @@
127127
"@mdit-vue/shared": "^2.1.3",
128128
"@polka/compression": "^1.0.0-next.28",
129129
"@rollup/plugin-alias": "^5.1.1",
130-
"@rollup/plugin-commonjs": "^28.0.0",
130+
"@rollup/plugin-commonjs": "^28.0.1",
131131
"@rollup/plugin-json": "^6.1.0",
132132
"@rollup/plugin-node-resolve": "^15.3.0",
133133
"@rollup/plugin-replace": "^6.0.1",
@@ -141,15 +141,15 @@
141141
"@types/markdown-it-emoji": "^3.0.1",
142142
"@types/micromatch": "^4.0.9",
143143
"@types/minimist": "^1.2.5",
144-
"@types/node": "^22.7.5",
144+
"@types/node": "^22.8.2",
145145
"@types/postcss-prefix-selector": "^1.16.3",
146146
"@types/prompts": "^2.4.9",
147147
"chokidar": "^3.6.0",
148148
"conventional-changelog-cli": "^5.0.0",
149149
"cross-spawn": "^7.0.3",
150150
"debug": "^4.3.7",
151151
"esbuild": "^0.24.0",
152-
"execa": "^9.4.0",
152+
"execa": "^9.5.1",
153153
"fs-extra": "^11.2.0",
154154
"get-port": "^7.1.0",
155155
"gray-matter": "^4.0.3",
@@ -164,31 +164,31 @@
164164
"markdown-it-mathjax3": "^4.3.2",
165165
"micromatch": "^4.0.8",
166166
"minimist": "^1.2.8",
167-
"nanoid": "^5.0.7",
167+
"nanoid": "^5.0.8",
168168
"ora": "^8.1.0",
169169
"p-map": "^7.0.2",
170170
"path-to-regexp": "^6.3.0",
171-
"picocolors": "^1.1.0",
171+
"picocolors": "^1.1.1",
172172
"pkg-dir": "^8.0.0",
173-
"playwright-chromium": "^1.48.0",
173+
"playwright-chromium": "^1.48.2",
174174
"polka": "^1.0.0-next.28",
175175
"postcss-prefix-selector": "^2.1.0",
176176
"prettier": "^3.3.3",
177177
"prompts": "^2.4.2",
178178
"punycode": "^2.3.1",
179179
"rimraf": "^6.0.1",
180-
"rollup": "^4.24.0",
180+
"rollup": "^4.24.2",
181181
"rollup-plugin-dts": "^6.1.1",
182182
"rollup-plugin-esbuild": "^6.1.1",
183183
"semver": "^7.6.3",
184184
"simple-git-hooks": "^2.11.1",
185185
"sirv": "^3.0.0",
186186
"sitemap": "^8.0.0",
187187
"supports-color": "^9.4.0",
188-
"tinyglobby": "^0.2.9",
188+
"tinyglobby": "^0.2.10",
189189
"typescript": "^5.6.3",
190-
"vitest": "^2.1.2",
191-
"vue-tsc": "^2.1.6",
190+
"vitest": "^2.1.4",
191+
"vue-tsc": "^2.1.8",
192192
"wait-on": "^8.0.1"
193193
},
194194
"peerDependencies": {
@@ -203,7 +203,7 @@
203203
"optional": true
204204
}
205205
},
206-
"packageManager": "[email protected].1",
206+
"packageManager": "[email protected].3",
207207
"pnpm": {
208208
"peerDependencyRules": {
209209
"ignoreMissing": [

0 commit comments

Comments
 (0)