feat: update remix to latest version, use Promise.all to fetch all posts

This commit is contained in:
Andrea 2024-12-24 16:53:34 +01:00
parent 1057d40d78
commit d7952ad640
Signed by: nullndr
GPG Key ID: 8DA8996EF89F33BB
5 changed files with 264 additions and 139 deletions

View File

@ -1,4 +1,4 @@
export function useFormattedDate(_date: string) { export function useFormattedDate(_date: Date) {
const date = new Date(_date); const date = new Date(_date);
const month = date.getUTCMonth().toString().padStart(2, "0"); const month = date.getUTCMonth().toString().padStart(2, "0");
const monthDate = date.getUTCDate().toString().padStart(2, "0"); const monthDate = date.getUTCDate().toString().padStart(2, "0");

View File

@ -42,8 +42,10 @@ export type Post = Omit<FrontMatter, "published"> & {
export const findPosts = async () => { export const findPosts = async () => {
const files = await readdir("posts"); const files = await readdir("posts");
const posts: Post[] = []; const posts = await Promise.all(
for (const file of files.filter((file) => file.endsWith(".mdx"))) { files
.filter((file) => file.endsWith(".mdx"))
.map(async (file) => {
const filePath = path.join(process.cwd(), `posts/${file}`); const filePath = path.join(process.cwd(), `posts/${file}`);
const postContent = (await readFile(filePath)).toString(); const postContent = (await readFile(filePath)).toString();
const { frontmatter } = await bundleMDX<FrontMatter>({ const { frontmatter } = await bundleMDX<FrontMatter>({
@ -65,12 +67,13 @@ export const findPosts = async () => {
}, },
}); });
posts.push({ return {
...frontmatter, ...frontmatter,
filename: file.replace(".mdx", ""), filename: file.replace(".mdx", ""),
published: frontmatter.date.toISOString(), published: frontmatter.date.toISOString(),
}); };
} }),
);
return posts.sort((a, b) => return posts.sort((a, b) =>
new Date(a.published) > new Date(b.published) ? -1 : 1, new Date(a.published) > new Date(b.published) ? -1 : 1,

322
package-lock.json generated
View File

@ -6,9 +6,9 @@
"": { "": {
"dependencies": { "dependencies": {
"@code-hike/mdx": "0.9.0", "@code-hike/mdx": "0.9.0",
"@remix-run/node": "2.14.0", "@remix-run/node": "2.15.2",
"@remix-run/react": "2.14.0", "@remix-run/react": "2.15.2",
"@remix-run/serve": "2.14.0", "@remix-run/serve": "2.15.2",
"codehike": "1.0.1", "codehike": "1.0.1",
"esbuild": "0.24.0", "esbuild": "0.24.0",
"isbot": "5.1.17", "isbot": "5.1.17",
@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.3", "@biomejs/biome": "1.9.3",
"@mdx-js/rollup": "3.0.1", "@mdx-js/rollup": "3.0.1",
"@remix-run/dev": "2.14.0", "@remix-run/dev": "2.15.2",
"@tailwindcss/typography": "0.5.15", "@tailwindcss/typography": "0.5.15",
"@types/react": "18.3.8", "@types/react": "18.3.8",
"@types/react-dom": "18.3.0", "@types/react-dom": "18.3.0",
@ -1571,9 +1571,9 @@
} }
}, },
"node_modules/@remix-run/dev": { "node_modules/@remix-run/dev": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/dev/-/dev-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/dev/-/dev-2.15.2.tgz",
"integrity": "sha512-WMun4fy0ANh92WecufUNb3IV/R02uyfBslM7g7nCO1/lzDII+XmfEkZY5CWPaLmnkoAc1DR2G60+eTHRo480Ug==", "integrity": "sha512-o8lix8t4GBhtXjo/G1IzwtHVW5GRMs7amtFtBHiR1bhSyK7VyX5qGtTDmJyny5QDv83pxaLOCiE0dUng2BCoyQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -1587,9 +1587,9 @@
"@babel/types": "^7.22.5", "@babel/types": "^7.22.5",
"@mdx-js/mdx": "^2.3.0", "@mdx-js/mdx": "^2.3.0",
"@npmcli/package-json": "^4.0.1", "@npmcli/package-json": "^4.0.1",
"@remix-run/node": "2.14.0", "@remix-run/node": "2.15.2",
"@remix-run/router": "1.21.0", "@remix-run/router": "1.21.0",
"@remix-run/server-runtime": "2.14.0", "@remix-run/server-runtime": "2.15.2",
"@types/mdx": "^2.0.5", "@types/mdx": "^2.0.5",
"@vanilla-extract/integration": "^6.2.0", "@vanilla-extract/integration": "^6.2.0",
"arg": "^5.0.1", "arg": "^5.0.1",
@ -1640,8 +1640,8 @@
"node": ">=18.0.0" "node": ">=18.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@remix-run/react": "^2.14.0", "@remix-run/react": "^2.15.2",
"@remix-run/serve": "^2.14.0", "@remix-run/serve": "^2.15.2",
"typescript": "^5.1.0", "typescript": "^5.1.0",
"vite": "^5.1.0", "vite": "^5.1.0",
"wrangler": "^3.28.2" "wrangler": "^3.28.2"
@ -3359,12 +3359,12 @@
} }
}, },
"node_modules/@remix-run/express": { "node_modules/@remix-run/express": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/express/-/express-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/express/-/express-2.15.2.tgz",
"integrity": "sha512-FZ7z8PmhX6ztP7FZMLv7a0+V4cuMb9Sx+nzZGD89Kv3RSGWUw5OAUDnT+2wsP+CyvRQXnOjUyD5cRe836pvo6Q==", "integrity": "sha512-54FKQ6/Zj2DCxc4/9tWKUJLPkFakCUf1m7j7a5zp4JGDr436lkZEpS9btfoBZAVq14SIMp5Uc4yt5rUJ1PMORw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/node": "2.14.0" "@remix-run/node": "2.15.2"
}, },
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=18.0.0"
@ -3380,12 +3380,12 @@
} }
}, },
"node_modules/@remix-run/node": { "node_modules/@remix-run/node": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/node/-/node-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/node/-/node-2.15.2.tgz",
"integrity": "sha512-ou16LMJYv0ElIToZ6dDqaLjv1T3iBEwuJTBahveEA8NkkACIWODJ2fgUYf1UKLMKHVdHjNImLzS37HdSZY0Q6g==", "integrity": "sha512-NS/h5uxje7DYCNgcKqKAiUhf0r2HVnoYUBWLyIIMmCUP1ddWurBP6xTPcWzGhEvV/EvguniYi1wJZ5+X8sonWw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/server-runtime": "2.14.0", "@remix-run/server-runtime": "2.15.2",
"@remix-run/web-fetch": "^4.4.2", "@remix-run/web-fetch": "^4.4.2",
"@web3-storage/multipart-parser": "^1.0.0", "@web3-storage/multipart-parser": "^1.0.0",
"cookie-signature": "^1.1.0", "cookie-signature": "^1.1.0",
@ -3406,15 +3406,15 @@
} }
}, },
"node_modules/@remix-run/react": { "node_modules/@remix-run/react": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/react/-/react-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/react/-/react-2.15.2.tgz",
"integrity": "sha512-uQcy5gxazHtpislgonx2dwRuR/CbvYUeguQxDgawd+dAyoglK2rFx58+F6Kj0Vjw6v/iuvxibA/lEAiAaB4ZmQ==", "integrity": "sha512-NAAMsSgoC/sdOgovUewwRCE/RUm3F+MBxxZKfwu3POCNeHaplY5qGkH/y8PUXvdN1EBG7Z0Ko43dyzCfcEy5PA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/router": "1.21.0", "@remix-run/router": "1.21.0",
"@remix-run/server-runtime": "2.14.0", "@remix-run/server-runtime": "2.15.2",
"react-router": "6.28.0", "react-router": "6.28.1",
"react-router-dom": "6.28.0", "react-router-dom": "6.28.1",
"turbo-stream": "2.4.0" "turbo-stream": "2.4.0"
}, },
"engines": { "engines": {
@ -3441,13 +3441,13 @@
} }
}, },
"node_modules/@remix-run/serve": { "node_modules/@remix-run/serve": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/serve/-/serve-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/serve/-/serve-2.15.2.tgz",
"integrity": "sha512-Bu8zIxmq0/3NIRIWos/qXb3U1Zx6rpV5W96Vg/8h5q6u7tXHdU2Ot2VmvlWRTsQF6jZhjeW21MogNvdSAb1new==", "integrity": "sha512-m/nZtAUzzGcixNgNc3RNjA1ocFlWAuZFALpZ5fJdPXmITwqRwfjo/1gI+jx7AL7haoo+4j/sAljuAQw2CiswXA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/express": "2.14.0", "@remix-run/express": "2.15.2",
"@remix-run/node": "2.14.0", "@remix-run/node": "2.15.2",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"compression": "^1.7.4", "compression": "^1.7.4",
"express": "^4.20.0", "express": "^4.20.0",
@ -3463,9 +3463,9 @@
} }
}, },
"node_modules/@remix-run/server-runtime": { "node_modules/@remix-run/server-runtime": {
"version": "2.14.0", "version": "2.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/server-runtime/-/server-runtime-2.14.0.tgz", "resolved": "https://registry.npmjs.org/@remix-run/server-runtime/-/server-runtime-2.15.2.tgz",
"integrity": "sha512-9Th9UzDaoFFBD7zA5mRI1KT8JktFLN4ij9jPygrKBhG/kYmNIvhcMtq9VyjcbMvFK5natTyhOhrrKRIHtijD4w==", "integrity": "sha512-OqiPcvEnnU88B8b1LIWHHkQ3Tz2GDAmQ1RihFNQsbrFKpDsQLkw0lJlnfgKA/uHd0CEEacpfV7C9qqJT3V6Z2g==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/router": "1.21.0", "@remix-run/router": "1.21.0",
@ -4915,16 +4915,44 @@
} }
}, },
"node_modules/call-bind": { "node_modules/call-bind": {
"version": "1.0.7", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind-apply-helpers": "^1.0.0",
"es-define-property": "^1.0.0", "es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4", "get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1" "set-function-length": "^1.2.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz",
"integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/call-bound": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"get-intrinsic": "^1.2.6"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -5577,6 +5605,20 @@
"url": "https://dotenvx.com" "url": "https://dotenvx.com"
} }
}, },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/duplexify": { "node_modules/duplexify": {
"version": "3.7.1", "version": "3.7.1",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
@ -5670,13 +5712,10 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/es-define-property": { "node_modules/es-define-property": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"license": "MIT", "license": "MIT",
"dependencies": {
"get-intrinsic": "^1.2.4"
},
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
} }
@ -5697,6 +5736,18 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/es-object-atoms": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
"integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.24.0", "version": "0.24.0",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz",
@ -5935,9 +5986,9 @@
} }
}, },
"node_modules/express": { "node_modules/express": {
"version": "4.21.1", "version": "4.21.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
"integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"accepts": "~1.3.8", "accepts": "~1.3.8",
@ -5959,7 +6010,7 @@
"methods": "~1.1.2", "methods": "~1.1.2",
"on-finished": "2.4.1", "on-finished": "2.4.1",
"parseurl": "~1.3.3", "parseurl": "~1.3.3",
"path-to-regexp": "0.1.10", "path-to-regexp": "0.1.12",
"proxy-addr": "~2.0.7", "proxy-addr": "~2.0.7",
"qs": "6.13.0", "qs": "6.13.0",
"range-parser": "~1.2.1", "range-parser": "~1.2.1",
@ -5974,6 +6025,10 @@
}, },
"engines": { "engines": {
"node": ">= 0.10.0" "node": ">= 0.10.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
} }
}, },
"node_modules/express/node_modules/cookie": { "node_modules/express/node_modules/cookie": {
@ -6304,16 +6359,21 @@
} }
}, },
"node_modules/get-intrinsic": { "node_modules/get-intrinsic": {
"version": "1.2.4", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz",
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"dunder-proto": "^1.0.0",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0", "es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"function-bind": "^1.1.2", "function-bind": "^1.1.2",
"has-proto": "^1.0.1", "gopd": "^1.2.0",
"has-symbols": "^1.0.3", "has-symbols": "^1.1.0",
"hasown": "^2.0.0" "hasown": "^2.0.2",
"math-intrinsics": "^1.0.0"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -6398,12 +6458,12 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/gopd": { "node_modules/gopd": {
"version": "1.0.1", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"license": "MIT", "license": "MIT",
"dependencies": { "engines": {
"get-intrinsic": "^1.1.3" "node": ">= 0.4"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
@ -6493,22 +6553,10 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/has-proto": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": { "node_modules/has-symbols": {
"version": "1.0.3", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -6788,13 +6836,13 @@
} }
}, },
"node_modules/is-arguments": { "node_modules/is-arguments": {
"version": "1.1.1", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
"integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind": "^1.0.2", "call-bound": "^1.0.2",
"has-tostringtag": "^1.0.0" "has-tostringtag": "^1.0.2"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -7012,12 +7060,12 @@
} }
}, },
"node_modules/is-typed-array": { "node_modules/is-typed-array": {
"version": "1.1.13", "version": "1.1.15",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
"integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"which-typed-array": "^1.1.14" "which-typed-array": "^1.1.16"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -7348,6 +7396,15 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/mdast-util-definitions": { "node_modules/mdast-util-definitions": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz",
@ -9115,9 +9172,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/path-to-regexp": { "node_modules/path-to-regexp": {
"version": "0.1.10", "version": "0.1.12",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/pathe": { "node_modules/pathe": {
@ -9704,9 +9761,9 @@
} }
}, },
"node_modules/react-router": { "node_modules/react-router": {
"version": "6.28.0", "version": "6.28.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.1.tgz",
"integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==", "integrity": "sha512-2omQTA3rkMljmrvvo6WtewGdVh45SpL9hGiCI9uUrwGGfNFDIvGK4gYJsKlJoNVi6AQZcopSCballL+QGOm7fA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/router": "1.21.0" "@remix-run/router": "1.21.0"
@ -9719,13 +9776,13 @@
} }
}, },
"node_modules/react-router-dom": { "node_modules/react-router-dom": {
"version": "6.28.0", "version": "6.28.1",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.1.tgz",
"integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==", "integrity": "sha512-YraE27C/RdjcZwl5UCqF/ffXnZDxpJdk9Q6jw38SZHjXs7NNdpViq2l2c7fO7+4uWaEfcwfGCv3RSg4e1By/fQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@remix-run/router": "1.21.0", "@remix-run/router": "1.21.0",
"react-router": "6.28.0" "react-router": "6.28.1"
}, },
"engines": { "engines": {
"node": ">=14.0.0" "node": ">=14.0.0"
@ -10172,15 +10229,69 @@
} }
}, },
"node_modules/side-channel": { "node_modules/side-channel": {
"version": "1.0.6", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind": "^1.0.7",
"es-errors": "^1.3.0", "es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4", "object-inspect": "^1.13.3",
"object-inspect": "^1.13.1" "side-channel-list": "^1.0.0",
"side-channel-map": "^1.0.1",
"side-channel-weakmap": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-list": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-map": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/side-channel-weakmap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.2",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.5",
"object-inspect": "^1.13.3",
"side-channel-map": "^1.0.1"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@ -11947,15 +12058,16 @@
} }
}, },
"node_modules/which-typed-array": { "node_modules/which-typed-array": {
"version": "1.1.15", "version": "1.1.18",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz",
"integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"available-typed-arrays": "^1.0.7", "available-typed-arrays": "^1.0.7",
"call-bind": "^1.0.7", "call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"for-each": "^0.3.3", "for-each": "^0.3.3",
"gopd": "^1.0.1", "gopd": "^1.2.0",
"has-tostringtag": "^1.0.2" "has-tostringtag": "^1.0.2"
}, },
"engines": { "engines": {

View File

@ -13,9 +13,9 @@
}, },
"dependencies": { "dependencies": {
"@code-hike/mdx": "0.9.0", "@code-hike/mdx": "0.9.0",
"@remix-run/node": "2.14.0", "@remix-run/node": "2.15.2",
"@remix-run/react": "2.14.0", "@remix-run/react": "2.15.2",
"@remix-run/serve": "2.14.0", "@remix-run/serve": "2.15.2",
"codehike": "1.0.1", "codehike": "1.0.1",
"esbuild": "0.24.0", "esbuild": "0.24.0",
"isbot": "5.1.17", "isbot": "5.1.17",
@ -29,7 +29,7 @@
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.3", "@biomejs/biome": "1.9.3",
"@mdx-js/rollup": "3.0.1", "@mdx-js/rollup": "3.0.1",
"@remix-run/dev": "2.14.0", "@remix-run/dev": "2.15.2",
"@tailwindcss/typography": "0.5.15", "@tailwindcss/typography": "0.5.15",
"@types/react": "18.3.8", "@types/react": "18.3.8",
"@types/react-dom": "18.3.0", "@types/react-dom": "18.3.0",

View File

@ -4,6 +4,12 @@ import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths"; import tsconfigPaths from "vite-tsconfig-paths";
declare module "@remix-run/node" {
interface Future {
v3_singleFetch: true;
}
}
export default defineConfig({ export default defineConfig({
server: { server: {
port: 3000, port: 3000,
@ -15,7 +21,11 @@ export default defineConfig({
remix({ remix({
ignoredRouteFiles: ["**/*.css"], ignoredRouteFiles: ["**/*.css"],
future: { future: {
unstable_singleFetch: true, v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
v3_throwAbortReason: true,
v3_relativeSplatPath: true,
v3_fetcherPersist: true,
}, },
}), }),
tsconfigPaths(), tsconfigPaths(),