1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-17 16:55:31 -04:00

bump a looooooot of deps

This commit is contained in:
2023-09-01 09:30:48 -04:00
parent f6726b5926
commit 2741b3ae0c
7 changed files with 726 additions and 728 deletions

View File

@@ -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"

View File

@@ -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;