Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ const withMDX = createMDX({
[
rehypePrettyCode,
{
transformers: [transformerNotationDiff()],
transformers: [
transformerNotationDiff({
matchAlgorithm: "v3",
}),
],
theme: "github-dark-dimmed",
defaultLang: "plaintext",
bypassInlineCode: false,
Expand Down
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"prepare": "husky"
},
"dependencies": {
"@apollo/client": "^3.12.7",
"@apollo/client": "^3.12.8",
"@faustwp/blocks": "^6.0.0",
"@faustwp/cli": "^3.1.1",
"@faustwp/core": "^3.1.0",
"@faustwp/core": "^3.2.0",
"@headlessui/react": "^2.2.0",
"@heroicons/react": "^2.2.0",
"@icons-pack/react-simple-icons": "^11.1.0",
"@icons-pack/react-simple-icons": "^11.2.0",
"@js-temporal/polyfill": "^0.4.4",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^15.1.6",
"@shikijs/transformers": "^2.1.0",
"@shikijs/transformers": "^2.2.0",
"@sindresorhus/slugify": "^2.2.1",
"classnames": "^2.5.1",
"date-fns": "^4.1.0",
Expand All @@ -41,27 +41,27 @@
"react": "^19.0.0",
"react-dom": "^19.0.0",
"recma-nextjs-static-props": "^2.0.1",
"rehype-callouts": "^1.3.0",
"rehype-callouts": "^2.0.0",
"rehype-mdx-import-media": "^1.2.0",
"rehype-pretty-code": "^0.14.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"shiki": "^2.1.0"
"shiki": "^2.2.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.0.0",
"@tailwindcss/postcss": "^4.0.1",
"@tailwindcss/typography": "^0.5.15",
"eslint": "^9.17.0",
"eslint": "^9.19.0",
"eslint-config-neon": "^0.2.4",
"eslint-plugin-mdx": "^3.1.5",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"lint-staged": "^15.4.3",
"next-secure-headers": "^2.2.0",
"postcss": "^8.4.49",
"postcss-nesting": "^13.0.1",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.11",
"tailwindcss": "^4.0.0"
"tailwindcss": "^4.0.1"
},
"engines": {
"node": "^22",
Expand All @@ -71,5 +71,10 @@
"lint-staged": {
"*": "pnpm format",
"*.{js,jsx}": "pnpm lint"
},
"pnpm": {
"patchedDependencies": {
"rehype-pretty-code": "patches/rehype-pretty-code.patch"
}
}
}
31 changes: 31 additions & 0 deletions patches/rehype-pretty-code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/dist/index.js b/dist/index.js
index 914285807221289f4a9b822fbcf18bec8e6da588..1470a5e4df4a68025de1a4b96444afb9432331ad 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,5 @@
-import { getHighlighter } from 'shiki';
+// getHighlighter is deprecated in shiki v2+
+import { getSingletonHighlighter as getHighlighter } from 'shiki';
import { visit } from 'unist-util-visit';
import { toString } from 'hast-util-to-string';
import rangeParser2 from 'parse-numeric-range';
diff --git a/package.json b/package.json
index 6d1e6d34025aa421ae4f4d6b302980ace4a60a54..a6f1a49c2b47fb6280e1b16b986147d49d235ca1 100644
--- a/package.json
+++ b/package.json
@@ -32,13 +32,13 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
- "@shikijs/transformers": "^1.9.1",
+ "@shikijs/transformers": "^2.2.0",
"@types/node": "^20.14.9",
"hast-util-to-html": "^9.0.1",
"mdast-util-to-hast": "^13.2.0",
"prettier": "^3.3.2",
"remark": "^15.0.1",
- "shiki": "^1.9.1",
+ "shiki": "^2.2.0",
"tsup": "^8.1.0",
"tsx": "^4.15.7",
"typescript": "^5.5.2",
Loading