Skip to content

Commit 567b74d

Browse files
authored
chore(platform): React 19 compatibility (#11901)
1 parent 172c64b commit 567b74d

File tree

9 files changed

+3074
-4112
lines changed

9 files changed

+3074
-4112
lines changed

app/globals.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
--accent: var(--accent-purple);
1414
--foreground: var(--gray-12);
1515
--cursor-checkbox: pointer;
16+
--default-font-family: var(--font-rubik) !important;
1617
::selection {
1718
background-color: var(--accent-a7);
1819
}

app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export const metadata: Metadata = {
3030

3131
export default function RootLayout({children}: {children: React.ReactNode}) {
3232
return (
33-
<html lang="en">
34-
<body className={`${rubik.variable}`}>
33+
<html lang="en" suppressHydrationWarning>
34+
<body className={rubik.variable} suppressHydrationWarning>
3535
<ThemeProvider
3636
attribute="class"
3737
defaultTheme="system"

apps/changelog/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
"@auth/prisma-adapter": "^1.2.0",
2222
"@google-cloud/storage": "^7.7.0",
2323
"@prisma/client": "^5.8.1",
24-
"@radix-ui/react-icons": "^1.3.0",
25-
"@radix-ui/react-toolbar": "^1.0.4",
26-
"@radix-ui/themes": "^2.0.3",
24+
"@radix-ui/react-icons": "^1.3.2",
25+
"@radix-ui/react-toolbar": "^1.1.0",
26+
"@radix-ui/themes": "^3.1.3",
2727
"@sentry/nextjs": "8.36.0",
2828
"@spotlightjs/spotlight": "^2.1.1",
29-
"next": "15.0.0-rc.1",
29+
"next": "15.0.3",
3030
"next-auth": "^4.24.5",
3131
"next-mdx-remote": "^4.4.1",
3232
"nextjs-toploader": "^1.6.6",
3333
"nuqs": "^1.17.7",
3434
"prism-sentry": "^1.0.2",
35-
"react": "19.0.0-rc-cd22717c-20241013",
36-
"react-dom": "19.0.0-rc-cd22717c-20241013",
35+
"react": "rc",
36+
"react-dom": "rc",
3737
"react-select": "^5.7.3",
3838
"react-textarea-autosize": "^8.5.3",
3939
"rehype-prism-plus": "^1.6.3",
@@ -66,4 +66,4 @@
6666
"@types/react": "npm:[email protected]",
6767
"@types/react-dom": "npm:[email protected]"
6868
}
69-
}
69+
}

next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ const nextConfig = {
5050
cacheHandler: require.resolve(
5151
'next/dist/server/lib/incremental-cache/file-system-cache.js'
5252
),
53+
sassOptions: {
54+
silenceDeprecations: ['legacy-js-api'],
55+
},
5356
};
5457

5558
module.exports = withSentryConfig(nextConfig, {

package.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@
4545
"@popperjs/core": "^2.11.8",
4646
"@prettier/plugin-xml": "^3.3.1",
4747
"@radix-ui/colors": "^3.0.0",
48-
"@radix-ui/react-collapsible": "^1.0.3",
49-
"@radix-ui/react-dropdown-menu": "^2.0.6",
50-
"@radix-ui/react-icons": "^1.3.0",
51-
"@radix-ui/react-tabs": "^1.0.4",
52-
"@radix-ui/react-toolbar": "^1.0.4",
53-
"@radix-ui/themes": "^2.0.3",
48+
"@radix-ui/react-collapsible": "^1.1.1",
49+
"@radix-ui/react-dropdown-menu": "^2.1.2",
50+
"@radix-ui/react-icons": "^1.3.2",
51+
"@radix-ui/react-tabs": "^1.1.1",
52+
"@radix-ui/react-toolbar": "^1.1.0",
53+
"@radix-ui/react-tooltip": "^1.1.4",
54+
"@radix-ui/themes": "^3.1.3",
5455
"@sentry-internal/global-search": "^1.1.0",
5556
"@sentry/nextjs": "8.36.0",
5657
"@types/mdx": "^2.0.9",
@@ -96,7 +97,8 @@
9697
"server-only": "^0.0.1",
9798
"sharp": "^0.33.4",
9899
"tailwindcss-scoped-preflight": "^3.0.4",
99-
"textarea-markdown-editor": "^1.0.4"
100+
"textarea-markdown-editor": "^1.0.4",
101+
"dompurify": "3.1.7"
100102
},
101103
"devDependencies": {
102104
"@babel/preset-typescript": "^7.15.0",
@@ -108,12 +110,13 @@
108110
"@types/react": "18.3.12",
109111
"@types/react-dom": "18.3.1",
110112
"@types/ws": "^8.5.10",
113+
"@types/dompurify": "3.0.5",
111114
"autoprefixer": "^10.4.17",
112115
"concurrently": "^8.2.2",
113116
"dotenv-cli": "^7.4.1",
114117
"eslint": "^8",
115118
"eslint-config-next": "15.0.3",
116-
"eslint-config-sentry-docs": "^1.118.0",
119+
"eslint-config-sentry-docs": "^2.10.0",
117120
"jest": "^29.5.0",
118121
"jest-dom": "^4.0.0",
119122
"jest-environment-jsdom": "^29.5.0",
@@ -126,6 +129,11 @@
126129
"vitest": "^2.1.1",
127130
"ws": "^8.17.1"
128131
},
132+
"resolutions": {
133+
"strip-ansi": "6.0.1",
134+
"dompurify": "3.1.7",
135+
"@types/dompurify": "3.0.5"
136+
},
129137
"volta": {
130138
"node": "20.11.0",
131139
"yarn": "1.22.21"

scripts/no-vercel-json-redirects.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {readFileSync} from 'fs';
2+
23
const vercelConfig = JSON.parse(readFileSync('./vercel.json', 'utf8'));
34

45
if (vercelConfig.redirects && vercelConfig.redirects.length > 0) {

src/mdx-deflist.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const isdeflist = (node: Node, i: number, parent: Parent) =>
3636

3737
export default function deflist(): Transformer {
3838
return tree => {
39-
visit(tree, ['paragraph'], (node, i, parent: Parent) => {
40-
const isdef = isdeflist(node, i!, parent as Parent);
39+
visit(tree, 'paragraph', (node: Node, i, parent: Parent) => {
40+
const isdef = isdeflist(node, i!, parent);
4141
if (!isdef) {
4242
return;
4343
}

src/remark-component-spacing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const remarkComponentSpacing: Plugin<void[], Root> = function () {
2424
node.type === 'mdxJsxTextElement' &&
2525
affectedComponents.includes(node.name ?? '')
2626
) {
27-
componentNode = node;
28-
componentNodeParent = parent;
27+
componentNode = node as Node;
28+
componentNodeParent = parent as Node;
2929
}
3030
});
3131
};

0 commit comments

Comments
 (0)