Skip to content

Commit 0070585

Browse files
authoredJun 21, 2024··
fix: update shiki and relax version range (#465)
1 parent 937b91b commit 0070585

File tree

5 files changed

+18
-25
lines changed

5 files changed

+18
-25
lines changed
 

‎packages/applet/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@vue/devtools-ui": "workspace:^",
3131
"lodash-es": "^4.17.21",
3232
"perfect-debounce": "^1.0.0",
33-
"shiki": "1.7.0",
33+
"shiki": "^1.9.0",
3434
"splitpanes": "^3.1.5",
3535
"vue-virtual-scroller": "2.0.0-beta.8"
3636
},

‎packages/applet/src/composables/shiki.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { BuiltinLanguage, HighlighterCore } from 'shiki'
2-
import { getHighlighterCore } from 'shiki/core'
2+
import { createHighlighterCore } from 'shiki/core'
33
import getWasm from 'shiki/wasm'
44
import { shallowRef } from 'vue'
55

@@ -10,7 +10,7 @@ let promise: Promise<any> | null = null
1010
export function renderCodeHighlight(code: string, lang: BuiltinLanguage | 'text' = 'text') {
1111
if (!promise && !shiki.value) {
1212
// Only loading when needed
13-
promise = getHighlighterCore({
13+
promise = createHighlighterCore({
1414
themes: [
1515
import('shiki/themes/vitesse-dark.mjs'),
1616
import('shiki/themes/vitesse-light.mjs'),

‎packages/client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"colord": "^2.9.3",
3737
"fuse.js": "^7.0.0",
3838
"minimatch": "^9.0.4",
39-
"shiki": "1.7.0",
39+
"shiki": "^1.9.0",
4040
"splitpanes": "^3.1.5",
4141
"vis-network": "^9.1.9",
4242
"vite-hot-client": "^0.2.3",

‎packages/client/src/composables/shiki.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { BuiltinLanguage, HighlighterCore } from 'shiki'
2-
import { getHighlighterCore } from 'shiki/core'
2+
import { createHighlighterCore } from 'shiki/core'
33
import getWasm from 'shiki/wasm'
44

55
export const shiki = shallowRef<HighlighterCore>()
@@ -9,7 +9,7 @@ let promise: Promise<any> | null = null
99
export function renderCodeHighlight(code: string, lang: BuiltinLanguage | 'text' = 'text') {
1010
if (!promise && !shiki.value) {
1111
// Only loading when needed
12-
promise = getHighlighterCore({
12+
promise = createHighlighterCore({
1313
themes: [
1414
import('shiki/themes/vitesse-dark.mjs'),
1515
import('shiki/themes/vitesse-light.mjs'),

‎pnpm-lock.yaml

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

0 commit comments

Comments
 (0)
Please sign in to comment.