Skip to content

Commit a911de3

Browse files
committed
chore: 🤖 upgrade to react@19 & rehype plugins
1 parent fdd4f95 commit a911de3

5 files changed

Lines changed: 2337 additions & 1656 deletions

File tree

‎app/posts/[slug]/mdx-content.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import rehypeAutolinkHeadings from 'rehype-autolink-headings'
55
import rehypePrettyCode from 'rehype-pretty-code'
66
import rehypeSlug from 'rehype-slug'
77
import remarkGfm from 'remark-gfm'
8-
import { HighlighterOptions, getHighlighter } from 'shiki'
8+
import { HighlighterCoreOptions, getSingletonHighlighter } from 'shiki'
99

1010
import { buttonVariants } from '@/components/ui/button'
1111
import { TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyP } from '@/components/ui/typography'
@@ -47,8 +47,8 @@ const options: MDXRemoteProps['options'] = {
4747
{
4848
theme: 'one-dark-pro',
4949
keepBackground: false,
50-
getHighlighter: (options: HighlighterOptions) => {
51-
return getHighlighter({
50+
getHighlighter: (options: HighlighterCoreOptions) => {
51+
return getSingletonHighlighter({
5252
...options,
5353
themes: ['one-dark-pro'],
5454
langs: ['js', 'ts', 'jsx', 'tsx', 'json', 'json5', 'shell', 'bash', 'astro', 'markdown'],

‎components/icons/Github.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const Github = (props: HTMLAttributes<SVGElement>) => {
1414
viewBox="0 0 24 24"
1515
fill="none"
1616
stroke="currentColor"
17-
stroke-width="2"
18-
stroke-linecap="round"
19-
stroke-linejoin="round"
17+
strokeWidth="2"
18+
strokeLinecap="round"
19+
strokeLinejoin="round"
2020
{...props}
2121
>
2222
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>

‎next.config.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const nextConfig = {
44
images: {
55
remotePatterns: [],
66
},
7-
transpilePackages: ['geist'], // TODO: should be removed during @see https://linear.app/jdub/issue/JDUB-28/upgrade-to-nextjs-15
7+
transpilePackages: ['next-mdx-remote'],
88
async rewrites() {
99
return [
1010
{

‎package.json‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,36 +52,36 @@
5252
"geist": "1.3.1",
5353
"lucide-react": "^0.456.0",
5454
"next": "15.3.2",
55-
"next-mdx-remote": "^4.4.1",
55+
"next-mdx-remote": "5.0.0",
5656
"next-themes": "0.3.0",
5757
"posthog-js": "^1.180.1",
5858
"posthog-node": "^4.2.1",
59-
"react": "18.3.1",
60-
"react-dom": "18.2.0",
59+
"react": "19.1.0",
60+
"react-dom": "19.1.0",
6161
"rss": "^1.2.2",
6262
"sharp": "0.33.5",
63-
"shiki": "^0.14.7",
63+
"shiki": "3.4.2",
6464
"tailwind-merge": "^2.2.1"
6565
},
6666
"devDependencies": {
6767
"@commitlint/cli": "19.6.0",
6868
"@commitlint/config-conventional": "19.6.0",
69-
"@playwright/test": "^1.48.2",
69+
"@playwright/test": "1.52.0",
7070
"@testing-library/jest-dom": "6.5.0",
7171
"@testing-library/react": "16.0.1",
7272
"@testing-library/user-event": "14.5.2",
7373
"@types/node": "22.7.5",
74-
"@types/react": "18.3.12",
75-
"@types/react-dom": "18.2.25",
74+
"@types/react": "19.1.5",
75+
"@types/react-dom": "19.1.5",
7676
"@types/rss": "^0.0.32",
77-
"@typescript-eslint/parser": "^6.14.0",
77+
"@typescript-eslint/parser": "8.32.1",
7878
"@vitejs/plugin-react": "4.3.3",
7979
"@vitest/coverage-istanbul": "2.1.3",
8080
"autoprefixer": "^10.4.20",
8181
"commitlint": "19.6.0",
8282
"cspell": "8.15.1",
83-
"eslint": "8.57.1",
84-
"eslint-config-next": "14.1.0",
83+
"eslint": "9.27.0",
84+
"eslint-config-next": "15.3.2",
8585
"eslint-import-resolver-typescript": "^3.6.3",
8686
"eslint-plugin-import": "^2.31.0",
8787
"git-cz": "4.9.0",
@@ -92,12 +92,12 @@
9292
"prettier-plugin-tailwindcss": "^0.6.9",
9393
"rehype": "^13.0.1",
9494
"rehype-autolink-headings": "^7.1.0",
95-
"rehype-pretty-code": "^0.10.2",
95+
"rehype-pretty-code": "0.14.1",
9696
"rehype-slug": "^6.0.0",
97-
"remark-gfm": "^3.0.1",
97+
"remark-gfm": "4.0.1",
9898
"tailwindcss": "^3.4.14",
9999
"tailwindcss-animate": "^1.0.7",
100-
"typescript": "5.7.2",
100+
"typescript": "5.8.3",
101101
"vite-tsconfig-paths": "^5.1.2",
102102
"vitest": "^2.1.3"
103103
}

0 commit comments

Comments
 (0)