Skip to content

Commit 38be5fd

Browse files
nperez0111claude
andauthored
feat: upgrade shiki to v4 and prosemirror-highlight to v0.15.1 (#2625)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bda3045 commit 38be5fd

File tree

5 files changed

+47
-37
lines changed

5 files changed

+47
-37
lines changed

examples/04-theming/07-custom-code-block/src/shiki.bundle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
DynamicImportThemeRegistration,
55
HighlighterGeneric,
66
} from "@shikijs/types";
7-
import { createdBundledHighlighter } from "@shikijs/core";
7+
import { createBundledHighlighter } from "@shikijs/core";
88
import { createJavaScriptRegexEngine } from "@shikijs/engine-javascript";
99

1010
type BundledLanguage = "typescript" | "ts" | "javascript" | "js" | "vue";
@@ -24,7 +24,7 @@ const bundledThemes = {
2424
"dark-plus": () => import("@shikijs/themes/dark-plus"),
2525
} as Record<BundledTheme, DynamicImportThemeRegistration>;
2626

27-
const createHighlighter = /* @__PURE__ */ createdBundledHighlighter<
27+
const createHighlighter = /* @__PURE__ */ createBundledHighlighter<
2828
BundledLanguage,
2929
BundledTheme
3030
>({

packages/code-block/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@
5050
},
5151
"dependencies": {
5252
"@blocknote/core": "0.47.3",
53-
"@shikijs/core": "^3",
54-
"@shikijs/engine-javascript": "^3",
55-
"@shikijs/langs": "^3",
56-
"@shikijs/langs-precompiled": "^3",
57-
"@shikijs/themes": "^3",
58-
"@shikijs/types": "^3"
53+
"@shikijs/core": "^4",
54+
"@shikijs/engine-javascript": "^4",
55+
"@shikijs/langs-precompiled": "^4",
56+
"@shikijs/themes": "^4",
57+
"@shikijs/types": "^4"
5958
},
6059
"devDependencies": {
6160
"eslint": "^8.57.1",

packages/code-block/src/shiki.bundle.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
DynamicImportThemeRegistration,
55
HighlighterGeneric,
66
} from "@shikijs/types";
7-
import { createdBundledHighlighter } from "@shikijs/core";
7+
import { createBundledHighlighter } from "@shikijs/core";
88
import { createJavaScriptRegexEngine } from "@shikijs/engine-javascript";
99

1010
type BundledLanguage = "typescript" | "ts" | "javascript" | "js" | "vue";
@@ -77,8 +77,7 @@ const bundledLanguages = {
7777
rust: () => import("@shikijs/langs-precompiled/rust"),
7878
rs: () => import("@shikijs/langs-precompiled/rust"),
7979
scala: () => import("@shikijs/langs-precompiled/scala"),
80-
// Swift does not support pre-compilation right now
81-
swift: () => import("@shikijs/langs/swift"),
80+
swift: () => import("@shikijs/langs-precompiled/swift"),
8281
kotlin: () => import("@shikijs/langs-precompiled/kotlin"),
8382
kt: () => import("@shikijs/langs-precompiled/kotlin"),
8483
kts: () => import("@shikijs/langs-precompiled/kotlin"),
@@ -91,7 +90,7 @@ const bundledThemes = {
9190
"github-light": () => import("@shikijs/themes/github-light"),
9291
} as Record<BundledTheme, DynamicImportThemeRegistration>;
9392

94-
const createHighlighter = /* @__PURE__ */ createdBundledHighlighter<
93+
const createHighlighter = /* @__PURE__ */ createBundledHighlighter<
9594
BundledLanguage,
9695
BundledTheme
9796
>({

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"dependencies": {
9292
"@emoji-mart/data": "^1.2.1",
9393
"@handlewithcare/prosemirror-inputrules": "^0.1.4",
94-
"@shikijs/types": "^3",
94+
"@shikijs/types": "^4",
9595
"@tanstack/store": "^0.7.7",
9696
"@tiptap/core": "^3.13.0",
9797
"@tiptap/extension-bold": "^3.13.0",
@@ -108,7 +108,7 @@
108108
"emoji-mart": "^5.6.0",
109109
"fast-deep-equal": "^3.1.3",
110110
"hast-util-from-dom": "^5.0.1",
111-
"prosemirror-highlight": "^0.13.0",
111+
"prosemirror-highlight": "^0.15.1",
112112
"prosemirror-model": "^1.25.4",
113113
"prosemirror-state": "^1.4.4",
114114
"prosemirror-tables": "^1.8.3",

pnpm-lock.yaml

Lines changed: 35 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)