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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user