Skip to content

Commit 1a544ea

Browse files
committed
Fix errors
1 parent 2d41d48 commit 1a544ea

File tree

5 files changed

+81
-74
lines changed

5 files changed

+81
-74
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"date-fns": "^2.16.1",
3535
"debounce": "^1.2.1",
3636
"github-slugger": "^1.3.0",
37-
"next": "^15.0.0-rc.0",
37+
"next": "15.0.0-canary.46",
3838
"next-remote-watch": "^1.0.0",
3939
"parse-numeric-range": "^1.2.0",
4040
"react": "^19.0.0-rc-8971381549-20240625",

src/pages/[[...markdownPath]].js

+6-3
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ function useActiveSection() {
7272

7373
// Deserialize a client React tree from JSON.
7474
function reviveNodeOnClient(key, val) {
75-
if (typeof val === 'object' && val !== null && 'type' in val) {
75+
if (Array.isArray(val) && val[0] == '$r') {
7676
// Assume it's a React element.
77-
let {type, key, props} = val;
77+
let type = val[1];
78+
let key = val[2];
79+
let props = val[3];
7880
if (type === 'wrapper') {
7981
type = Fragment;
80-
props = {children: props.children};
82+
props = {children: [props.children]};
8183
}
8284
if (MDXComponents[type]) {
8385
type = MDXComponents[type];
@@ -91,6 +93,7 @@ function reviveNodeOnClient(key, val) {
9193
type: type,
9294
key: key,
9395
ref: null,
96+
_store: {validated: 0},
9497
props: props,
9598
_owner: null,
9699
};

src/pages/errors/[errorCode].tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ function reviveNodeOnClient(key: unknown, val: any) {
7171
type = Fragment;
7272
}
7373
return {
74-
$$typeof: Symbol.for('react.element'),
74+
$$typeof: Symbol.for('react.transitional.element'),
7575
type: type,
7676
key: key,
7777
ref: null,
7878
props: props,
79+
_store: {},
7980
_owner: null,
8081
};
8182
} else {

src/utils/compileMDX.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {MDXComponents} from 'components/MDX/MDXComponents';
33

44
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
// ~~~~ IMPORTANT: BUMP THIS IF YOU CHANGE ANY CODE BELOW ~~~
6-
const DISK_CACHE_BREAKER = 9;
6+
const DISK_CACHE_BREAKER = 10;
77
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88

99
export default async function compileMDX(
@@ -144,7 +144,10 @@ export default async function compileMDX(
144144

145145
// Serialize a server React tree node to JSON.
146146
function stringifyNodeOnServer(key: unknown, val: any) {
147-
if (val != null && val.$$typeof === Symbol.for('react.element')) {
147+
if (
148+
val != null &&
149+
val.$$typeof === Symbol.for('react.transitional.element')
150+
) {
148151
// Remove fake MDX props.
149152
// eslint-disable-next-line @typescript-eslint/no-unused-vars
150153
const {mdxType, originalType, parentName, ...cleanProps} = val.props;

yarn.lock

+67-67
Original file line numberDiff line numberDiff line change
@@ -1009,10 +1009,10 @@
10091009
unist-util-visit "^4.0.0"
10101010
vfile "^5.0.0"
10111011

1012-
"@next/[email protected]rc.0":
1013-
version "15.0.0-rc.0"
1014-
resolved "https://registry.yarnpkg.com/@next/env/-/env-15.0.0-rc.0.tgz#c772c9261dad10b1a1e72693c7dadfe2e35e6c5a"
1015-
integrity sha512-6W0ndQvHR9sXcqcKeR/inD2UTRCs9+VkSK3lfaGmEuZs7EjwwXMO2BPYjz9oBrtfPL3xuTjtXsHKSsalYQ5l1Q==
1012+
"@next/[email protected]canary.46":
1013+
version "15.0.0-canary.46"
1014+
resolved "https://registry.yarnpkg.com/@next/env/-/env-15.0.0-canary.46.tgz#ed64c5a62be505dffd88d89f2e8b33bde641e03b"
1015+
integrity sha512-ahFr4BNVF+ajZnZP9tesGWiMN8onxWyUMU4Fx+pHecp812TmUcRori8KgU6q5UEfGnB3GfLYExaRxN0oheQaLQ==
10161016

10171017
10181018
version "12.0.3"
@@ -1021,50 +1021,50 @@
10211021
dependencies:
10221022
glob "7.1.7"
10231023

1024-
"@next/[email protected]rc.0":
1025-
version "15.0.0-rc.0"
1026-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-rc.0.tgz#d083d397246b2becfa41c724f43c3a31d682b1fb"
1027-
integrity sha512-4OpTXvAWcSabXA5d688zdUwa3sfT9QrLnHMdpv4q2UDnnuqmOI0xLb6lrOxwpi+vHJNkneuNLqyc5HGBhkqL6A==
1028-
1029-
"@next/[email protected]rc.0":
1030-
version "15.0.0-rc.0"
1031-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-rc.0.tgz#f7066acd555b5db0037768dd311e0b201b4ebf08"
1032-
integrity sha512-/TD8M9DT244uhtFA8P/0DUbM7ftg2zio6yOo6ajV16vNjkcug9Kt9//Wa4SrJjWcsGZpViLctOlwn3/6JFAuAA==
1033-
1034-
"@next/[email protected]rc.0":
1035-
version "15.0.0-rc.0"
1036-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-rc.0.tgz#ecce3b9cfed770f372b6cf05170ff2c89e909642"
1037-
integrity sha512-3VTO32938AcqOlOI/U61/MIpeYrblP22VU1GrgmMQJozsAXEJgLCgf3wxZtn61/FG4Yc0tp7rPZE2t1fIGe0+w==
1038-
1039-
"@next/[email protected]rc.0":
1040-
version "15.0.0-rc.0"
1041-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-rc.0.tgz#39d2e2687181e8c7fc88774cb106a99374b25dce"
1042-
integrity sha512-0kDnxM3AfrrHFJ/wTkjkv7cVHIaGwv+CzDg9lL2BoLEM4kMQhH20DTsBOMqpTpo1K2KCg67LuTGd3QOITT5uFQ==
1043-
1044-
"@next/[email protected]rc.0":
1045-
version "15.0.0-rc.0"
1046-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-rc.0.tgz#853b80cd84487742fce2e81908a904e6f5125daf"
1047-
integrity sha512-fPMNahzqYFjm5h0ncJ5+F3NrShmWhpusM+zrQl01MMU0Ed5xsL4pJJDSuXV4wPkNUSjCP3XstTjxR5kBdO4juQ==
1048-
1049-
"@next/[email protected]rc.0":
1050-
version "15.0.0-rc.0"
1051-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-rc.0.tgz#3c0715879189593e0e9a5d30c2472cec26ac781a"
1052-
integrity sha512-7/FLgOqrrQAxOVQrxfr3bGgZ83pSCmc2S3TXBILnHw0S8qLxmFjhSjH5ogaDmjrES/PSYMaX1FsP5Af88hp7Gw==
1053-
1054-
"@next/[email protected]rc.0":
1055-
version "15.0.0-rc.0"
1056-
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-rc.0.tgz#97be1f0fcf7319f3cad5046f2f153d585d25c312"
1057-
integrity sha512-5wcqoYHh7hbdghjH6Xs3i5/f0ov+i1Xw2E3O+BzZNESYVLgCM1q7KJu5gdGFoXA2gz5XaKF/VBcYHikLzyjgmA==
1058-
1059-
"@next/[email protected]rc.0":
1060-
version "15.0.0-rc.0"
1061-
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-rc.0.tgz#3518e7da723ff92face4d40c18e299fc4a27156a"
1062-
integrity sha512-/hqOmYRTvtBPToE4Dbl9n+sLYU7DPd52R+TtjIrrEzTMgFo2/d7un3sD7GKmb2OwOj/ExyGv6Bd/JzytBVxXlw==
1063-
1064-
"@next/[email protected]rc.0":
1065-
version "15.0.0-rc.0"
1066-
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-rc.0.tgz#e6343051a5bf1e071a67553fa6f3726b64dcf54e"
1067-
integrity sha512-2Jly5nShvCUzzngP3RzdQ3JcuEcHcnIEvkvZDCXqFAK+bWks4+qOkEUO1QIAERQ99J5J9/1AN/8zFBme3Mm57A==
1024+
"@next/[email protected]canary.46":
1025+
version "15.0.0-canary.46"
1026+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-canary.46.tgz#09540048cce4ea548c8b3ff5832d87d93a4d1ac0"
1027+
integrity sha512-42fIDLl5Sm9klKZm5TH8H3CEms/bJ8xy1S5g5EW37l4xVbwfOV5q27NbXFIUAkAqHoXaMgzC/Yck/Vk1Z7b7eQ==
1028+
1029+
"@next/[email protected]canary.46":
1030+
version "15.0.0-canary.46"
1031+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-canary.46.tgz#e5abac98904de576beaf67ed5ead2e04bb425edd"
1032+
integrity sha512-9c3dArYniDMTfq2TM4dg8rbJp3hFWHq1KAYPsbmcm9b1n9twJEd/LnNLLrpN4ITk+f8XXGRSWZ5FerhQkDtDig==
1033+
1034+
"@next/[email protected]canary.46":
1035+
version "15.0.0-canary.46"
1036+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-canary.46.tgz#7b5315e0fcb0de9cf8efa1cf0270dfd570b31ae1"
1037+
integrity sha512-zTBQLNLv4DJfHZWLN4fC7IaSH3OV1QYNeqix4XjrVVXJ/G1A0F49SaVvpUMOM/APOsPBKTOzukaAJ39q7PkJmQ==
1038+
1039+
"@next/[email protected]canary.46":
1040+
version "15.0.0-canary.46"
1041+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-canary.46.tgz#ce26809835f1e36b5e156bef0dc3d4c925437d15"
1042+
integrity sha512-cPvHRaMDg3bt2uaPpGvc5xIUGsUg9NbS++ujMxwKVuo0VPBmMzyXjn+g/bro7yQR3YM8bYrQiPi0Cy2rPMXMmg==
1043+
1044+
"@next/[email protected]canary.46":
1045+
version "15.0.0-canary.46"
1046+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-canary.46.tgz#cc154ce99cb63f944c709d23051a2fc4772dd70d"
1047+
integrity sha512-Snt1dijo+6cmgVs/6TsvNJyw71fE4yLSURQ931TA2SMU1r6nAWqdyOWqPFxRKbOAXqAknP5hdoBR/hnEbFwH5g==
1048+
1049+
"@next/[email protected]canary.46":
1050+
version "15.0.0-canary.46"
1051+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-canary.46.tgz#c92322d0e5d733187ba4c368d62c822d725999c5"
1052+
integrity sha512-QEQA+r37Qw1+XhxqLt1Pk7ZMcHRUNMp1lmMmmo18kM16GfxGPu7tPT2XtQcObcvMeH0u6hYwwzzuVrB5BQo2HA==
1053+
1054+
"@next/[email protected]canary.46":
1055+
version "15.0.0-canary.46"
1056+
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-canary.46.tgz#a4a3ec5841705d48d54a5448796c235c66153d52"
1057+
integrity sha512-0BxRw87UV98DLrfv3+1r9KY29tvcRZ8iKKKubY/N/d82RFUx3J9/BiSCcacX1yckPvKSDFRUP3ukKzarIuDpXA==
1058+
1059+
"@next/[email protected]canary.46":
1060+
version "15.0.0-canary.46"
1061+
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-canary.46.tgz#c03b6299cb4ecb064ea28b781b09a3202ca1e257"
1062+
integrity sha512-CHjNDxkjHQhx0d3Rrlld+V7M5VsYnE0IMasuWF7LiA4AwkKIeuOxrgMKfwGWLYq5Y3fZ8JyqWx/28qc9GTydqA==
1063+
1064+
"@next/[email protected]canary.46":
1065+
version "15.0.0-canary.46"
1066+
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-canary.46.tgz#1dd796683ba89e29235e423e738f142d5eb4b0b7"
1067+
integrity sha512-2Z+X4fMKFI6NXgS+1Sqe/hp+XkU1cbU9rJ9lJkdj0pmY/Q2Ch0438Vm2hx0SGw0u8H8oBonmQEEJJZotXa9kIA==
10681068

10691069
"@nodelib/[email protected]":
10701070
version "2.1.5"
@@ -5623,28 +5623,28 @@ next-tick@^1.1.0:
56235623
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb"
56245624
integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==
56255625

5626-
next@^15.0.0-rc.0:
5627-
version "15.0.0-rc.0"
5628-
resolved "https://registry.yarnpkg.com/next/-/next-15.0.0-rc.0.tgz#ec9440e10c40f7f8c04487bd58aa970553d8148e"
5629-
integrity sha512-IWcCvxUSCAuOK5gig4+9yiyt/dLKpIa+WT01Qcx4CBE4TtwJljyTDnCVVn64jDZ4qmSzsaEYXpb4DTI8qbk03A==
5626+
5627+
version "15.0.0-canary.46"
5628+
resolved "https://registry.yarnpkg.com/next/-/next-15.0.0-canary.46.tgz#23d5ca935fadb418867804ea674aaee899775a01"
5629+
integrity sha512-m8raV39xX5v1JN20mA2olFQaglgWIHFo4WVIknrs11hQnW2A9sfYD5ULfYIGJu48eyBSVEMI8pf7VqDRrRZQKQ==
56305630
dependencies:
5631-
"@next/env" "15.0.0-rc.0"
5631+
"@next/env" "15.0.0-canary.46"
56325632
"@swc/helpers" "0.5.11"
56335633
busboy "1.6.0"
56345634
caniuse-lite "^1.0.30001579"
56355635
graceful-fs "^4.2.11"
56365636
postcss "8.4.31"
5637-
styled-jsx "5.1.3"
5637+
styled-jsx "5.1.6"
56385638
optionalDependencies:
5639-
"@next/swc-darwin-arm64" "15.0.0-rc.0"
5640-
"@next/swc-darwin-x64" "15.0.0-rc.0"
5641-
"@next/swc-linux-arm64-gnu" "15.0.0-rc.0"
5642-
"@next/swc-linux-arm64-musl" "15.0.0-rc.0"
5643-
"@next/swc-linux-x64-gnu" "15.0.0-rc.0"
5644-
"@next/swc-linux-x64-musl" "15.0.0-rc.0"
5645-
"@next/swc-win32-arm64-msvc" "15.0.0-rc.0"
5646-
"@next/swc-win32-ia32-msvc" "15.0.0-rc.0"
5647-
"@next/swc-win32-x64-msvc" "15.0.0-rc.0"
5639+
"@next/swc-darwin-arm64" "15.0.0-canary.46"
5640+
"@next/swc-darwin-x64" "15.0.0-canary.46"
5641+
"@next/swc-linux-arm64-gnu" "15.0.0-canary.46"
5642+
"@next/swc-linux-arm64-musl" "15.0.0-canary.46"
5643+
"@next/swc-linux-x64-gnu" "15.0.0-canary.46"
5644+
"@next/swc-linux-x64-musl" "15.0.0-canary.46"
5645+
"@next/swc-win32-arm64-msvc" "15.0.0-canary.46"
5646+
"@next/swc-win32-ia32-msvc" "15.0.0-canary.46"
5647+
"@next/swc-win32-x64-msvc" "15.0.0-canary.46"
56485648
sharp "^0.33.4"
56495649

56505650
nice-try@^1.0.4:
@@ -7564,10 +7564,10 @@ style-to-object@^0.3.0:
75647564
dependencies:
75657565
inline-style-parser "0.1.1"
75667566

7567-
7568-
version "5.1.3"
7569-
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.3.tgz#b148f3373af118768d1fcbd935e98c19e4bfeb1d"
7570-
integrity sha512-qLRShOWTE/Mf6Bvl72kFeKBl8N2Eq9WIFfoAuvbtP/6tqlnj1SCjv117n2MIjOPpa1jTorYqLJgsHKy5Y3ziww==
7567+
7568+
version "5.1.6"
7569+
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.6.tgz#83b90c077e6c6a80f7f5e8781d0f311b2fe41499"
7570+
integrity sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==
75717571
dependencies:
75727572
client-only "0.0.1"
75737573

0 commit comments

Comments
 (0)