mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 04:45:22 -04:00
bump a looooooot of deps
This commit is contained in:
parent
f6726b5926
commit
2741b3ae0c
@ -1 +1 @@
|
||||
18.16.1
|
||||
18.17.1
|
||||
|
@ -8,12 +8,12 @@ import removeMarkdown from "remove-markdown";
|
||||
import { unified } from "unified";
|
||||
import remarkParse from "remark-parse";
|
||||
import remarkRehype from "remark-rehype";
|
||||
import rehypeStringify from "rehype-stringify";
|
||||
import rehypeSanitize from "rehype-sanitize";
|
||||
import remarkSmartypants from "remark-smartypants";
|
||||
import rehypeStringify from "rehype-stringify";
|
||||
import { formatDate } from "./format-date";
|
||||
|
||||
import type { NoteFrontMatter } from "../../types";
|
||||
import rehypeSanitize from "rehype-sanitize";
|
||||
|
||||
export const getNoteSlugs = async (): Promise<string[]> => {
|
||||
// list all .mdx files in "/notes"
|
||||
|
@ -2,16 +2,18 @@ import { PrismaClient } from "@prisma/client/edge";
|
||||
|
||||
// creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the
|
||||
// number of connection pools available (especially when hot reloading from `next dev`).
|
||||
// https://pris.ly/d/help/next-js-best-practices
|
||||
// https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
|
||||
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
prisma: PrismaClient | undefined;
|
||||
const prismaClientSingleton = () => {
|
||||
return new PrismaClient();
|
||||
};
|
||||
|
||||
export const prisma =
|
||||
globalForPrisma.prisma ??
|
||||
new PrismaClient({
|
||||
log: ["query"],
|
||||
});
|
||||
type PrismaClientSingleton = ReturnType<typeof prismaClientSingleton>;
|
||||
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
prisma: PrismaClientSingleton | undefined;
|
||||
};
|
||||
|
||||
export const prisma = globalForPrisma.prisma ?? prismaClientSingleton();
|
||||
|
||||
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
||||
|
289
next.config.js
289
next.config.js
@ -1,161 +1,156 @@
|
||||
// @ts-check
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const path = require("path");
|
||||
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
|
||||
const config = require("./lib/config");
|
||||
|
||||
module.exports = (/** @type {string} */ phase) => {
|
||||
/**
|
||||
* @type {import("next").NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
swcMinify: true,
|
||||
reactStrictMode: true,
|
||||
trailingSlash: true,
|
||||
productionBrowserSourceMaps: true,
|
||||
transpilePackages: ["@novnc/novnc"],
|
||||
env: {
|
||||
BASE_URL:
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV !== "production" && process.env.NEXT_PUBLIC_VERCEL_URL !== undefined
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` // https://vercel.com/docs/concepts/projects/environment-variables#system-environment-variables
|
||||
: phase === PHASE_DEVELOPMENT_SERVER
|
||||
? `http://localhost:${process.env.PORT || 3000}` // https://nextjs.org/docs/api-reference/cli#development
|
||||
: `https://${config.siteDomain}`, // fallback to production url
|
||||
// freeze timestamp at build time for when server-side pages need a "last updated" date. calling Date.now() from
|
||||
// pages using getServerSideProps will return the current(ish) time instead, which is usually not what we want.
|
||||
RELEASE_DATE: new Date().toISOString(),
|
||||
},
|
||||
images: {
|
||||
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
|
||||
formats: ["image/avif", "image/webp"],
|
||||
},
|
||||
experimental: {
|
||||
legacyBrowsers: false,
|
||||
newNextLinkBehavior: true, // https://github.com/vercel/next.js/pull/36436
|
||||
optimisticClientCache: false, // https://github.com/vercel/next.js/discussions/40268#discussioncomment-3572642
|
||||
},
|
||||
webpack: (config) => {
|
||||
// allow processing SVGs from the below packages directly instead of through their different exports, and leave
|
||||
// other static imports of SVGs alone.
|
||||
// see: ./components/Icons/index.ts
|
||||
config.module.rules.push({
|
||||
test: /\.svg$/i,
|
||||
issuer: { and: [/\.(js|ts)x?$/] },
|
||||
use: [
|
||||
{
|
||||
loader: "@svgr/webpack",
|
||||
options: {
|
||||
icon: true,
|
||||
typescript: true,
|
||||
svgProps: {
|
||||
"aria-hidden": true,
|
||||
},
|
||||
/**
|
||||
* @type {import("next").NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
swcMinify: true,
|
||||
reactStrictMode: true,
|
||||
trailingSlash: true,
|
||||
productionBrowserSourceMaps: true,
|
||||
transpilePackages: ["@novnc/novnc"],
|
||||
env: {
|
||||
BASE_URL: process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
||||
: `http://localhost:${process.env.PORT || 3000}`,
|
||||
// freeze timestamp at build time for when server-side pages need a "last updated" date. calling Date.now() from
|
||||
// pages using getServerSideProps will return the current(ish) time instead, which is usually not what we want.
|
||||
RELEASE_DATE: new Date().toISOString(),
|
||||
},
|
||||
images: {
|
||||
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
|
||||
formats: ["image/avif", "image/webp"],
|
||||
},
|
||||
experimental: {
|
||||
legacyBrowsers: false,
|
||||
newNextLinkBehavior: true, // https://github.com/vercel/next.js/pull/36436
|
||||
optimisticClientCache: false, // https://github.com/vercel/next.js/discussions/40268#discussioncomment-3572642
|
||||
largePageDataBytes: 128 * 1000, // raise getStaticProps limit to 512 kB since compiled MDX might exceed this.
|
||||
},
|
||||
webpack: (config) => {
|
||||
// allow processing SVGs from the below packages directly instead of through their different exports, and leave
|
||||
// other static imports of SVGs alone.
|
||||
// see: ./components/Icons/index.ts
|
||||
config.module.rules.push({
|
||||
test: /\.svg$/i,
|
||||
issuer: { and: [/\.(js|ts)x?$/] },
|
||||
use: [
|
||||
{
|
||||
loader: "@svgr/webpack",
|
||||
options: {
|
||||
icon: true,
|
||||
typescript: true,
|
||||
svgProps: {
|
||||
"aria-hidden": true,
|
||||
},
|
||||
},
|
||||
],
|
||||
include: ["@primer/octicons", "feather-icons", "simple-icons"].map(
|
||||
// pnpm uses symlinks extensively, so path.resolve(__dirname, "node_modules/...") won't cut it here.
|
||||
(pkg) => path.dirname(require.resolve(pkg)) // => node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist
|
||||
),
|
||||
});
|
||||
},
|
||||
],
|
||||
include: ["@primer/octicons", "feather-icons", "simple-icons"].map(
|
||||
// pnpm uses symlinks extensively, so path.resolve(__dirname, "node_modules/...") won't cut it here.
|
||||
(pkg) => path.dirname(require.resolve(pkg)) // => node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist
|
||||
),
|
||||
});
|
||||
|
||||
return config;
|
||||
return config;
|
||||
},
|
||||
eslint: {
|
||||
// https://nextjs.org/docs/basic-features/eslint#linting-custom-directories-and-files
|
||||
dirs: ["components", "contexts", "hooks", "lib", "pages", "types"],
|
||||
},
|
||||
headers: async () => [
|
||||
{
|
||||
source: "/:path(.*)",
|
||||
headers: [
|
||||
{
|
||||
// https://gitweb.torproject.org/tor-browser-spec.git/tree/proposals/100-onion-location-header.txt
|
||||
key: "Onion-Location",
|
||||
value: config.onionDomain ? `${config.onionDomain}/:path*` : "",
|
||||
},
|
||||
{
|
||||
// 🥛
|
||||
key: "x-got-milk",
|
||||
value: "2%",
|
||||
},
|
||||
],
|
||||
},
|
||||
eslint: {
|
||||
// https://nextjs.org/docs/basic-features/eslint#linting-custom-directories-and-files
|
||||
dirs: ["components", "contexts", "hooks", "lib", "pages", "types"],
|
||||
{
|
||||
source: "/pubkey.asc",
|
||||
headers: [
|
||||
{
|
||||
key: "Content-Type",
|
||||
value: "text/plain; charset=utf-8",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
rewrites: async () => [
|
||||
{ source: "/favicon.ico", destination: "/static/favicons/favicon.ico" },
|
||||
{ source: "/favicon.png", destination: "/static/favicons/favicon.png" },
|
||||
{ source: "/apple-touch-icon.png", destination: "/static/favicons/apple-touch-icon.png" },
|
||||
{ source: "/apple-touch-icon-precomposed.png", destination: "/static/favicons/apple-touch-icon.png" },
|
||||
],
|
||||
redirects: async () => [
|
||||
{
|
||||
source: "/stats/",
|
||||
destination: `https://app.usefathom.com/share/${config.fathomSiteId}/${config.siteDomain}`,
|
||||
permanent: false,
|
||||
},
|
||||
headers: async () => [
|
||||
{
|
||||
source: "/:path(.*)",
|
||||
headers: [
|
||||
{
|
||||
// https://gitweb.torproject.org/tor-browser-spec.git/tree/proposals/100-onion-location-header.txt
|
||||
key: "Onion-Location",
|
||||
value: config.onionDomain ? `${config.onionDomain}/:path*` : "",
|
||||
},
|
||||
{
|
||||
// 🥛
|
||||
key: "x-got-milk",
|
||||
value: "2%",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
source: "/pubkey.asc",
|
||||
headers: [
|
||||
{
|
||||
key: "Content-Type",
|
||||
value: "text/plain; charset=utf-8",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
rewrites: async () => [
|
||||
{ source: "/favicon.ico", destination: "/static/favicons/favicon.ico" },
|
||||
{ source: "/favicon.png", destination: "/static/favicons/favicon.png" },
|
||||
{ source: "/apple-touch-icon.png", destination: "/static/favicons/apple-touch-icon.png" },
|
||||
{ source: "/apple-touch-icon-precomposed.png", destination: "/static/favicons/apple-touch-icon.png" },
|
||||
],
|
||||
redirects: async () => [
|
||||
{
|
||||
source: "/stats/",
|
||||
destination: `https://app.usefathom.com/share/${config.fathomSiteId}/${config.siteDomain}`,
|
||||
permanent: false,
|
||||
},
|
||||
|
||||
// NOTE: don't remove this, it ensures de-AMPing the site hasn't offended our google overlords too badly!
|
||||
// https://developers.google.com/search/docs/advanced/experience/remove-amp#remove-only-amp
|
||||
{ source: "/notes/:slug/amp.html", destination: "/notes/:slug/", statusCode: 301 },
|
||||
// NOTE: don't remove this, it ensures de-AMPing the site hasn't offended our google overlords too badly!
|
||||
// https://developers.google.com/search/docs/advanced/experience/remove-amp#remove-only-amp
|
||||
{ source: "/notes/:slug/amp.html", destination: "/notes/:slug/", statusCode: 301 },
|
||||
|
||||
// mastodon via subdomain
|
||||
// https://docs.joinmastodon.org/admin/config/#web_domain
|
||||
{
|
||||
source: "/.well-known/host-meta:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/host-meta:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/.well-known/webfinger:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/webfinger:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/.well-known/nodeinfo:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/nodeinfo:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/@jake/:path*",
|
||||
destination: "https://fediverse.jarv.is/@jake/:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
// mastodon via subdomain
|
||||
// https://docs.joinmastodon.org/admin/config/#web_domain
|
||||
{
|
||||
source: "/.well-known/host-meta:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/host-meta:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/.well-known/webfinger:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/webfinger:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/.well-known/nodeinfo:path*",
|
||||
destination: "https://fediverse.jarv.is/.well-known/nodeinfo:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
{
|
||||
source: "/@jake/:path*",
|
||||
destination: "https://fediverse.jarv.is/@jake/:path*",
|
||||
statusCode: 301,
|
||||
},
|
||||
|
||||
// remnants of previous sites/CMSes:
|
||||
{ source: "/index.xml", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/feed/", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/rss/", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/blog/:path*", destination: "/notes/", permanent: true },
|
||||
{ source: "/archives/:path*", destination: "/notes/", permanent: true },
|
||||
{
|
||||
source: "/2016/02/28/millenial-with-hillary-clinton/",
|
||||
destination: "/notes/millenial-with-hillary-clinton/",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/2018/12/04/how-to-shrink-linux-virtual-disk-vmware/",
|
||||
destination: "/notes/how-to-shrink-linux-virtual-disk-vmware/",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/2018/12/10/cool-bash-tricks-for-your-terminal-dotfiles/",
|
||||
destination: "/notes/cool-bash-tricks-for-your-terminal-dotfiles/",
|
||||
permanent: true,
|
||||
},
|
||||
{ source: "/resume/", destination: "/static/resume.pdf", permanent: false },
|
||||
{ source: "/resume.pdf", destination: "/static/resume.pdf", permanent: false },
|
||||
],
|
||||
};
|
||||
|
||||
return nextConfig;
|
||||
// remnants of previous sites/CMSes:
|
||||
{ source: "/index.xml", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/feed/", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/rss/", destination: "/feed.xml", permanent: true },
|
||||
{ source: "/blog/:path*", destination: "/notes/", permanent: true },
|
||||
{ source: "/archives/:path*", destination: "/notes/", permanent: true },
|
||||
{
|
||||
source: "/2016/02/28/millenial-with-hillary-clinton/",
|
||||
destination: "/notes/millenial-with-hillary-clinton/",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/2018/12/04/how-to-shrink-linux-virtual-disk-vmware/",
|
||||
destination: "/notes/how-to-shrink-linux-virtual-disk-vmware/",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/2018/12/10/cool-bash-tricks-for-your-terminal-dotfiles/",
|
||||
destination: "/notes/cool-bash-tricks-for-your-terminal-dotfiles/",
|
||||
permanent: true,
|
||||
},
|
||||
{ source: "/resume/", destination: "/static/resume.pdf", permanent: false },
|
||||
{ source: "/resume.pdf", destination: "/static/resume.pdf", permanent: false },
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
70
package.json
70
package.json
@ -21,24 +21,24 @@
|
||||
"@giscus/react": "^2.3.0",
|
||||
"@hcaptcha/react-hcaptcha": "^1.8.1",
|
||||
"@novnc/novnc": "github:novnc/novnc#ca6527c1bf7131adccfdcc5028964a1e67f9018c",
|
||||
"@octokit/graphql": "^6.0.1",
|
||||
"@octokit/graphql-schema": "^14.19.0",
|
||||
"@primer/octicons": "^19.4.0",
|
||||
"@prisma/client": "^4.16.2",
|
||||
"@octokit/graphql": "^7.0.1",
|
||||
"@octokit/graphql-schema": "^14.27.2",
|
||||
"@primer/octicons": "^19.7.0",
|
||||
"@prisma/client": "^5.2.0",
|
||||
"@react-spring/web": "^9.7.3",
|
||||
"@stitches/react": "^1.3.1-1",
|
||||
"@vercel/analytics": "^1.0.1",
|
||||
"@vercel/postgres": "^0.4.0",
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"@vercel/postgres": "^0.4.1",
|
||||
"comma-number": "^2.1.0",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"dayjs": "^1.11.9",
|
||||
"fast-glob": "^3.3.0",
|
||||
"fast-glob": "^3.3.1",
|
||||
"fathom-client": "^3.5.0",
|
||||
"feather-icons": "^4.29.0",
|
||||
"feather-icons": "^4.29.1",
|
||||
"feed": "^4.2.2",
|
||||
"formik": "^2.4.2",
|
||||
"formik": "^2.4.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"next": "13.4.8",
|
||||
"next": "13.4.19",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"next-seo": "^6.1.0",
|
||||
"obj-str": "^1.1.0",
|
||||
@ -49,59 +49,59 @@
|
||||
"query-string": "^8.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-error-boundary": "^4.0.10",
|
||||
"react-error-boundary": "^4.0.11",
|
||||
"react-gist": "^1.2.4",
|
||||
"react-innertext": "^1.1.5",
|
||||
"react-intersection-observer": "^9.5.2",
|
||||
"react-is": "18.2.0",
|
||||
"react-player": "~2.10.1",
|
||||
"react-textarea-autosize": "^8.5.2",
|
||||
"react-textarea-autosize": "^8.5.3",
|
||||
"react-twitter-embed": "^4.0.4",
|
||||
"rehype-prism-plus": "^1.6.1",
|
||||
"rehype-prism-plus": "^1.6.3",
|
||||
"rehype-sanitize": "^5.0.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"rehype-stringify": "^9.0.3",
|
||||
"rehype-stringify": "^9.0.4",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-parse": "^10.0.2",
|
||||
"remark-rehype": "^10.1.0",
|
||||
"remark-smartypants": "^2.0.0",
|
||||
"remark-unwrap-images": "^3.0.1",
|
||||
"remove-markdown": "^0.5.0",
|
||||
"simple-icons": "^9.4.0",
|
||||
"simple-icons": "^9.12.0",
|
||||
"sitemap": "^7.1.1",
|
||||
"stitches-normalize": "^2.0.0",
|
||||
"swr": "^2.2.0",
|
||||
"swr": "^2.2.2",
|
||||
"unified": "^10.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jakejarvis/eslint-config": "^3.1.0",
|
||||
"@svgr/webpack": "^8.0.1",
|
||||
"@jakejarvis/eslint-config": "github:jakejarvis/eslint-config",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@types/comma-number": "^2.1.0",
|
||||
"@types/node": "^18.16.19",
|
||||
"@types/node": "^18.17.12",
|
||||
"@types/novnc__novnc": "^1.3.0",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
"@types/react": "^18.2.14",
|
||||
"@types/react-dom": "^18.2.6",
|
||||
"@types/react": "^18.2.21",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@types/react-is": "^18.2.1",
|
||||
"@types/remove-markdown": "^0.3.1",
|
||||
"@types/uglify-js": "^3.17.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
||||
"@typescript-eslint/parser": "^5.61.0",
|
||||
"@types/uglify-js": "^3.17.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
||||
"@typescript-eslint/parser": "^6.5.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "~8.44.0",
|
||||
"eslint-config-next": "13.4.8",
|
||||
"eslint": "~8.48.0",
|
||||
"eslint-config-next": "13.4.19",
|
||||
"eslint-config-prettier": "~8.8.0",
|
||||
"eslint-plugin-mdx": "~2.1.0",
|
||||
"eslint-plugin-mdx": "~2.2.0",
|
||||
"eslint-plugin-prettier": "~4.2.1",
|
||||
"lint-staged": "^13.2.3",
|
||||
"lint-staged": "^14.0.1",
|
||||
"prettier": "^2.8.8",
|
||||
"prisma": "^4.16.2",
|
||||
"simple-git-hooks": "^2.8.1",
|
||||
"typescript": "^5.1.6",
|
||||
"prisma": "^5.2.0",
|
||||
"simple-git-hooks": "^2.9.0",
|
||||
"typescript": "^5.2.2",
|
||||
"uglify-js": "^3.17.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"sharp": "^0.32.1"
|
||||
"sharp": "^0.32.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.x"
|
||||
@ -118,9 +118,9 @@
|
||||
"eslint"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@8.6.6",
|
||||
"packageManager": "pnpm@8.7.1",
|
||||
"volta": {
|
||||
"node": "18.16.1",
|
||||
"pnpm": "8.6.6"
|
||||
"node": "18.17.1",
|
||||
"pnpm": "8.7.1"
|
||||
}
|
||||
}
|
||||
|
1070
pnpm-lock.yaml
generated
1070
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,5 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
previewFeatures = ["jsonProtocol"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
Loading…
x
Reference in New Issue
Block a user