Skip to content

Commit 373f9b9

Browse files
committedJan 20, 2025·
chore!: bump shiki to v2
BREAKING CHANGE: shiki transformers now use v3 [matching algorithm](https://shiki.style/packages/transformers#matching-algorithm)
1 parent 36bde80 commit 373f9b9

File tree

4 files changed

+269
-260
lines changed

4 files changed

+269
-260
lines changed
 

‎docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"open-cli": "^8.0.0",
1616
"postcss-rtlcss": "^5.6.0",
1717
"vitepress": "workspace:*",
18-
"vitepress-plugin-group-icons": "^1.3.4"
18+
"vitepress-plugin-group-icons": "^1.3.5"
1919
}
2020
}

‎package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@
9898
"@docsearch/css": "^3.8.2",
9999
"@docsearch/js": "^3.8.2",
100100
"@iconify-json/simple-icons": "^1.2.20",
101-
"@shikijs/core": "^1.27.2",
102-
"@shikijs/transformers": "^1.27.2",
103-
"@shikijs/types": "^1.27.2",
101+
"@shikijs/core": "^2.0.0",
102+
"@shikijs/transformers": "^2.0.0",
103+
"@shikijs/types": "^2.0.0",
104104
"@types/markdown-it": "^14.1.2",
105105
"@vitejs/plugin-vue": "^5.2.1",
106106
"@vue/devtools-api": "^7.7.0",
@@ -110,8 +110,8 @@
110110
"focus-trap": "^7.6.4",
111111
"mark.js": "8.11.1",
112112
"minisearch": "^7.1.1",
113-
"shiki": "^1.27.2",
114-
"vite": "^5.4.11",
113+
"shiki": "^2.0.0",
114+
"vite": "^5.4.12",
115115
"vue": "^3.5.13"
116116
},
117117
"devDependencies": {
@@ -152,7 +152,7 @@
152152
"fs-extra": "^11.3.0",
153153
"get-port": "^7.1.0",
154154
"gray-matter": "^4.0.3",
155-
"lint-staged": "^15.4.0",
155+
"lint-staged": "^15.4.1",
156156
"lodash.template": "^4.5.0",
157157
"lru-cache": "^11.0.2",
158158
"markdown-it": "^14.1.0",
@@ -176,7 +176,7 @@
176176
"prompts": "^2.4.2",
177177
"punycode": "^2.3.1",
178178
"rimraf": "^6.0.1",
179-
"rollup": "^4.30.1",
179+
"rollup": "^4.31.0",
180180
"rollup-plugin-dts": "^6.1.1",
181181
"rollup-plugin-esbuild": "^6.1.1",
182182
"semver": "^7.6.3",
@@ -186,7 +186,7 @@
186186
"synckit": "^0.9.2",
187187
"tinyglobby": "^0.2.10",
188188
"typescript": "^5.7.3",
189-
"vitest": "^3.0.0",
189+
"vitest": "^3.0.2",
190190
"vue-tsc": "^2.2.0",
191191
"wait-on": "^8.0.2"
192192
},

‎pnpm-lock.yaml

+249-248
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/node/markdown/plugins/highlight.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,22 @@ export async function highlight(
100100

101101
await options?.shikiSetup?.(highlighter)
102102

103+
// TODO: remove explicit matchAlgorithm in shiki v3
103104
const transformers: ShikiTransformer[] = [
104-
transformerNotationDiff(),
105+
transformerNotationDiff({
106+
matchAlgorithm: 'v3'
107+
}),
105108
transformerNotationFocus({
109+
matchAlgorithm: 'v3',
106110
classActiveLine: 'has-focus',
107111
classActivePre: 'has-focused-lines'
108112
}),
109-
transformerNotationHighlight(),
110-
transformerNotationErrorLevel(),
113+
transformerNotationHighlight({
114+
matchAlgorithm: 'v3'
115+
}),
116+
transformerNotationErrorLevel({
117+
matchAlgorithm: 'v3'
118+
}),
111119
{
112120
name: 'vitepress:add-class',
113121
pre(node) {

0 commit comments

Comments
 (0)
Please sign in to comment.