diff --git a/.github/canary-version.js b/.github/canary-version.js index 9f5d524ab3..1548f62557 100644 --- a/.github/canary-version.js +++ b/.github/canary-version.js @@ -1,5 +1,5 @@ -import fs from "fs"; import { exec } from "child_process"; +import fs from "fs"; const pkgJsonPaths = [ "packages/uploadthing/package.json", @@ -25,11 +25,11 @@ try { const newContent = content .replace( new RegExp(`"@uploadthing/\\*": "${oldVersion}"`, "g"), - `"@uploadthing/*": "${newVersion}"` + `"@uploadthing/*": "${newVersion}"`, ) .replace( new RegExp(`"uploadthing": "${oldVersion}"`, "g"), - `"uploadthing": "${newVersion}"` + `"uploadthing": "${newVersion}"`, ); fs.writeFileSync(pkgJsonPath, newContent); diff --git a/.gitignore b/.gitignore index cc5275a9e2..c7bff79c41 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ coverage # next.js .next/ +**/next-env.d.ts out/ build diff --git a/.thing/hooks/file_upload.config.json b/.thing/hooks/file_upload.config.json index e17a66a29b..e60d9c8717 100644 --- a/.thing/hooks/file_upload.config.json +++ b/.thing/hooks/file_upload.config.json @@ -4,4 +4,4 @@ "Content-Type": "application/json", "x-ping-signature": "43c0d8fc0eb544caf6d95bb7ca4d83fa96d8b32615029ee5e8f349e10b5ba5c0f0e1079f8b35a4a0b55b93b7a6810f072d925f0de573251a027a21fb97c541b9" } -} \ No newline at end of file +} diff --git a/.thing/hooks/get_presigned.config.json b/.thing/hooks/get_presigned.config.json index 09895f9b84..712eff7153 100644 --- a/.thing/hooks/get_presigned.config.json +++ b/.thing/hooks/get_presigned.config.json @@ -1,3 +1,3 @@ { "url": "http://localhost:3020/api/prepareUpload" -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 610e86d48e..58cfd45ff0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,8 @@ "eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }], "typescript.tsdk": "node_modules/typescript/lib", "eslint.workingDirectories": [ - "examples/appdir", - "examples/pagedir", - "packages/uploadthing", - "docs" + "docs", + { "pattern": "./packages/**" }, + { "pattern": "./examples/**" } ] } diff --git a/docs/package.json b/docs/package.json index af50b37b9b..c433d19436 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,7 +11,7 @@ "debug": "NODE_OPTIONS='--inspect' next dev" }, "dependencies": { - "next": "13.4.3", + "next": "13.4.4", "nextra": "^2.6.0", "nextra-theme-docs": "^2.6.0", "react": "18.2.0", diff --git a/docs/src/pages/_app.mdx b/docs/src/pages/_app.mdx index cf06318a0f..39b86cd6bc 100644 --- a/docs/src/pages/_app.mdx +++ b/docs/src/pages/_app.mdx @@ -1,3 +1,3 @@ export default function App({ Component, pageProps }) { - return + return ; } diff --git a/docs/src/pages/api-reference/react.mdx b/docs/src/pages/api-reference/react.mdx index 8fff3808a7..6d73c453ca 100644 --- a/docs/src/pages/api-reference/react.mdx +++ b/docs/src/pages/api-reference/react.mdx @@ -4,6 +4,7 @@ ```tsx import { UploadButton } from "@uploadthing/react"; + import { OurFileRouter } from "./api/uploadthing/core"; export const OurUploadButton = () => ( @@ -35,6 +36,7 @@ export const OurUploadButton = () => ( ```tsx import { UploadButton } from "@uploadthing/react"; + import { OurFileRouter } from "./api/uploadthing/core"; export const OurUploadButton = () => ( @@ -67,6 +69,7 @@ The `generateReactHelpers` function is used to generate the useUploadThing hook ```tsx import { generateReactHelpers } from "@uploadthing/react"; + import type { OurFileRouter } from "~/app/api/uploadthing/core"; export const { useUploadThing, uploadFiles } = diff --git a/docs/src/pages/faq.mdx b/docs/src/pages/faq.mdx index f69dba9794..077e45c0b5 100644 --- a/docs/src/pages/faq.mdx +++ b/docs/src/pages/faq.mdx @@ -9,9 +9,10 @@ import "@uploadthing/react/styles.css"; ### Some of my other components look weird now... what's up with that? You may need to check the order of imports. Making sure that the uploadthing component styles are imported before others usually does the trick + ```tsx import "@uploadthing/react/styles.css"; -import '../styles/globals.css' +import "../styles/globals.css"; ``` ### When I upload files, I get the error `Failed to simulate callback for file. Is your webhook configured correctly?` diff --git a/docs/src/pages/nextjs/_meta.json b/docs/src/pages/nextjs/_meta.json index 325e853edd..d185698be4 100644 --- a/docs/src/pages/nextjs/_meta.json +++ b/docs/src/pages/nextjs/_meta.json @@ -1,4 +1,4 @@ { "appdir": "App Router (app/)", "pagedir": "Page Router (pages/)" -} \ No newline at end of file +} diff --git a/docs/src/pages/nextjs/appdir.mdx b/docs/src/pages/nextjs/appdir.mdx index ee3334ff0d..5a1851cf02 100644 --- a/docs/src/pages/nextjs/appdir.mdx +++ b/docs/src/pages/nextjs/appdir.mdx @@ -17,6 +17,7 @@ All files uploaded to uploadthing are associated with a FileRoute. Think of a Fi ```ts copy /** app/api/uploadthing/core.ts */ import { createUploadthing, type FileRouter } from "uploadthing/next"; + const f = createUploadthing(); const auth = (req: Request) => ({ id: "fakeId" }); // Fake auth function @@ -57,9 +58,10 @@ export type OurFileRouter = typeof ourFileRouter; ```ts copy /** app/api/uploadthing/route.ts */ -import { ourFileRouter } from "./core"; import { createNextRouteHandler } from "uploadthing/next"; +import { ourFileRouter } from "./core"; + // Export routes for Next App Router export const { GET, POST } = createNextRouteHandler({ router: ourFileRouter, @@ -77,6 +79,7 @@ The `@uploadthing/react` package includes an "UploadButton" component that you c import "@uploadthing/react/styles.css"; import { UploadButton } from "@uploadthing/react"; + import { OurFileRouter } from "./api/uploadthing/core"; export default function Home() { diff --git a/docs/src/pages/nextjs/pagedir.mdx b/docs/src/pages/nextjs/pagedir.mdx index a5a1c00cdd..7958ee39c5 100644 --- a/docs/src/pages/nextjs/pagedir.mdx +++ b/docs/src/pages/nextjs/pagedir.mdx @@ -34,6 +34,7 @@ All files uploaded to uploadthing are associated with a FileRoute. Think of a Fi ```ts copy /** server/uploadthing.ts */ import { createUploadthing, type FileRouter } from "uploadthing/next-legacy"; + const f = createUploadthing(); const auth = (req: NextApiRequest, res: NextApiResponse) => ({ id: "fakeId" }); // Fake auth function @@ -75,6 +76,7 @@ export type OurFileRouter = typeof ourFileRouter; ```ts copy /** pages/api/uploadthing.ts */ import { createNextPageApiHandler } from "uploadthing/next-legacy"; + import { ourFileRouter } from "~/server/uploadthing"; const handler = createNextPageApiHandler({ @@ -92,7 +94,6 @@ The `@uploadthing/react` package includes an "UploadButton" component that you c import { UploadButton } from "@uploadthing/react"; import type { OurFileRouter } from "~/server/uploadthing"; - // You need to import our styles for the button to look right. Best to import in the root /_app.tsx but this is fine import "@uploadthing/react/styles.css"; diff --git a/docs/src/pages/solid.mdx b/docs/src/pages/solid.mdx index 45e59e1d79..bd2788b54b 100644 --- a/docs/src/pages/solid.mdx +++ b/docs/src/pages/solid.mdx @@ -59,6 +59,7 @@ All files uploaded to uploadthing are associated with a FileRoute. Think of a Fi ```ts copy /** src/api/uploadthing/core.ts */ import { createUploadthing, type FileRouter } from "uploadthing"; + const f = createUploadthing(); const auth = (req: Request) => ({ id: "fakeId" }); // Fake auth function @@ -101,6 +102,7 @@ export type OurFileRouter = typeof ourFileRouter; ```ts copy /** src/api/uploadthing/index.ts */ import { createServerHandler } from "@uploadthing/solid"; + import { ourFileRouter } from "./core"; export const { GET, POST } = createServerHandler({ @@ -115,10 +117,13 @@ The `@uploadthing/solid` package includes an "Uploader" component that you can s ```tsx copy // You need to import our styles for the button to look right. Best to import in the root /layout.tsx but this is fine import "@uploadthing/solid/styles.css"; + import { type VoidComponent } from "solid-js"; -import type { OurFileRouter } from "./api/uploadthing/core"; + import { Uploader } from "@uploadthing/solid"; +import type { OurFileRouter } from "./api/uploadthing/core"; + const Home: VoidComponent = () => { return (
@@ -152,10 +157,13 @@ The `@uploadthing/solid` package includes an "Uploader" component that you can s ```tsx copy // You need to import our styles for the button to look right. Best to import in the root /layout.tsx but this is fine import "@uploadthing/solid/styles.css"; + import { type VoidComponent } from "solid-js"; -import type { OurFileRouter } from "./api/uploadthing/core"; + import { Uploader } from "@uploadthing/solid"; +import type { OurFileRouter } from "./api/uploadthing/core"; + const Home: VoidComponent = () => { return (
@@ -181,10 +189,13 @@ This is a SolidJS dropzone component that will be used to upload files when clic ```tsx copy // You need to import our styles for the button to look right. Best to import in the root /layout.tsx but this is fine import "@uploadthing/solid/styles.css"; + import { type VoidComponent } from "solid-js"; -import type { OurFileRouter } from "./api/uploadthing/core"; + import { UploadButton } from "@uploadthing/solid"; +import type { OurFileRouter } from "./api/uploadthing/core"; + const Home: VoidComponent = () => { return (
@@ -214,10 +225,13 @@ This is a SolidJS dropzone component that you can use to upload files, you can d ```tsx copy // You need to import our styles for the button to look right. Best to import in the root /layout.tsx but this is fine import "@uploadthing/solid/styles.css"; + import { type VoidComponent } from "solid-js"; -import type { OurFileRouter } from "./api/uploadthing/core"; + import { UploadDropzone } from "@uploadthing/solid"; +import type { OurFileRouter } from "./api/uploadthing/core"; + const Home: VoidComponent = () => { return (
diff --git a/docs/src/theme.config.js b/docs/src/theme.config.js index 75da42b8e2..42fe6b8051 100644 --- a/docs/src/theme.config.js +++ b/docs/src/theme.config.js @@ -1,5 +1,5 @@ -import { useConfig } from "nextra-theme-docs"; import { useRouter } from "next/router"; +import { useConfig } from "nextra-theme-docs"; const hackedCss = ` body { @@ -86,7 +86,7 @@ const Head = () => { export const Logo = () => { return (

- + {`upload`} {`thing`} docs @@ -95,7 +95,6 @@ export const Logo = () => { ); }; - /* eslint sort-keys: error */ /** * @type {import('nextra-theme-docs').DocsThemeConfig} diff --git a/examples/appdir/.vscode/settings.json b/examples/appdir/.vscode/settings.json index b0ef59cf95..99438ebd28 100644 --- a/examples/appdir/.vscode/settings.json +++ b/examples/appdir/.vscode/settings.json @@ -1,4 +1,4 @@ { "typescript.tsdk": "../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true -} \ No newline at end of file +} diff --git a/examples/appdir/next-env.d.ts b/examples/appdir/next-env.d.ts deleted file mode 100644 index 4f11a03dc6..0000000000 --- a/examples/appdir/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/examples/appdir/package.json b/examples/appdir/package.json index 4e2e02da9f..a07f2a7805 100644 --- a/examples/appdir/package.json +++ b/examples/appdir/package.json @@ -14,7 +14,7 @@ "@tanstack/react-query": "^4.28.0", "@uploadthing/react": "3.0.5", "autoprefixer": "10.4.14", - "next": "13.4.3", + "next": "13.4.4", "postcss": "8.4.22", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/examples/appdir/postcss.config.js b/examples/appdir/postcss.config.js index 33ad091d26..12a703d900 100644 --- a/examples/appdir/postcss.config.js +++ b/examples/appdir/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/examples/appdir/src/app/api/uploadthing/route.ts b/examples/appdir/src/app/api/uploadthing/route.ts index e0e0887ee0..5a99a4d37a 100644 --- a/examples/appdir/src/app/api/uploadthing/route.ts +++ b/examples/appdir/src/app/api/uploadthing/route.ts @@ -1,6 +1,7 @@ -import { uploadRouter } from "../../_uploadthing"; import { createNextRouteHandler } from "uploadthing/next"; +import { uploadRouter } from "~/server/uploadthing"; + export const { GET, POST } = createNextRouteHandler({ router: uploadRouter, }); diff --git a/examples/appdir/src/app/favicon.ico b/examples/appdir/src/app/favicon.ico deleted file mode 100644 index 4570eb8d92..0000000000 Binary files a/examples/appdir/src/app/favicon.ico and /dev/null differ diff --git a/examples/appdir/src/app/page.tsx b/examples/appdir/src/app/page.tsx index cc4817f0a8..a8b9a39e51 100644 --- a/examples/appdir/src/app/page.tsx +++ b/examples/appdir/src/app/page.tsx @@ -1,8 +1,10 @@ "use client"; import { Inter } from "next/font/google"; + import { UploadButton, UploadDropzone } from "@uploadthing/react"; -import type { OurFileRouter } from "./_uploadthing"; + +import type { OurFileRouter } from "~/server/uploadthing"; const inter = Inter({ subsets: ["latin"] }); @@ -10,7 +12,7 @@ export default function Home() { return (
- + {`Upload a file using a button:`} @@ -27,7 +29,7 @@ export default function Home() { />
- + {`...or using a dropzone:`} diff --git a/examples/appdir/src/app/pkg/page.tsx b/examples/appdir/src/app/pkg/page.tsx index 4e9a916729..259a48ee0c 100644 --- a/examples/appdir/src/app/pkg/page.tsx +++ b/examples/appdir/src/app/pkg/page.tsx @@ -1,5 +1,6 @@ import { UploadButton } from "@uploadthing/react"; -import { OurFileRouter } from "../_uploadthing"; + +import type { OurFileRouter } from "~/server/uploadthing"; export default function Home() { return ( diff --git a/examples/appdir/src/app/sink/page.tsx b/examples/appdir/src/app/sink/page.tsx index a2f3d42539..83ea7229d8 100644 --- a/examples/appdir/src/app/sink/page.tsx +++ b/examples/appdir/src/app/sink/page.tsx @@ -1,8 +1,10 @@ "use client"; import { Inter } from "next/font/google"; + import { UploadButton, UploadDropzone } from "@uploadthing/react"; -import type { OurFileRouter } from "../_uploadthing"; + +import type { OurFileRouter } from "~/server/uploadthing"; const inter = Inter({ subsets: ["latin"] }); @@ -35,7 +37,7 @@ export default function Home() {
- + {`...or using a dropzone:`} diff --git a/examples/appdir/src/app/_uploadthing/index.ts b/examples/appdir/src/server/uploadthing.ts similarity index 93% rename from examples/appdir/src/app/_uploadthing/index.ts rename to examples/appdir/src/server/uploadthing.ts index ace985292c..2023073ab4 100644 --- a/examples/appdir/src/app/_uploadthing/index.ts +++ b/examples/appdir/src/server/uploadthing.ts @@ -1,4 +1,5 @@ -import { createUploadthing, type FileRouter } from "uploadthing/next"; +import { createUploadthing } from "uploadthing/next"; +import type { FileRouter } from "uploadthing/next"; const f = createUploadthing(); diff --git a/examples/appdir/tailwind.config.js b/examples/appdir/tailwind.config.js index fba2ad6d29..e6c2d4cff0 100644 --- a/examples/appdir/tailwind.config.js +++ b/examples/appdir/tailwind.config.js @@ -1,18 +1,18 @@ /** @type {import('tailwindcss').Config} */ module.exports = { content: [ - './src/pages/**/*.{js,ts,jsx,tsx}', - './src/components/**/*.{js,ts,jsx,tsx}', - './src/app/**/*.{js,ts,jsx,tsx}', + "./src/pages/**/*.{js,ts,jsx,tsx}", + "./src/components/**/*.{js,ts,jsx,tsx}", + "./src/app/**/*.{js,ts,jsx,tsx}", ], theme: { extend: { backgroundImage: { - 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', - 'gradient-conic': - 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", }, }, }, plugins: [], -} +}; diff --git a/examples/appdir/tsconfig.json b/examples/appdir/tsconfig.json index 7ffca0970d..80d227d2f0 100644 --- a/examples/appdir/tsconfig.json +++ b/examples/appdir/tsconfig.json @@ -1,7 +1,11 @@ { "extends": "@uploadthing/tsconfig/nextjs.json", - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - - "compilerOptions": { "plugins": [{ "name": "next" }] }, - "exclude": ["node_modules"] + "compilerOptions": { + "plugins": [{ "name": "next" }], + "baseUrl": ".", + "paths": { + "~/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"] } diff --git a/examples/pagedir/next-env.d.ts b/examples/pagedir/next-env.d.ts deleted file mode 100644 index 4f11a03dc6..0000000000 --- a/examples/pagedir/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/examples/pagedir/package.json b/examples/pagedir/package.json index 50950f4e1f..f25669d4a8 100644 --- a/examples/pagedir/package.json +++ b/examples/pagedir/package.json @@ -14,7 +14,7 @@ "@tanstack/react-query": "^4.28.0", "@uploadthing/react": "3.0.5", "autoprefixer": "10.4.14", - "next": "13.4.3", + "next": "13.4.4", "next-auth": "^4.22.1", "postcss": "8.4.22", "react": "18.2.0", diff --git a/examples/pagedir/postcss.config.js b/examples/pagedir/postcss.config.js index 33ad091d26..12a703d900 100644 --- a/examples/pagedir/postcss.config.js +++ b/examples/pagedir/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/examples/pagedir/public/favicon.ico b/examples/pagedir/public/favicon.ico deleted file mode 100644 index 4570eb8d92..0000000000 Binary files a/examples/pagedir/public/favicon.ico and /dev/null differ diff --git a/examples/pagedir/public/next.svg b/examples/pagedir/public/next.svg deleted file mode 100644 index 5174b28c56..0000000000 --- a/examples/pagedir/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/pagedir/public/vercel.svg b/examples/pagedir/public/vercel.svg deleted file mode 100644 index d2f8422273..0000000000 --- a/examples/pagedir/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/pagedir/src/pages/_app.tsx b/examples/pagedir/src/pages/_app.tsx index 665a2a54a8..a47f7d37c5 100644 --- a/examples/pagedir/src/pages/_app.tsx +++ b/examples/pagedir/src/pages/_app.tsx @@ -1,5 +1,6 @@ import "~/styles/globals.css"; import "@uploadthing/react/styles.css"; + import type { AppProps } from "next/app"; export default function App({ Component, pageProps }: AppProps) { diff --git a/examples/pagedir/src/pages/_document.tsx b/examples/pagedir/src/pages/_document.tsx deleted file mode 100644 index 54e8bf3e2a..0000000000 --- a/examples/pagedir/src/pages/_document.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Html, Head, Main, NextScript } from 'next/document' - -export default function Document() { - return ( - - - -
- - - - ) -} diff --git a/examples/pagedir/src/pages/api/auth/[...nextauth].ts b/examples/pagedir/src/pages/api/auth/[...nextauth].ts index 94ab55bfdc..4748ad5884 100644 --- a/examples/pagedir/src/pages/api/auth/[...nextauth].ts +++ b/examples/pagedir/src/pages/api/auth/[...nextauth].ts @@ -1,4 +1,5 @@ -import NextAuth, { NextAuthOptions } from "next-auth"; +import type { NextAuthOptions } from "next-auth"; +import NextAuth from "next-auth"; import GithubProvider from "next-auth/providers/github"; export const options = { diff --git a/examples/pagedir/src/pages/api/hello.ts b/examples/pagedir/src/pages/api/hello.ts index 74a3605dbb..ea77e8f35b 100644 --- a/examples/pagedir/src/pages/api/hello.ts +++ b/examples/pagedir/src/pages/api/hello.ts @@ -7,7 +7,7 @@ type Data = { export default function handler( req: NextApiRequest, - res: NextApiResponse + res: NextApiResponse, ) { res.status(200).json({ name: "John Doe" }); } diff --git a/examples/pagedir/src/pages/api/uploadthing.ts b/examples/pagedir/src/pages/api/uploadthing.ts index f3c5c17f5e..777af81bc4 100644 --- a/examples/pagedir/src/pages/api/uploadthing.ts +++ b/examples/pagedir/src/pages/api/uploadthing.ts @@ -1,6 +1,7 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction import { createNextPageApiHandler } from "uploadthing/next-legacy"; -import { uploadRouter } from "~/server/uploadthing/router"; + +import { uploadRouter } from "~/server/uploadthing"; const handler = createNextPageApiHandler({ router: uploadRouter, diff --git a/examples/pagedir/src/pages/index.tsx b/examples/pagedir/src/pages/index.tsx index 50f7315258..aaaa3405c5 100644 --- a/examples/pagedir/src/pages/index.tsx +++ b/examples/pagedir/src/pages/index.tsx @@ -1,7 +1,8 @@ import { Inter } from "next/font/google"; + import { UploadButton, UploadDropzone } from "@uploadthing/react"; -import type { OurFileRouter } from "~/server/uploadthing/router"; +import type { OurFileRouter } from "~/server/uploadthing"; const inter = Inter({ subsets: ["latin"] }); @@ -11,7 +12,7 @@ export default function Home() { className={`flex min-h-screen flex-col items-center justify-center gap-16 p-24 ${inter.className}`} >
- + {`Upload a file using a button:`} @@ -28,7 +29,7 @@ export default function Home() { />
- + {`...or using a dropzone:`} diff --git a/examples/pagedir/src/server/uploadthing/router.ts b/examples/pagedir/src/server/uploadthing.ts similarity index 88% rename from examples/pagedir/src/server/uploadthing/router.ts rename to examples/pagedir/src/server/uploadthing.ts index 83da0cdbe9..27d1416a79 100644 --- a/examples/pagedir/src/server/uploadthing/router.ts +++ b/examples/pagedir/src/server/uploadthing.ts @@ -1,5 +1,8 @@ import { getServerSession } from "next-auth"; -import { createUploadthing, type FileRouter } from "uploadthing/next-legacy"; + +import { createUploadthing } from "uploadthing/next-legacy"; +import type { FileRouter } from "uploadthing/next-legacy"; + import { options } from "~/pages/api/auth/[...nextauth]"; const f = createUploadthing(); @@ -21,7 +24,7 @@ export const uploadRouter = { console.log( `${metadata.userEmail ?? ""} successfully uploaded file:`, - file + file, ); file; // ^? diff --git a/examples/pagedir/static/media/favicon.8ec7e746.ico b/examples/pagedir/static/media/favicon.8ec7e746.ico deleted file mode 100644 index 4570eb8d92..0000000000 Binary files a/examples/pagedir/static/media/favicon.8ec7e746.ico and /dev/null differ diff --git a/examples/pagedir/tailwind.config.js b/examples/pagedir/tailwind.config.js index fba2ad6d29..e6c2d4cff0 100644 --- a/examples/pagedir/tailwind.config.js +++ b/examples/pagedir/tailwind.config.js @@ -1,18 +1,18 @@ /** @type {import('tailwindcss').Config} */ module.exports = { content: [ - './src/pages/**/*.{js,ts,jsx,tsx}', - './src/components/**/*.{js,ts,jsx,tsx}', - './src/app/**/*.{js,ts,jsx,tsx}', + "./src/pages/**/*.{js,ts,jsx,tsx}", + "./src/components/**/*.{js,ts,jsx,tsx}", + "./src/app/**/*.{js,ts,jsx,tsx}", ], theme: { extend: { backgroundImage: { - 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', - 'gradient-conic': - 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", }, }, }, plugins: [], -} +}; diff --git a/examples/pagedir/tsconfig.json b/examples/pagedir/tsconfig.json index 9da516cf82..80d227d2f0 100644 --- a/examples/pagedir/tsconfig.json +++ b/examples/pagedir/tsconfig.json @@ -1,7 +1,5 @@ { "extends": "@uploadthing/tsconfig/nextjs.json", - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "compilerOptions": { "plugins": [{ "name": "next" }], "baseUrl": ".", @@ -9,5 +7,5 @@ "~/*": ["./src/*"] } }, - "exclude": ["node_modules"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"] } diff --git a/examples/solid/.eslintrc.json b/examples/solid/.eslintrc.json deleted file mode 100644 index 80d4f31c67..0000000000 --- a/examples/solid/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint"], - "extends": [ - "plugin:solid/typescript", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "@typescript-eslint/consistent-type-imports": "warn" - } -} diff --git a/examples/solid/package.json b/examples/solid/package.json index 71e7411bc9..2f4dfed52b 100644 --- a/examples/solid/package.json +++ b/examples/solid/package.json @@ -5,7 +5,7 @@ "dev": "solid-start dev --port 9898", "start": "solid-start start --port 9898", "build": "solid-start build", - "lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\"" + "lint": "eslint \"**/*.{ts,tsx}\"" }, "type": "module", "devDependencies": { @@ -37,5 +37,10 @@ }, "engines": { "node": ">=16" + }, + "eslintConfig": { + "extends": [ + "plugin:solid/typescript" + ] } } diff --git a/examples/solid/postcss.config.cjs b/examples/solid/postcss.config.cjs index 63889e769e..12a703d900 100644 --- a/examples/solid/postcss.config.cjs +++ b/examples/solid/postcss.config.cjs @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; \ No newline at end of file + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/examples/solid/src/entry-server.tsx b/examples/solid/src/entry-server.tsx index 11c445b05d..26c6438c7f 100644 --- a/examples/solid/src/entry-server.tsx +++ b/examples/solid/src/entry-server.tsx @@ -1,9 +1,9 @@ import { - StartServer, createHandler, renderAsync, + StartServer, } from "solid-start/entry-server"; export default createHandler( - renderAsync((event) => ) + renderAsync((event) => ), ); diff --git a/examples/solid/src/root.tsx b/examples/solid/src/root.tsx index 8c35d80471..d42766b36f 100644 --- a/examples/solid/src/root.tsx +++ b/examples/solid/src/root.tsx @@ -1,5 +1,6 @@ // @refresh reload import "./root.css"; + import { Suspense } from "solid-js"; import { Body, @@ -7,11 +8,11 @@ import { FileRoutes, Head, Html, + Link, Meta, Routes, Scripts, Title, - Link, } from "solid-start"; export default function Root() { diff --git a/examples/solid/src/routes/api/uploadthing/core.ts b/examples/solid/src/routes/api/uploadthing/core.ts index a2395851eb..143114b412 100644 --- a/examples/solid/src/routes/api/uploadthing/core.ts +++ b/examples/solid/src/routes/api/uploadthing/core.ts @@ -1,30 +1,38 @@ -import { createUploadthing, type FileRouter } from "uploadthing/server"; +import { createUploadthing } from "uploadthing/server"; +import type { FileRouter } from "uploadthing/server"; + const f = createUploadthing(); -const auth = (req: Request) => ({ id: "fakeId" }); // Fake auth function +const auth = (req: Request) => Promise.resolve({ id: "fakeId" }); // Fake auth function // FileRouter for your app, can contain multiple FileRoutes export const ourFileRouter = { // Define as many FileRoutes as you like, each with a unique routeSlug - imageUploader: f - // Set permissions and file types for this FileRoute - .fileTypes(["image", "video"]) - .maxSize("1GB") + withMdwr: f({ + image: { + maxFileCount: 2, + maxFileSize: "1MB", + }, + }) .middleware(async (req) => { - // This code runs on your server before upload - const user = await auth(req); - - // If you throw, the user will not be able to upload - if (!user) throw new Error("Unauthorized"); + const h = req.headers.get("someProperty"); + const authed = await auth(req); - // Whatever is returned here is accessible in onUploadComplete as `metadata` - return { userId: user.id }; + return { + someProperty: h, + userId: authed.id, + }; }) - .onUploadComplete(async ({ metadata, file }) => { - // This code RUNS ON YOUR SERVER after upload - console.log("Upload complete for userId:", metadata.userId); + .onUploadComplete(({ metadata, file }) => { + console.log("uploaded with the following metadata:", metadata); + metadata.someProperty; + // ^? + metadata.userId; + // ^? - console.log("file url", file.url); + console.log("files successfully uploaded:", file); + file; + // ^? }), } satisfies FileRouter; diff --git a/examples/solid/src/routes/api/uploadthing/index.ts b/examples/solid/src/routes/api/uploadthing/index.ts index 017f46993d..163f335c3e 100644 --- a/examples/solid/src/routes/api/uploadthing/index.ts +++ b/examples/solid/src/routes/api/uploadthing/index.ts @@ -1,4 +1,5 @@ import { createServerHandler } from "@uploadthing/solid"; + import { ourFileRouter } from "./core"; export const { GET, POST } = createServerHandler({ diff --git a/examples/solid/src/routes/index.tsx b/examples/solid/src/routes/index.tsx index 01f78c3ae6..eafc64224a 100644 --- a/examples/solid/src/routes/index.tsx +++ b/examples/solid/src/routes/index.tsx @@ -1,13 +1,16 @@ -import { type VoidComponent } from "solid-js"; -import type { OurFileRouter } from "./api/uploadthing/core"; +import type { VoidComponent } from "solid-js"; + import { Uploader } from "@uploadthing/solid"; + +import type { OurFileRouter } from "./api/uploadthing/core"; + import "@uploadthing/solid/styles.css"; const Home: VoidComponent = () => { return (
- endpoint="imageUploader" + endpoint="withMdwr" // needed when server side rendering url="http://localhost:9898" onClientUploadComplete={(res) => { diff --git a/package.json b/package.json index 9045447f84..3255201377 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "build": "turbo run build", "clean": "turbo run clean && git clean -xdf node_modules", "dev": "turbo run dev", - "lint": "turbo run lint --filter=./packages/* && manypkg check", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "lint": "turbo run lint && manypkg check", + "format": "prettier --write . --ignore-path .gitignore", "test": "turbo run test", "test:watch": "turbo run test:watch", "typecheck": "turbo run typecheck" @@ -18,12 +18,14 @@ "dependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.1", + "@ianvs/prettier-plugin-sort-imports": "^4.0.0", "@manypkg/cli": "^0.20.0", "@types/node": "18.16.0", "@uploadthing/eslint-config": "0.1.0", "dotenv": "latest", - "prettier": "latest", - "turbo": "^1.9.3", + "prettier": "^2.8.8", + "prettier-plugin-tailwindcss": "^0.3.0", + "turbo": "^1.9.9", "typescript": "5.1.0-beta" }, "packageManager": "pnpm@8.5.1" diff --git a/common/eslint-config-custom/index.js b/packages/config/eslint/index.js similarity index 51% rename from common/eslint-config-custom/index.js rename to packages/config/eslint/index.js index cc5b31fe4a..8c622f2e96 100644 --- a/common/eslint-config-custom/index.js +++ b/packages/config/eslint/index.js @@ -4,39 +4,58 @@ const config = { "next", "turbo", "prettier", - "plugin:react/recommended", - "plugin:react-hooks/recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", ], parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "react", "react-hooks"], + plugins: ["@typescript-eslint", "import"], rules: { "@next/next/no-html-link-for-pages": "off", "turbo/no-undeclared-env-vars": "off", - "react/react-in-jsx-scope": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/restrict-template-expressions": "off", - // restricts so you can't use {} as type. me no likey "@typescript-eslint/ban-types": "off", + // type imports should be imported as types + "@typescript-eslint/consistent-type-imports": [ + "error", + { + prefer: "type-imports", + fixStyle: "separate-type-imports", + disallowTypeAnnotations: false, + }, + ], + "import/consistent-type-specifier-style": ["error", "prefer-top-level"], }, + overrides: [ + { + files: ["packages/react/**", "examples/appdir/**", "examples/pagedir/**"], + plugins: ["react", "react-hooks"], + extends: ["plugin:react/recommended", "plugin:react-hooks/recommended"], + rules: { + "react/react-in-jsx-scope": "off", + }, + settings: { + react: { + version: "detect", + }, + }, + }, + ], parserOptions: { ecmaFeatures: { jsx: true, }, }, - settings: { - react: { - version: "detect", - }, - }, ignorePatterns: [ "**/*.config.js", "**/*.config.cjs", ".eslintrc.cjs", - "common/**", + "packages/config/**", + "**/dist/**", + "**/.next/**", + "**/.solid/**", ], reportUnusedDisableDirectives: true, }; diff --git a/common/eslint-config-custom/package.json b/packages/config/eslint/package.json similarity index 93% rename from common/eslint-config-custom/package.json rename to packages/config/eslint/package.json index 43468dff68..c71f218542 100644 --- a/common/eslint-config-custom/package.json +++ b/packages/config/eslint/package.json @@ -11,6 +11,7 @@ "eslint-config-next": "13.4.1", "eslint-config-prettier": "^8.8.0", "eslint-config-turbo": "^1.9.3", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-react": "7.32.2" }, "devDependencies": { diff --git a/common/tsconfig/README.md b/packages/config/tsconfig/README.md similarity index 100% rename from common/tsconfig/README.md rename to packages/config/tsconfig/README.md diff --git a/common/tsconfig/base.json b/packages/config/tsconfig/base.json similarity index 100% rename from common/tsconfig/base.json rename to packages/config/tsconfig/base.json diff --git a/common/tsconfig/nextjs.json b/packages/config/tsconfig/nextjs.json similarity index 100% rename from common/tsconfig/nextjs.json rename to packages/config/tsconfig/nextjs.json diff --git a/common/tsconfig/package.json b/packages/config/tsconfig/package.json similarity index 100% rename from common/tsconfig/package.json rename to packages/config/tsconfig/package.json diff --git a/common/tsconfig/react-library.json b/packages/config/tsconfig/react-library.json similarity index 100% rename from common/tsconfig/react-library.json rename to packages/config/tsconfig/react-library.json diff --git a/packages/config/tsup/index.d.ts b/packages/config/tsup/index.d.ts new file mode 100644 index 0000000000..33a1611153 --- /dev/null +++ b/packages/config/tsup/index.d.ts @@ -0,0 +1,4 @@ +declare module "@uploadthing/tsup-config" { + import { Options } from "tsup"; + export const config: Options; +} diff --git a/packages/config/tsup/index.js b/packages/config/tsup/index.js new file mode 100644 index 0000000000..a4fbdc31ea --- /dev/null +++ b/packages/config/tsup/index.js @@ -0,0 +1,22 @@ +const { execSync } = require("child_process"); + +/** @type {import("tsup").Options} */ +const config = { + splitting: false, + sourcemap: true, + dts: true, + format: ["esm"], + ignoreWatch: [ + "**/.turbo", + "**/dist", + "**/node_modules", + "**/.DS_STORE", + "**/.git", + ], + async onSuccess() { + // emit sourcemap to enable jump to definition + execSync("pnpm tsc --project tsconfig.sourcemap.json"); + }, +}; + +module.exports = { config }; diff --git a/packages/config/tsup/package.json b/packages/config/tsup/package.json new file mode 100644 index 0000000000..35257e1267 --- /dev/null +++ b/packages/config/tsup/package.json @@ -0,0 +1,11 @@ +{ + "name": "@uploadthing/tsup-config", + "version": "0.1.0", + "private": true, + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "@types/node": "18.16.0", + "tsup": "6.7.0" + } +} diff --git a/packages/react/README.md b/packages/react/README.md index 5788c1c0fa..c7a074b642 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -9,6 +9,7 @@ Learn more: [docs.uploadthing.com](https://docs.uploadthing.com) ```tsx // Name is temp import { UploadButton } from "@uploadthing/react"; + import type { FileRouter } from "./someUploadRouter"; export const SomePage = () => { @@ -33,7 +34,8 @@ export const SomePage = () => { ```tsx // Name is temp -import { UploadProvider, UploadZone, UploadFileView } from "@uploadthing/react"; +import { UploadFileView, UploadProvider, UploadZone } from "@uploadthing/react"; + import type { FileRouter } from "./someUploadRouter"; export const SomePage = () => { diff --git a/packages/react/package.json b/packages/react/package.json index 2b26647c28..066e0b0d25 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -44,6 +44,8 @@ "@types/react": "18.2.0", "@types/react-dom": "18.0.11", "@uploadthing/eslint-config": "0.1.0", + "@uploadthing/tsconfig": "0.1.0", + "@uploadthing/tsup-config": "0.1.0", "autoprefixer": "10.4.14", "eslint": "^8.40.0", "postcss": "8.4.22", diff --git a/packages/react/postcss.config.js b/packages/react/postcss.config.js index 33ad091d26..12a703d900 100644 --- a/packages/react/postcss.config.js +++ b/packages/react/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/packages/react/src/client-generator.test.ts b/packages/react/src/client-generator.test.ts index 65316173cb..01d20a2a14 100644 --- a/packages/react/src/client-generator.test.ts +++ b/packages/react/src/client-generator.test.ts @@ -1,6 +1,7 @@ -import { createUploadthing } from "uploadthing/server"; import { it } from "vitest"; +import { createUploadthing } from "uploadthing/server"; + import { generateReactHelpers } from "./useUploadThing"; const badReqMock = { diff --git a/packages/react/src/component.tsx b/packages/react/src/component.tsx index 6e39046f27..f955687a75 100644 --- a/packages/react/src/component.tsx +++ b/packages/react/src/component.tsx @@ -1,13 +1,16 @@ import { useCallback, useState } from "react"; -import { FileWithPath, useDropzone } from "react-dropzone"; +import type { FileWithPath } from "react-dropzone"; +import { useDropzone } from "react-dropzone"; + import { classNames, generateClientDropzoneAccept, generateMimeTypes, } from "uploadthing/client"; -import { useUploadThing } from "./useUploadThing"; -import type { FileRouter, ExpandedRouteConfig } from "uploadthing/server"; import type { DANGEROUS__uploadFiles } from "uploadthing/client"; +import type { ExpandedRouteConfig, FileRouter } from "uploadthing/server"; + +import { useUploadThing } from "./useUploadThing"; type EndpointHelper = void extends TRouter ? "YOU FORGOT TO PASS THE GENERIC" @@ -55,7 +58,7 @@ const INTERNAL_doFormatting = (config?: ExpandedRouteConfig): string => { }; const allowedContentTextLabelGenerator = ( - config?: ExpandedRouteConfig + config?: ExpandedRouteConfig, ): string => { return capitalizeStart(INTERNAL_doFormatting(config)); }; @@ -71,7 +74,7 @@ const allowedContentTextLabelGenerator = ( export function UploadButton(props: { endpoint: EndpointHelper; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (error: Error) => void; }) { @@ -83,7 +86,7 @@ export function UploadButton(props: { }); const { fileTypes, multiple } = generatePermittedFileTypes( - permittedFileInfo?.config + permittedFileInfo?.config, ); return ( @@ -131,11 +134,11 @@ const Spinner = () => { }; export const UploadDropzone = < - TRouter extends void | FileRouter = void + TRouter extends void | FileRouter = void, >(props: { endpoint: EndpointHelper; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (error: Error) => void; }) => { @@ -162,7 +165,7 @@ export const UploadDropzone = <
@@ -228,13 +231,13 @@ export const Uploader = (props: { return ( <>
- + {`Upload a file using a button:`} {...props} />
- + {`...or using a dropzone:`} {...props} /> diff --git a/packages/react/src/useUploadThing.ts b/packages/react/src/useUploadThing.ts index 8fa82ef903..f75cabb5cc 100644 --- a/packages/react/src/useUploadThing.ts +++ b/packages/react/src/useUploadThing.ts @@ -1,6 +1,7 @@ import { useState } from "react"; -import type { FileRouter, ExpandedRouteConfig } from "uploadthing/server"; + import { DANGEROUS__uploadFiles } from "uploadthing/client"; +import type { ExpandedRouteConfig, FileRouter } from "uploadthing/server"; import { useEvent } from "./utils/useEvent"; import useFetch from "./utils/useFetch"; @@ -24,7 +25,7 @@ export const useUploadThing = ({ }: { endpoint: T; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (e: Error) => void; }) => { diff --git a/packages/react/src/utils/useEvent.ts b/packages/react/src/utils/useEvent.ts index 7ee6cefd93..97bb633ead 100644 --- a/packages/react/src/utils/useEvent.ts +++ b/packages/react/src/utils/useEvent.ts @@ -20,11 +20,11 @@ const useInsertionEffect = * - Properties or state accessed within the callback will always be "current" */ export function useEvent( - callback: TCallback + callback: TCallback, ): TCallback { // Keep track of the latest callback: const latestRef = React.useRef( - useEvent_shouldNotBeInvokedBeforeMount as any + useEvent_shouldNotBeInvokedBeforeMount as any, ); useInsertionEffect(() => { latestRef.current = callback; @@ -48,6 +48,6 @@ export function useEvent( */ function useEvent_shouldNotBeInvokedBeforeMount() { throw new Error( - "INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted." + "INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.", ); } diff --git a/packages/react/tsconfig.sourcemap.json b/packages/react/tsconfig.sourcemap.json new file mode 100644 index 0000000000..77086e9996 --- /dev/null +++ b/packages/react/tsconfig.sourcemap.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "declarationDir": "dist" + }, + "exclude": ["tsup.config.ts"] +} diff --git a/packages/react/tsup.config.ts b/packages/react/tsup.config.ts index 25447f3034..57f08d4486 100644 --- a/packages/react/tsup.config.ts +++ b/packages/react/tsup.config.ts @@ -1,12 +1,11 @@ import { defineConfig } from "tsup"; +import { config } from "@uploadthing/tsup-config"; + export default defineConfig((opts) => ({ + ...config, entry: ["./index.ts", "./hooks.ts"], - splitting: false, - sourcemap: true, clean: !opts.watch, - dts: true, - format: ["esm"], esbuildOptions: (option) => { option.banner = { js: `"use client";`, diff --git a/packages/react/vitest.config.ts b/packages/react/vitest.config.ts index 6cb835cca7..c4c3977c10 100644 --- a/packages/react/vitest.config.ts +++ b/packages/react/vitest.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from "vitest/config"; import { join } from "path"; +import { defineConfig } from "vitest/config"; export default defineConfig({ test: {}, diff --git a/packages/solid/package.json b/packages/solid/package.json index 97dc7ab33d..fded294bba 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -80,6 +80,7 @@ "sideEffects": false, "scripts": { "build": "rm -rf dist && tsup --config ./tsup.config.js", + "lint": "eslint \"**/*.{ts,tsx}\"", "typecheck": "tsc --noEmit" }, "devDependencies": { diff --git a/packages/solid/postcss.config.cjs b/packages/solid/postcss.config.cjs index 33ad091d26..12a703d900 100644 --- a/packages/solid/postcss.config.cjs +++ b/packages/solid/postcss.config.cjs @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/packages/solid/src/component.tsx b/packages/solid/src/component.tsx index 6bd62a68bd..d6001dd305 100644 --- a/packages/solid/src/component.tsx +++ b/packages/solid/src/component.tsx @@ -1,15 +1,17 @@ /* eslint-disable react-hooks/rules-of-hooks */ -/* eslint-disable react/no-unknown-property */ -import type { FileRouter } from "uploadthing/server"; -import { useUploadThing } from "./useUploadThing"; import { createSignal } from "solid-js"; -import { OnDropHandler, createDropzone } from "solidjs-dropzone"; +import type { OnDropHandler } from "solidjs-dropzone"; +import { createDropzone } from "solidjs-dropzone"; + import { classNames, generateClientDropzoneAccept, generateMimeTypes, } from "uploadthing/client"; import type { DANGEROUS__uploadFiles } from "uploadthing/client"; +import type { FileRouter } from "uploadthing/server"; + +import { useUploadThing } from "./useUploadThing"; export type EndpointHelper = void extends TRouter ? "YOU FORGOT TO PASS THE GENERIC" : keyof TRouter; @@ -24,7 +26,7 @@ export type EndpointHelper = export function UploadButton(props: { endpoint: EndpointHelper; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (error: Error) => void; url?: string; @@ -48,7 +50,7 @@ export function UploadButton(props: { type="file" multiple={props.multiple} accept={generateMimeTypes( - uploadedThing.permittedFileInfo()?.fileTypes ?? [] + uploadedThing.permittedFileInfo()?.fileTypes ?? [], )?.join(", ")} onChange={(e) => { if (!e.target.files) return; @@ -77,11 +79,11 @@ export function UploadButton(props: { } export const UploadDropzone = < - TRouter extends void | FileRouter = void + TRouter extends void | FileRouter = void, >(props: { endpoint: EndpointHelper; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (error: Error) => void; url?: string; @@ -105,7 +107,7 @@ export const UploadDropzone = < onDrop, accept: uploadedThing.permittedFileInfo()?.fileTypes ? generateClientDropzoneAccept( - uploadedThing.permittedFileInfo()?.fileTypes ?? [] + uploadedThing.permittedFileInfo()?.fileTypes ?? [], ) : undefined, useFsAccessApi: true, @@ -115,7 +117,7 @@ export const UploadDropzone = <
@@ -179,7 +181,7 @@ export const UploadDropzone = < export const Uploader = (props: { endpoint: EndpointHelper; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (error: Error) => void; url?: string; @@ -197,7 +199,7 @@ export const Uploader = (props: { return ( <>
- + {`Upload a file using a button:`} @@ -207,7 +209,7 @@ export const Uploader = (props: { />
- + {`...or using a dropzone:`} {...props} uploadedThing={uploadedThing} /> diff --git a/packages/solid/src/index.tsx b/packages/solid/src/index.tsx index 74bfa6bcec..e0de21461b 100644 --- a/packages/solid/src/index.tsx +++ b/packages/solid/src/index.tsx @@ -1,7 +1,9 @@ import "../styles.css"; + +import { createNextRouteHandler } from "uploadthing/next"; + export * from "./useUploadThing"; export * from "./component"; -import { createNextRouteHandler } from "uploadthing/next"; export const createServerHandler = ( ...args: Parameters diff --git a/packages/solid/src/useUploadThing.ts b/packages/solid/src/useUploadThing.ts index 33861b2682..fb9fe810ee 100644 --- a/packages/solid/src/useUploadThing.ts +++ b/packages/solid/src/useUploadThing.ts @@ -1,6 +1,8 @@ -import type { FileRouter } from "uploadthing/server"; -import { DANGEROUS__uploadFiles } from "uploadthing/client"; import { createSignal } from "solid-js"; + +import { DANGEROUS__uploadFiles } from "uploadthing/client"; +import type { FileRouter } from "uploadthing/server"; + import { createFetch } from "./utils/createFetch"; type EndpointMetadata = { @@ -11,7 +13,7 @@ type EndpointMetadata = { const createEndpointMetadata = (endpoint: string, url?: string) => { const dataGetter = createFetch( - `${url ?? ""}/api/uploadthing` + `${url ?? ""}/api/uploadthing`, ); return () => dataGetter()?.data?.find((x) => x.slug === endpoint); }; @@ -24,7 +26,7 @@ export const useUploadThing = ({ }: { endpoint: T; onClientUploadComplete?: ( - res?: Awaited> + res?: Awaited>, ) => void; onUploadError?: (e: Error) => void; url?: string; diff --git a/packages/solid/src/utils/createFetch.ts b/packages/solid/src/utils/createFetch.ts index 1fc19d023c..fca1c84e04 100644 --- a/packages/solid/src/utils/createFetch.ts +++ b/packages/solid/src/utils/createFetch.ts @@ -1,4 +1,5 @@ -import { Resource, createResource } from "solid-js"; +import type { Resource } from "solid-js"; +import { createResource } from "solid-js"; interface State { data?: T; @@ -9,7 +10,7 @@ interface State { type Cache = { [url: string]: T }; export function createFetch(url?: string, options?: RequestInit) { - const cache: Cache = {}; + const cache: Cache = {}; const [res] = createResource(async () => { if (!url) return { diff --git a/packages/solid/tsup.config.js b/packages/solid/tsup.config.js index 327e6747e9..598f2cb643 100644 --- a/packages/solid/tsup.config.js +++ b/packages/solid/tsup.config.js @@ -13,5 +13,5 @@ export default defineConfig( writePackageJson: false, dropConsole: false, cjs: true, - } + }, ); diff --git a/packages/uploadthing/client.ts b/packages/uploadthing/client.ts index f87346ddfe..48714f8e21 100644 --- a/packages/uploadthing/client.ts +++ b/packages/uploadthing/client.ts @@ -14,7 +14,7 @@ export const DANGEROUS__uploadFiles = async ( endpoint: T, config?: { url?: string; - } + }, ) => { // Get presigned URL for S3 upload const s3ConnectionRes = await fetch( @@ -24,7 +24,7 @@ export const DANGEROUS__uploadFiles = async ( body: JSON.stringify({ files: files.map((f) => f.name), }), - } + }, ).then((res) => { // check for 200 response if (!res.ok) throw new Error("Failed to get presigned URLs"); @@ -98,7 +98,7 @@ export const DANGEROUS__uploadFiles = async ( export type UploadFileType = typeof DANGEROUS__uploadFiles; export const genUploader = < - TRouter extends FileRouter + TRouter extends FileRouter, >(): typeof DANGEROUS__uploadFiles< keyof TRouter extends string ? keyof TRouter : string > => { @@ -111,7 +111,7 @@ export const classNames = (...classes: string[]) => { export const generateMimeTypes = (fileTypes: string[]) => { const accepted = fileTypes.map((type) => - type !== "blob" ? `${type}/*` : "blob" + type !== "blob" ? `${type}/*` : "blob", ); if (accepted.includes("blob")) { diff --git a/packages/uploadthing/next-legacy.ts b/packages/uploadthing/next-legacy.ts index 01d218a2b4..5b8896db40 100644 --- a/packages/uploadthing/next-legacy.ts +++ b/packages/uploadthing/next-legacy.ts @@ -1,5 +1,6 @@ +import { createBuilder } from "./src/upload-builder"; + export { createNextPageApiHandler } from "./src/next/core/page"; export type { FileRouter } from "./src/types"; -import { createBuilder } from "./src/upload-builder"; export const createUploadthing = () => createBuilder<"pages">(); diff --git a/packages/uploadthing/next.ts b/packages/uploadthing/next.ts index 840c888f46..a2c7b7901d 100644 --- a/packages/uploadthing/next.ts +++ b/packages/uploadthing/next.ts @@ -1,5 +1,6 @@ +import { createBuilder } from "./src/upload-builder"; + export { createNextRouteHandler } from "./src/next/core/approuter"; export type { FileRouter } from "./src/types"; -import { createBuilder } from "./src/upload-builder"; export const createUploadthing = () => createBuilder<"app">(); diff --git a/packages/uploadthing/package.json b/packages/uploadthing/package.json index 8ac4d1aadb..26e3813cdb 100644 --- a/packages/uploadthing/package.json +++ b/packages/uploadthing/package.json @@ -33,7 +33,7 @@ } }, "scripts": { - "lint": "eslint *.ts* --max-warnings 0", + "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", "build": "tsup", "prebuild": "tsup", "clean": "git clean -xdf dist node_modules", @@ -49,8 +49,10 @@ "@types/mime-types": "2.1.1", "@types/node": "18.16.0", "@uploadthing/eslint-config": "0.1.0", + "@uploadthing/tsconfig": "0.1.0", + "@uploadthing/tsup-config": "0.1.0", "eslint": "^8.40.0", - "next": "13.4.3", + "next": "13.4.4", "tsup": "6.7.0", "type-fest": "^3.11.0", "typescript": "5.1.0-beta", diff --git a/packages/uploadthing/server.ts b/packages/uploadthing/server.ts index 0c4958dd57..fa3ab18962 100644 --- a/packages/uploadthing/server.ts +++ b/packages/uploadthing/server.ts @@ -1,4 +1,5 @@ import { createBuilder } from "./src/upload-builder"; + export * from "./src/types"; export * as utapi from "./src/helper-functions"; diff --git a/packages/uploadthing/src/internal/handler.ts b/packages/uploadthing/src/internal/handler.ts index 526ae5ed6e..284417c609 100644 --- a/packages/uploadthing/src/internal/handler.ts +++ b/packages/uploadthing/src/internal/handler.ts @@ -1,3 +1,5 @@ +import type { NextApiResponse } from "next"; + import { UPLOADTHING_VERSION } from "../constants"; import type { AllowedFileType, @@ -6,12 +8,11 @@ import type { FileRouter, UploadedFile, } from "../types"; -import type { NextApiResponse } from "next"; -import type { FileData } from "./types"; import { getTypeFromFileName, fillInputRouteConfig as parseAndExpandInputConfig, } from "../utils"; +import type { FileData } from "./types"; const UNITS = ["B", "KB", "MB", "GB"] as const; type SizeUnit = (typeof UNITS)[number]; @@ -36,7 +37,7 @@ export const fileSizeToBytes = (input: string) => { const fileCountLimitHit = ( files: string[], - routeConfig: ExpandedRouteConfig + routeConfig: ExpandedRouteConfig, ) => { const counts: Record = { image: 0, @@ -48,7 +49,7 @@ const fileCountLimitHit = ( files.forEach((file) => { const type = getTypeFromFileName( file, - Object.keys(routeConfig) as AllowedFileType[] + Object.keys(routeConfig) as AllowedFileType[], ); counts[type] += 1; }); @@ -87,7 +88,7 @@ const isValidResponse = (response: Response) => { const withExponentialBackoff = async ( doTheThing: () => Promise, MAXIMUM_BACKOFF_MS = 64 * 1000, - MAX_RETRIES = 20 + MAX_RETRIES = 20, ): Promise => { let tries = 0; let backoffMs = 500; @@ -105,8 +106,8 @@ const withExponentialBackoff = async ( if (tries > 3) { console.error( `[UT] Call unsuccessful after ${tries} tries. Retrying in ${Math.floor( - backoffMs / 1000 - )} seconds...` + backoffMs / 1000, + )} seconds...`, ); } @@ -156,7 +157,7 @@ const conditionalDevServer = async (fileKey: string) => { } else { console.error( "[UT] Failed to simulate callback for file. Is your webhook configured correctly?", - fileKey + fileKey, ); } return file; @@ -198,9 +199,9 @@ export type RouterWithConfig = { export const buildRequestHandler = < TRouter extends FileRouter, - TRuntime extends AnyRuntime + TRuntime extends AnyRuntime, >( - opts: RouterWithConfig + opts: RouterWithConfig, ) => { return async (input: { uploadthingHook?: string; @@ -218,7 +219,7 @@ export const buildRequestHandler = < if (!preferredOrEnvSecret) { throw new Error( - `Please set your preferred secret in ${slug} router's config or set UPLOADTHING_SECRET in your env file` + `Please set your preferred secret in ${slug} router's config or set UPLOADTHING_SECRET in your env file`, ); } @@ -262,7 +263,7 @@ export const buildRequestHandler = < // FILL THE ROUTE CONFIG so the server only has one happy path const parsedConfig = parseAndExpandInputConfig( - uploadable._def.routerConfig + uploadable._def.routerConfig, ); const limitHit = fileCountLimitHit(files, parsedConfig); @@ -287,7 +288,7 @@ export const buildRequestHandler = < "x-uploadthing-api-key": preferredOrEnvSecret, "x-uploadthing-version": UPLOADTHING_VERSION, }, - } + }, ); if (!uploadthingApiResponse.ok) { @@ -325,7 +326,7 @@ export const buildRequestHandler = < }; export const buildPermissionsInfoHandler = ( - opts: RouterWithConfig + opts: RouterWithConfig, ) => { return () => { const r = opts.router; diff --git a/packages/uploadthing/src/next/core/approuter.ts b/packages/uploadthing/src/next/core/approuter.ts index ebc1d8b66d..2d803c7d3b 100644 --- a/packages/uploadthing/src/next/core/approuter.ts +++ b/packages/uploadthing/src/next/core/approuter.ts @@ -1,13 +1,13 @@ import { UPLOADTHING_VERSION } from "../../constants"; +import type { RouterWithConfig } from "../../internal/handler"; import { - RouterWithConfig, buildPermissionsInfoHandler, buildRequestHandler, } from "../../internal/handler"; import type { FileRouter } from "../../types"; export const createNextRouteHandler = ( - opts: RouterWithConfig + opts: RouterWithConfig, ) => { const requestHandler = buildRequestHandler(opts); diff --git a/packages/uploadthing/src/next/core/page.ts b/packages/uploadthing/src/next/core/page.ts index 16bf2c57ed..4a76f23b11 100644 --- a/packages/uploadthing/src/next/core/page.ts +++ b/packages/uploadthing/src/next/core/page.ts @@ -1,14 +1,15 @@ +import type { NextApiRequest, NextApiResponse } from "next"; + import { UPLOADTHING_VERSION } from "../../constants"; +import type { RouterWithConfig } from "../../internal/handler"; import { - RouterWithConfig, buildPermissionsInfoHandler, buildRequestHandler, } from "../../internal/handler"; import type { FileRouter } from "../../types"; -import type { NextApiRequest, NextApiResponse } from "next"; export const createNextPageApiHandler = ( - opts: RouterWithConfig + opts: RouterWithConfig, ) => { const requestHandler = buildRequestHandler(opts); diff --git a/packages/uploadthing/src/types.ts b/packages/uploadthing/src/types.ts index fea620cf24..4ae7988996 100644 --- a/packages/uploadthing/src/types.ts +++ b/packages/uploadthing/src/types.ts @@ -1,5 +1,5 @@ import type { NextApiRequest, NextApiResponse } from "next"; -import { NextRequest } from "next/server"; +import type { NextRequest } from "next/server"; // Utils export const unsetMarker = "unsetMarker" as "unsetMarker" & { @@ -60,12 +60,12 @@ type MiddlewareFnArgs = TRuntime extends "web" type MiddlewareFn< TOutput extends Record, - TRuntime extends string + TRuntime extends string, > = MiddlewareFnArgs["res"] extends never ? (req: MiddlewareFnArgs["req"]) => MaybePromise : ( req: MiddlewareFnArgs["req"], - res: MiddlewareFnArgs["res"] + res: MiddlewareFnArgs["res"], ) => MaybePromise; export type ReqMiddlewareFn> = @@ -76,12 +76,12 @@ export type NextApiMiddlewareFn> = MiddlewareFn; type ResolverFn = ( - opts: ResolverOptions + opts: ResolverOptions, ) => MaybePromise; export interface UploadBuilder { middleware: >( - fn: MiddlewareFn + fn: MiddlewareFn, ) => UploadBuilder<{ _metadata: TOutput; _runtime: TParams["_runtime"]; diff --git a/packages/uploadthing/src/upload-builder.test.ts b/packages/uploadthing/src/upload-builder.test.ts index 8edf494228..c5cbe27b79 100644 --- a/packages/uploadthing/src/upload-builder.test.ts +++ b/packages/uploadthing/src/upload-builder.test.ts @@ -1,11 +1,12 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import type { NextApiRequest, NextApiResponse } from "next"; +import type { NextRequest } from "next/server"; +import { expect, expectTypeOf, it } from "vitest"; + import { genUploader } from "../client"; import type { FileRouter } from "./types"; import { createBuilder } from "./upload-builder"; -import { expect, it, expectTypeOf } from "vitest"; -import { NextRequest } from "next/server"; const badReqMock = { headers: { @@ -60,7 +61,7 @@ it("uses defaults for not-chained", async () => { it("passes `Request` by default", () => { const f = createBuilder(); - f(["image"]).middleware(async (req) => { + f(["image"]).middleware((req) => { expectTypeOf(req).toMatchTypeOf(); return {}; @@ -70,9 +71,8 @@ it("passes `Request` by default", () => { it("allows async middleware", () => { const f = createBuilder(); - // eslint-disable-next-line @typescript-eslint/require-await f(["image"]) - .middleware(async (req) => { + .middleware((req) => { expectTypeOf(req).toMatchTypeOf(); return { foo: "bar" } as const; @@ -85,7 +85,7 @@ it("allows async middleware", () => { it("passes `NextRequest` for /app", () => { const f = createBuilder<"app">(); - f(["image"]).middleware(async (req) => { + f(["image"]).middleware((req) => { expectTypeOf(req).toMatchTypeOf(); return { nextUrl: req.nextUrl }; }); @@ -94,7 +94,7 @@ it("passes `NextRequest` for /app", () => { it("passes `res` for /pages", () => { const f = createBuilder<"pages">(); - f(["image"]).middleware(async (req, res) => { + f(["image"]).middleware((req, res) => { expectTypeOf(req).toMatchTypeOf(); expectTypeOf(res).toMatchTypeOf(); @@ -106,7 +106,7 @@ it("smoke", async () => { const f = createBuilder(); const uploadable = f(["image", "video"]) - .middleware(async (req) => { + .middleware((req) => { const header1 = req.headers.get("header1"); return { header1, userId: "123" as const }; @@ -131,7 +131,7 @@ it("smoke", async () => { it("genuploader", async () => { const f = createBuilder(); const uploadable = f(["image", "video"]).onUploadComplete( - ({ file, metadata }) => {} + ({ file, metadata }) => {}, ); const router = { uploadable } satisfies FileRouter; diff --git a/packages/uploadthing/src/upload-builder.ts b/packages/uploadthing/src/upload-builder.ts index 53dd8ce249..0ee203cebe 100644 --- a/packages/uploadthing/src/upload-builder.ts +++ b/packages/uploadthing/src/upload-builder.ts @@ -1,14 +1,14 @@ import type { + AnyRuntime, + FileRouterInputConfig, UnsetMarker, UploadBuilder, UploadBuilderDef, Uploader, - AnyRuntime, - FileRouterInputConfig, } from "./types"; function internalCreateBuilder( - initDef: Partial> = {} + initDef: Partial> = {}, ): UploadBuilder<{ _metadata: UnsetMarker; _runtime: TRuntime; @@ -44,14 +44,14 @@ function internalCreateBuilder( } type InOut = ( - input: FileRouterInputConfig + input: FileRouterInputConfig, ) => UploadBuilder<{ _metadata: UnsetMarker; _runtime: TRuntime; }>; export function createBuilder< - TRuntime extends AnyRuntime = "web" + TRuntime extends AnyRuntime = "web", >(): InOut { return (input: FileRouterInputConfig) => { return internalCreateBuilder({ routerConfig: input }); diff --git a/packages/uploadthing/src/utils.ts b/packages/uploadthing/src/utils.ts index 6dc136e38c..a24bbf96cc 100644 --- a/packages/uploadthing/src/utils.ts +++ b/packages/uploadthing/src/utils.ts @@ -1,12 +1,14 @@ -import { - FileRouterInputConfig, +import { lookup } from "mime-types"; + +import type { AllowedFileType, ExpandedRouteConfig, + FileRouterInputConfig, FileSize, } from "./types"; function isRouteArray( - routeConfig: FileRouterInputConfig + routeConfig: FileRouterInputConfig, ): routeConfig is AllowedFileType[] { return Array.isArray(routeConfig); } @@ -29,7 +31,7 @@ const getDefaultSizeForType = (fileType: AllowedFileType): FileSize => { * ``` */ export const fillInputRouteConfig = ( - routeConfig: FileRouterInputConfig + routeConfig: FileRouterInputConfig, ): ExpandedRouteConfig => { // If array, apply defaults if (isRouteArray(routeConfig)) { @@ -60,16 +62,14 @@ export const fillInputRouteConfig = ( return newConfig; }; -import { lookup } from "mime-types"; - export const getTypeFromFileName = ( fileName: string, - allowedTypes: AllowedFileType[] + allowedTypes: AllowedFileType[], ) => { const mimeType = lookup(fileName); if (!mimeType) { throw new Error( - `Could not determine type for ${fileName}, presigned URL generation failed` + `Could not determine type for ${fileName}, presigned URL generation failed`, ); } diff --git a/packages/uploadthing/tsconfig.sourcemap.json b/packages/uploadthing/tsconfig.sourcemap.json new file mode 100644 index 0000000000..77086e9996 --- /dev/null +++ b/packages/uploadthing/tsconfig.sourcemap.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "declarationDir": "dist" + }, + "exclude": ["tsup.config.ts"] +} diff --git a/packages/uploadthing/tsup.config.ts b/packages/uploadthing/tsup.config.ts index 7d4fd68a08..1df2e3d7b3 100644 --- a/packages/uploadthing/tsup.config.ts +++ b/packages/uploadthing/tsup.config.ts @@ -1,17 +1,9 @@ import { defineConfig } from "tsup"; +import { config } from "@uploadthing/tsup-config"; + export default defineConfig((opts) => ({ + ...config, entry: ["./client.ts", "./server.ts", "./next.ts", "./next-legacy.ts"], - splitting: false, - sourcemap: true, clean: !opts.watch, - dts: true, - format: ["esm"], - ignoreWatch: [ - "**/.turbo", - "**/dist", - "**/node_modules", - "**/.DS_STORE", - "**/.git", - ], })); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e96f2f59e9..c0f1a309d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,9 @@ importers: '@changesets/cli': specifier: ^2.26.1 version: 2.26.1 + '@ianvs/prettier-plugin-sort-imports': + specifier: ^4.0.0 + version: 4.0.0(prettier@2.8.8) '@manypkg/cli': specifier: ^0.20.0 version: 0.20.0 @@ -18,64 +21,34 @@ importers: version: 18.16.0 '@uploadthing/eslint-config': specifier: 0.1.0 - version: link:common/eslint-config-custom + version: link:packages/config/eslint dotenv: specifier: latest version: 16.0.3 prettier: - specifier: latest + specifier: ^2.8.8 version: 2.8.8 + prettier-plugin-tailwindcss: + specifier: ^0.3.0 + version: 0.3.0(@ianvs/prettier-plugin-sort-imports@4.0.0)(prettier@2.8.8) turbo: - specifier: ^1.9.3 - version: 1.9.3 + specifier: ^1.9.9 + version: 1.9.9 typescript: specifier: 5.1.0-beta version: 5.1.0-beta - common/eslint-config-custom: - dependencies: - '@types/eslint': - specifier: ^8.37.0 - version: 8.37.0 - '@typescript-eslint/eslint-plugin': - specifier: ^5.59.2 - version: 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.1.0-beta) - '@typescript-eslint/parser': - specifier: ^5.59.2 - version: 5.59.2(eslint@8.40.0)(typescript@5.1.0-beta) - eslint-config-next: - specifier: 13.4.1 - version: 13.4.1(eslint@8.40.0)(typescript@5.1.0-beta) - eslint-config-prettier: - specifier: ^8.8.0 - version: 8.8.0(eslint@8.40.0) - eslint-config-turbo: - specifier: ^1.9.3 - version: 1.9.3(eslint@8.40.0) - eslint-plugin-react: - specifier: 7.32.2 - version: 7.32.2(eslint@8.40.0) - devDependencies: - eslint: - specifier: ^8.40.0 - version: 8.40.0 - typescript: - specifier: 5.1.0-beta - version: 5.1.0-beta - - common/tsconfig: {} - docs: dependencies: next: - specifier: 13.4.3 - version: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + specifier: 13.4.4 + version: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) nextra: specifier: ^2.6.0 - version: 2.6.0(next@13.4.3)(react-dom@18.2.0)(react@18.2.0) + version: 2.6.0(next@13.4.4)(react-dom@18.2.0)(react@18.2.0) nextra-theme-docs: specifier: ^2.6.0 - version: 2.6.0(next@13.4.3)(nextra@2.6.0)(react-dom@18.2.0)(react@18.2.0) + version: 2.6.0(next@13.4.4)(nextra@2.6.0)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -95,8 +68,8 @@ importers: specifier: 10.4.14 version: 10.4.14(postcss@8.4.22) next: - specifier: 13.4.3 - version: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + specifier: 13.4.4 + version: 13.4.4(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) postcss: specifier: 8.4.22 version: 8.4.22 @@ -133,10 +106,10 @@ importers: version: 18.0.11 '@uploadthing/eslint-config': specifier: 0.1.0 - version: link:../../common/eslint-config-custom + version: link:../../packages/config/eslint '@uploadthing/tsconfig': specifier: 0.1.0 - version: link:../../common/tsconfig + version: link:../../packages/config/tsconfig eslint: specifier: ^8.40.0 version: 8.40.0 @@ -156,11 +129,11 @@ importers: specifier: 10.4.14 version: 10.4.14(postcss@8.4.22) next: - specifier: 13.4.3 - version: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + specifier: 13.4.4 + version: 13.4.4(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) next-auth: specifier: ^4.22.1 - version: 4.22.1(next@13.4.3)(react-dom@18.2.0)(react@18.2.0) + version: 4.22.1(next@13.4.4)(react-dom@18.2.0)(react@18.2.0) postcss: specifier: 8.4.22 version: 8.4.22 @@ -197,10 +170,10 @@ importers: version: 18.0.11 '@uploadthing/eslint-config': specifier: 0.1.0 - version: link:../../common/eslint-config-custom + version: link:../../packages/config/eslint '@uploadthing/tsconfig': specifier: 0.1.0 - version: link:../../common/tsconfig + version: link:../../packages/config/tsconfig eslint: specifier: ^8.40.0 version: 8.40.0 @@ -281,6 +254,51 @@ importers: specifier: ^4.1.2 version: 4.2.1(@types/node@18.16.0) + packages/config/eslint: + dependencies: + '@types/eslint': + specifier: ^8.37.0 + version: 8.37.0 + '@typescript-eslint/eslint-plugin': + specifier: ^5.59.2 + version: 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.1.0-beta) + '@typescript-eslint/parser': + specifier: ^5.59.2 + version: 5.59.2(eslint@8.40.0)(typescript@5.1.0-beta) + eslint-config-next: + specifier: 13.4.1 + version: 13.4.1(eslint@8.40.0)(typescript@5.1.0-beta) + eslint-config-prettier: + specifier: ^8.8.0 + version: 8.8.0(eslint@8.40.0) + eslint-config-turbo: + specifier: ^1.9.3 + version: 1.9.3(eslint@8.40.0) + eslint-plugin-import: + specifier: ^2.27.5 + version: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) + eslint-plugin-react: + specifier: 7.32.2 + version: 7.32.2(eslint@8.40.0) + devDependencies: + eslint: + specifier: ^8.40.0 + version: 8.40.0 + typescript: + specifier: 5.1.0-beta + version: 5.1.0-beta + + packages/config/tsconfig: {} + + packages/config/tsup: + devDependencies: + '@types/node': + specifier: 18.16.0 + version: 18.16.0 + tsup: + specifier: 6.7.0 + version: 6.7.0(postcss@8.4.22)(typescript@5.1.0-beta) + packages/react: devDependencies: '@tailwindcss/forms': @@ -297,7 +315,13 @@ importers: version: 18.0.11 '@uploadthing/eslint-config': specifier: 0.1.0 - version: link:../../common/eslint-config-custom + version: link:../config/eslint + '@uploadthing/tsconfig': + specifier: 0.1.0 + version: link:../config/tsconfig + '@uploadthing/tsup-config': + specifier: 0.1.0 + version: link:../config/tsup autoprefixer: specifier: 10.4.14 version: 10.4.14(postcss@8.4.22) @@ -379,13 +403,19 @@ importers: version: 18.16.0 '@uploadthing/eslint-config': specifier: 0.1.0 - version: link:../../common/eslint-config-custom + version: link:../config/eslint + '@uploadthing/tsconfig': + specifier: 0.1.0 + version: link:../config/tsconfig + '@uploadthing/tsup-config': + specifier: 0.1.0 + version: link:../config/tsup eslint: specifier: ^8.40.0 version: 8.40.0 next: - specifier: 13.4.3 - version: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + specifier: 13.4.4 + version: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) tsup: specifier: 6.7.0 version: 6.7.0(postcss@8.4.22)(typescript@5.1.0-beta) @@ -431,8 +461,8 @@ packages: resolution: {integrity: sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==} engines: {node: '>=6.9.0'} - /@babel/compat-data@7.21.7: - resolution: {integrity: sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==} + /@babel/compat-data@7.22.0: + resolution: {integrity: sha512-OgCMbbNCD/iA8cjMt+Zhp+nIC7XKaEaTG8zjvZPjGbhkppq1NIMWiZn7EaZRxUDHn4Ul265scRqg94N2WiFaGw==} engines: {node: '>=6.9.0'} /@babel/core@7.21.3: @@ -457,6 +487,28 @@ packages: transitivePeerDependencies: - supports-color + /@babel/core@7.22.1: + resolution: {integrity: sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.0 + '@babel/code-frame': 7.21.4 + '@babel/generator': 7.22.0 + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.22.1) + '@babel/helper-module-transforms': 7.22.1 + '@babel/helpers': 7.22.0 + '@babel/parser': 7.22.0 + '@babel/template': 7.21.9 + '@babel/traverse': 7.22.1 + '@babel/types': 7.22.0 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + /@babel/generator@7.21.3: resolution: {integrity: sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==} engines: {node: '>=6.9.0'} @@ -474,18 +526,28 @@ packages: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.17 jsesc: 2.5.2 + dev: false + + /@babel/generator@7.22.0: + resolution: {integrity: sha512-tyzR0OsH88AelgukhL2rbEUCLKBGmy2G9Th/5vpyOt0zf44Be61kvIQXjCwTSX8t+qJ/vMwZfhK6mPdrMLZXRg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.0 + '@jridgewell/gen-mapping': 0.3.2 + '@jridgewell/trace-mapping': 0.3.17 + jsesc: 2.5.2 /@babel/helper-annotate-as-pure@7.18.6: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-builder-binary-assignment-operator-visitor@7.21.5: resolution: {integrity: sha512-uNrjKztPLkUk7bpCNC0jEKDJzzkvel/W+HguzbN8krA+LPfC1CEobJEvAvGka2A/M+ViOqXdcRL0GqPUJSjx9g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-compilation-targets@7.20.7(@babel/core@7.21.3): resolution: {integrity: sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==} @@ -500,19 +562,32 @@ packages: lru-cache: 5.1.1 semver: 6.3.0 - /@babel/helper-compilation-targets@7.21.5(@babel/core@7.21.3): - resolution: {integrity: sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==} + /@babel/helper-compilation-targets@7.22.1(@babel/core@7.21.3): + resolution: {integrity: sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.21.7 + '@babel/compat-data': 7.22.0 '@babel/core': 7.21.3 '@babel/helper-validator-option': 7.21.0 browserslist: 4.21.5 lru-cache: 5.1.1 semver: 6.3.0 + /@babel/helper-compilation-targets@7.22.1(@babel/core@7.22.1): + resolution: {integrity: sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.22.0 + '@babel/core': 7.22.1 + '@babel/helper-validator-option': 7.21.0 + browserslist: 4.21.5 + lru-cache: 5.1.1 + semver: 6.3.0 + /@babel/helper-create-class-features-plugin@7.21.8(@babel/core@7.21.3): resolution: {integrity: sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw==} engines: {node: '>=6.9.0'} @@ -521,7 +596,26 @@ packages: dependencies: '@babel/core': 7.21.3 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.1 + '@babel/helper-function-name': 7.21.0 + '@babel/helper-member-expression-to-functions': 7.21.5 + '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-replace-supers': 7.21.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-split-export-declaration': 7.18.6 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + + /@babel/helper-create-class-features-plugin@7.21.8(@babel/core@7.22.1): + resolution: {integrity: sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-function-name': 7.21.0 '@babel/helper-member-expression-to-functions': 7.21.5 '@babel/helper-optimise-call-expression': 7.18.6 @@ -549,7 +643,7 @@ packages: '@babel/core': ^7.4.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.3) + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.3) '@babel/helper-plugin-utils': 7.21.5 debug: 4.3.4 lodash.debounce: 4.0.8 @@ -565,37 +659,42 @@ packages: /@babel/helper-environment-visitor@7.21.5: resolution: {integrity: sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==} engines: {node: '>=6.9.0'} + dev: false + + /@babel/helper-environment-visitor@7.22.1: + resolution: {integrity: sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==} + engines: {node: '>=6.9.0'} /@babel/helper-function-name@7.21.0: resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.21.3 + '@babel/template': 7.21.9 + '@babel/types': 7.22.0 /@babel/helper-hoist-variables@7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.3 + '@babel/types': 7.22.0 /@babel/helper-member-expression-to-functions@7.21.5: resolution: {integrity: sha512-nIcGfgwpH2u4n9GG1HpStW5Ogx7x7ekiFHbjjFRKXbn5zUvqO9ZgotCO4x1aNbKn/x/xOUaXEhyNHCwtFCpxWg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-module-imports@7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.3 + '@babel/types': 7.22.0 /@babel/helper-module-imports@7.21.4: resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-module-transforms@7.21.2: resolution: {integrity: sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==} @@ -612,18 +711,18 @@ packages: transitivePeerDependencies: - supports-color - /@babel/helper-module-transforms@7.21.5: - resolution: {integrity: sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==} + /@babel/helper-module-transforms@7.22.1: + resolution: {integrity: sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-module-imports': 7.21.4 '@babel/helper-simple-access': 7.21.5 '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.5 - '@babel/types': 7.21.5 + '@babel/template': 7.21.9 + '@babel/traverse': 7.22.1 + '@babel/types': 7.22.0 transitivePeerDependencies: - supports-color @@ -631,7 +730,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-plugin-utils@7.21.5: resolution: {integrity: sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==} @@ -645,9 +744,9 @@ packages: dependencies: '@babel/core': 7.21.3 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-wrap-function': 7.20.5 - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 transitivePeerDependencies: - supports-color @@ -655,12 +754,12 @@ packages: resolution: {integrity: sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-member-expression-to-functions': 7.21.5 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.5 - '@babel/types': 7.21.5 + '@babel/template': 7.21.9 + '@babel/traverse': 7.22.1 + '@babel/types': 7.22.0 transitivePeerDependencies: - supports-color @@ -668,25 +767,25 @@ packages: resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.3 + '@babel/types': 7.22.0 /@babel/helper-simple-access@7.21.5: resolution: {integrity: sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-skip-transparent-expression-wrappers@7.20.0: resolution: {integrity: sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@babel/helper-split-export-declaration@7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.3 + '@babel/types': 7.22.0 /@babel/helper-string-parser@7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} @@ -709,9 +808,9 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.21.0 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.3 - '@babel/types': 7.21.5 + '@babel/template': 7.21.9 + '@babel/traverse': 7.22.1 + '@babel/types': 7.22.0 transitivePeerDependencies: - supports-color @@ -725,6 +824,16 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helpers@7.22.0: + resolution: {integrity: sha512-I/hZCYErxdjuUnJpJxHmCESB3AdcOAFjj+K6+of9JyWBeAhggR9NQoUHI481pRNH87cx77mbpx0cygzXlvGayA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.21.9 + '@babel/traverse': 7.22.1 + '@babel/types': 7.22.0 + transitivePeerDependencies: + - supports-color + /@babel/highlight@7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} @@ -746,6 +855,14 @@ packages: hasBin: true dependencies: '@babel/types': 7.21.5 + dev: false + + /@babel/parser@7.22.0: + resolution: {integrity: sha512-DA65VCJRetcFmJnt9/hEmRvXNCwk0V86dxG6p6N13hzDazaLRjGdTGPGgjxZOtLuFgWzOSRX4grybmRXwQ9bSg==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.22.0 /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.21.3): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} @@ -774,7 +891,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.21.3) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.3) @@ -872,9 +989,9 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.21.7 + '@babel/compat-data': 7.22.0 '@babel/core': 7.21.3 - '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.3) + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.3) '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.3) '@babel/plugin-transform-parameters': 7.21.3(@babel/core@7.21.3) @@ -1011,6 +1128,15 @@ packages: '@babel/core': 7.21.3 '@babel/helper-plugin-utils': 7.21.5 + /@babel/plugin-syntax-jsx@7.21.4(@babel/core@7.22.1): + resolution: {integrity: sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-plugin-utils': 7.21.5 + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.21.3): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -1086,6 +1212,15 @@ packages: '@babel/core': 7.21.3 '@babel/helper-plugin-utils': 7.21.5 + /@babel/plugin-syntax-typescript@7.21.4(@babel/core@7.22.1): + resolution: {integrity: sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-plugin-utils': 7.21.5 + /@babel/plugin-transform-arrow-functions@7.21.5(@babel/core@7.21.3): resolution: {integrity: sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA==} engines: {node: '>=6.9.0'} @@ -1102,7 +1237,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-module-imports': 7.18.6 + '@babel/helper-module-imports': 7.21.4 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.21.3) transitivePeerDependencies: @@ -1134,8 +1269,8 @@ packages: dependencies: '@babel/core': 7.21.3 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.3) - '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.3) + '@babel/helper-environment-visitor': 7.22.1 '@babel/helper-function-name': 7.21.0 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-plugin-utils': 7.21.5 @@ -1153,7 +1288,7 @@ packages: dependencies: '@babel/core': 7.21.3 '@babel/helper-plugin-utils': 7.21.5 - '@babel/template': 7.20.7 + '@babel/template': 7.21.9 /@babel/plugin-transform-destructuring@7.21.3(@babel/core@7.21.3): resolution: {integrity: sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA==} @@ -1209,7 +1344,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.3) + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.3) '@babel/helper-function-name': 7.21.0 '@babel/helper-plugin-utils': 7.21.5 @@ -1238,7 +1373,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-module-transforms': 7.21.2 + '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 transitivePeerDependencies: - supports-color @@ -1250,7 +1385,20 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-module-transforms': 7.21.5 + '@babel/helper-module-transforms': 7.22.1 + '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-simple-access': 7.21.5 + transitivePeerDependencies: + - supports-color + + /@babel/plugin-transform-modules-commonjs@7.21.5(@babel/core@7.22.1): + resolution: {integrity: sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-simple-access': 7.21.5 transitivePeerDependencies: @@ -1264,7 +1412,7 @@ packages: dependencies: '@babel/core': 7.21.3 '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-module-transforms': 7.21.2 + '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-validator-identifier': 7.19.1 transitivePeerDependencies: @@ -1277,7 +1425,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.3 - '@babel/helper-module-transforms': 7.21.2 + '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 transitivePeerDependencies: - supports-color @@ -1410,6 +1558,20 @@ packages: transitivePeerDependencies: - supports-color + /@babel/plugin-transform-typescript@7.21.3(@babel/core@7.22.1): + resolution: {integrity: sha512-RQxPz6Iqt8T0uw/WsJNReuBpWpBqs/n7mNo18sKLoTbMp+UrEekhH+pKSVC7gWz+DNjo9gryfV8YzCiT45RgMw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.1) + '@babel/helper-plugin-utils': 7.21.5 + '@babel/plugin-syntax-typescript': 7.21.4(@babel/core@7.22.1) + transitivePeerDependencies: + - supports-color + /@babel/plugin-transform-unicode-escapes@7.21.5(@babel/core@7.21.3): resolution: {integrity: sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg==} engines: {node: '>=6.9.0'} @@ -1435,9 +1597,9 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.21.7 + '@babel/compat-data': 7.22.0 '@babel/core': 7.21.3 - '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.3) + '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.3) '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-validator-option': 7.21.0 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6(@babel/core@7.21.3) @@ -1506,7 +1668,7 @@ packages: '@babel/plugin-transform-unicode-escapes': 7.21.5(@babel/core@7.21.3) '@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.21.3) '@babel/preset-modules': 0.1.5(@babel/core@7.21.3) - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.3) babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.3) babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.3) @@ -1524,7 +1686,7 @@ packages: '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.3) '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.21.3) - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 esutils: 2.0.3 /@babel/preset-typescript@7.21.5(@babel/core@7.21.3): @@ -1542,6 +1704,21 @@ packages: transitivePeerDependencies: - supports-color + /@babel/preset-typescript@7.21.5(@babel/core@7.22.1): + resolution: {integrity: sha512-iqe3sETat5EOrORXiQ6rWfoOg2y68Cs75B9wNxdPW4kixJxh7aXQE1KPdWLDniC24T/6dSnguF33W9j/ZZQcmA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.1 + '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-validator-option': 7.21.0 + '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.1) + '@babel/plugin-transform-modules-commonjs': 7.21.5(@babel/core@7.22.1) + '@babel/plugin-transform-typescript': 7.21.3(@babel/core@7.22.1) + transitivePeerDependencies: + - supports-color + /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} @@ -1559,6 +1736,14 @@ packages: '@babel/parser': 7.21.3 '@babel/types': 7.21.3 + /@babel/template@7.21.9: + resolution: {integrity: sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.21.4 + '@babel/parser': 7.22.0 + '@babel/types': 7.22.0 + /@babel/traverse@7.21.3: resolution: {integrity: sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==} engines: {node: '>=6.9.0'} @@ -1592,6 +1777,24 @@ packages: globals: 11.12.0 transitivePeerDependencies: - supports-color + dev: false + + /@babel/traverse@7.22.1: + resolution: {integrity: sha512-lAWkdCoUFnmwLBhIRLciFntGYsIIoC6vIbN8zrLPqBnJmPu7Z6nzqnKd7FsxQUNAvZfVZ0x6KdNvNp8zWIOHSQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.21.4 + '@babel/generator': 7.22.0 + '@babel/helper-environment-visitor': 7.22.1 + '@babel/helper-function-name': 7.21.0 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.22.0 + '@babel/types': 7.22.0 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color /@babel/types@7.21.3: resolution: {integrity: sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==} @@ -1608,6 +1811,15 @@ packages: '@babel/helper-string-parser': 7.21.5 '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 + dev: false + + /@babel/types@7.22.0: + resolution: {integrity: sha512-NtXlm3f6cNWIv003cETdlz9sss0VMNtplyatFohxWPz90AbwuhCbHbQopkGis6bG1vOunDLN0FF/4Uv5i8LFZQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.21.5 + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 /@changesets/apply-release-plan@6.1.3: resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} @@ -2234,6 +2446,26 @@ packages: /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@ianvs/prettier-plugin-sort-imports@4.0.0(prettier@2.8.8): + resolution: {integrity: sha512-56wYZhq/Ezt5o4Lzc+CEUV+sqTPEV2WcTFJSSLBOhe15yfIkrUheGeRvC3lg30VQ8K0J1kvWjXIY5lxeOlW2Tg==} + peerDependencies: + '@vue/compiler-sfc': '>=3.0.0' + prettier: 2.x + peerDependenciesMeta: + '@vue/compiler-sfc': + optional: true + dependencies: + '@babel/core': 7.22.1 + '@babel/generator': 7.21.5 + '@babel/parser': 7.21.8 + '@babel/traverse': 7.21.5 + '@babel/types': 7.21.5 + prettier: 2.8.8 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color + dev: false + /@jridgewell/gen-mapping@0.1.1: resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} engines: {node: '>=6.0.0'} @@ -2490,8 +2722,8 @@ packages: '@napi-rs/simple-git-win32-x64-msvc': 0.1.8 dev: false - /@next/env@13.4.3: - resolution: {integrity: sha512-pa1ErjyFensznttAk3EIv77vFbfSYT6cLzVRK5jx4uiRuCQo+m2wCFAREaHKIy63dlgvOyMlzh6R8Inu8H3KrQ==} + /@next/env@13.4.4: + resolution: {integrity: sha512-q/y7VZj/9YpgzDe64Zi6rY1xPizx80JjlU2BTevlajtaE3w1LqweH1gGgxou2N7hdFosXHjGrI4OUvtFXXhGLg==} /@next/eslint-plugin-next@13.4.1: resolution: {integrity: sha512-tVPS/2FKlA3ANCRCYZVT5jdbUKasBU8LG6bYqcNhyORDFTlDYa4cAWQJjZ7msIgLwMQIbL8CAsxrOL8maa/4Lg==} @@ -2499,72 +2731,72 @@ packages: glob: 7.1.7 dev: false - /@next/swc-darwin-arm64@13.4.3: - resolution: {integrity: sha512-yx18udH/ZmR4Bw4M6lIIPE3JxsAZwo04iaucEfA2GMt1unXr2iodHUX/LAKNyi6xoLP2ghi0E+Xi1f4Qb8f1LQ==} + /@next/swc-darwin-arm64@13.4.4: + resolution: {integrity: sha512-xfjgXvp4KalNUKZMHmsFxr1Ug+aGmmO6NWP0uoh4G3WFqP/mJ1xxfww0gMOeMeSq/Jyr5k7DvoZ2Pv+XOITTtw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@next/swc-darwin-x64@13.4.3: - resolution: {integrity: sha512-Mi8xJWh2IOjryAM1mx18vwmal9eokJ2njY4nDh04scy37F0LEGJ/diL6JL6kTXi0UfUCGbMsOItf7vpReNiD2A==} + /@next/swc-darwin-x64@13.4.4: + resolution: {integrity: sha512-ZY9Ti1hkIwJsxGus3nlubIkvYyB0gNOYxKrfsOrLEqD0I2iCX8D7w8v6QQZ2H+dDl6UT29oeEUdDUNGk4UEpfg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@next/swc-linux-arm64-gnu@13.4.3: - resolution: {integrity: sha512-aBvtry4bxJ1xwKZ/LVPeBGBwWVwxa4bTnNkRRw6YffJnn/f4Tv4EGDPaVeYHZGQVA56wsGbtA6nZMuWs/EIk4Q==} + /@next/swc-linux-arm64-gnu@13.4.4: + resolution: {integrity: sha512-+KZnDeMShYkpkqAvGCEDeqYTRADJXc6SY1jWXz+Uo6qWQO/Jd9CoyhTJwRSxvQA16MoYzvILkGaDqirkRNctyA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-arm64-musl@13.4.3: - resolution: {integrity: sha512-krT+2G3kEsEUvZoYte3/2IscscDraYPc2B+fDJFipPktJmrv088Pei/RjrhWm5TMIy5URYjZUoDZdh5k940Dyw==} + /@next/swc-linux-arm64-musl@13.4.4: + resolution: {integrity: sha512-evC1twrny2XDT4uOftoubZvW3EG0zs0ZxMwEtu/dDGVRO5n5pT48S8qqEIBGBUZYu/Xx4zzpOkIxx1vpWdE+9A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-gnu@13.4.3: - resolution: {integrity: sha512-AMdFX6EKJjC0G/CM6hJvkY8wUjCcbdj3Qg7uAQJ7PVejRWaVt0sDTMavbRfgMchx8h8KsAudUCtdFkG9hlEClw==} + /@next/swc-linux-x64-gnu@13.4.4: + resolution: {integrity: sha512-PX706XcCHr2FfkyhP2lpf+pX/tUvq6/ke7JYnnr0ykNdEMo+sb7cC/o91gnURh4sPYSiZJhsF2gbIqg9rciOHQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-musl@13.4.3: - resolution: {integrity: sha512-jySgSXE48shaLtcQbiFO9ajE9mqz7pcAVLnVLvRIlUHyQYR/WyZdK8ehLs65Mz6j9cLrJM+YdmdJPyV4WDaz2g==} + /@next/swc-linux-x64-musl@13.4.4: + resolution: {integrity: sha512-TKUUx3Ftd95JlHV6XagEnqpT204Y+IsEa3awaYIjayn0MOGjgKZMZibqarK3B1FsMSPaieJf2FEAcu9z0yT5aA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-win32-arm64-msvc@13.4.3: - resolution: {integrity: sha512-5DxHo8uYcaADiE9pHrg8o28VMt/1kR8voDehmfs9AqS0qSClxAAl+CchjdboUvbCjdNWL1MISCvEfKY2InJ3JA==} + /@next/swc-win32-arm64-msvc@13.4.4: + resolution: {integrity: sha512-FP8AadgSq4+HPtim7WBkCMGbhr5vh9FePXiWx9+YOdjwdQocwoCK5ZVC3OW8oh3TWth6iJ0AXJ/yQ1q1cwSZ3A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-ia32-msvc@13.4.3: - resolution: {integrity: sha512-LaqkF3d+GXRA5X6zrUjQUrXm2MN/3E2arXBtn5C7avBCNYfm9G3Xc646AmmmpN3DJZVaMYliMyCIQCMDEzk80w==} + /@next/swc-win32-ia32-msvc@13.4.4: + resolution: {integrity: sha512-3WekVmtuA2MCdcAOrgrI+PuFiFURtSyyrN1I3UPtS0ckR2HtLqyqmS334Eulf15g1/bdwMteePdK363X/Y9JMg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-x64-msvc@13.4.3: - resolution: {integrity: sha512-jglUk/x7ZWeOJWlVoKyIAkHLTI+qEkOriOOV+3hr1GyiywzcqfI7TpFSiwC7kk1scOiH7NTFKp8mA3XPNO9bDw==} + /@next/swc-win32-x64-msvc@13.4.4: + resolution: {integrity: sha512-AHRITu/CrlQ+qzoqQtEMfaTu7GHaQ6bziQln/pVWpOYC1wU+Mq6VQQFlsDtMCnDztPZtppAXdvvbNS7pcfRzlw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2768,8 +3000,8 @@ packages: /@types/babel__core@7.20.0: resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} dependencies: - '@babel/parser': 7.21.3 - '@babel/types': 7.21.5 + '@babel/parser': 7.22.0 + '@babel/types': 7.22.0 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.18.5 @@ -2777,18 +3009,18 @@ packages: /@types/babel__generator@7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.21.8 - '@babel/types': 7.21.5 + '@babel/parser': 7.22.0 + '@babel/types': 7.22.0 /@types/babel__traverse@7.18.5: resolution: {integrity: sha512-enCvTL8m/EHS/zIvJno9nE+ndYPh1/oNFzRYRmtUqJICG2VnCSBzMLW5VN2KCQU91f23tsNKR8v7VJJQMatl7Q==} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} @@ -3024,7 +3256,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 + semver: 7.5.1 tsutils: 3.21.0(typescript@5.1.0-beta) typescript: 5.1.0-beta transitivePeerDependencies: @@ -3044,7 +3276,7 @@ packages: '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.1.0-beta) eslint: 8.40.0 eslint-scope: 5.1.1 - semver: 7.3.8 + semver: 7.5.1 transitivePeerDependencies: - supports-color - typescript @@ -3315,15 +3547,15 @@ packages: deep-equal: 2.2.0 dev: false - /babel-plugin-jsx-dom-expressions@0.36.10(@babel/core@7.21.3): + /babel-plugin-jsx-dom-expressions@0.36.10(@babel/core@7.22.1): resolution: {integrity: sha512-QA2k/14WGw+RgcGGnEuLWwnu4em6CGhjeXtjvgOYyFHYS2a+CzPeaVQHDOlfuiBcjq/3hWMspHMIMnPEOIzdBg==} peerDependencies: '@babel/core': ^7.20.12 dependencies: - '@babel/core': 7.21.3 + '@babel/core': 7.22.1 '@babel/helper-module-imports': 7.18.6 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.21.3) - '@babel/types': 7.21.5 + '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.1) + '@babel/types': 7.22.0 html-entities: 2.3.3 validate-html-nesting: 1.2.2 @@ -3332,7 +3564,7 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.21.7 + '@babel/compat-data': 7.22.0 '@babel/core': 7.21.3 '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.3) semver: 6.3.0 @@ -3360,13 +3592,13 @@ packages: transitivePeerDependencies: - supports-color - /babel-preset-solid@1.7.4(@babel/core@7.21.3): + /babel-preset-solid@1.7.4(@babel/core@7.22.1): resolution: {integrity: sha512-0mbHNYkbOVYhH6L95VlHVkBEVQjOXSzUqLDiFxUcsg/tU4yTM/qx7FI8C+kmos9LHckQBSm3wtwoe1BZLNJR1w==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.21.3 - babel-plugin-jsx-dom-expressions: 0.36.10(@babel/core@7.21.3) + '@babel/core': 7.22.1 + babel-plugin-jsx-dom-expressions: 0.36.10(@babel/core@7.22.1) /bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} @@ -3710,7 +3942,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.3.8 + semver: 7.5.1 well-known-symbols: 2.0.0 dev: true @@ -4104,9 +4336,9 @@ packages: esbuild: '>=0.12' solid-js: '>= 1.0' dependencies: - '@babel/core': 7.21.3 - '@babel/preset-typescript': 7.21.5(@babel/core@7.21.3) - babel-preset-solid: 1.7.4(@babel/core@7.21.3) + '@babel/core': 7.22.1 + '@babel/preset-typescript': 7.21.5(@babel/core@7.22.1) + babel-preset-solid: 1.7.4(@babel/core@7.22.1) esbuild: 0.17.19 solid-js: 1.7.5 transitivePeerDependencies: @@ -6490,7 +6722,7 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - /next-auth@4.22.1(next@13.4.3)(react-dom@18.2.0)(react@18.2.0): + /next-auth@4.22.1(next@13.4.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA==} peerDependencies: next: ^12.2.5 || ^13 @@ -6505,7 +6737,7 @@ packages: '@panva/hkdf': 1.1.1 cookie: 0.5.0 jose: 4.14.4 - next: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.4(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) oauth: 0.9.15 openid-client: 5.4.2 preact: 10.13.2 @@ -6532,38 +6764,37 @@ packages: - supports-color dev: false - /next-seo@6.0.0(next@13.4.3)(react-dom@18.2.0)(react@18.2.0): + /next-seo@6.0.0(next@13.4.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-jKKt1p1z4otMA28AyeoAONixVjdYmgFCWwpEFtu+DwRHQDllVX3RjtyXbuCQiUZEfQ9rFPBpAI90vDeLZlMBdg==} peerDependencies: next: ^8.1.1-canary.54 || >=9.0.0 react: '>=16.0.0' react-dom: '>=16.0.0' dependencies: - next: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /next-themes@0.2.1(next@13.4.3)(react-dom@18.2.0)(react@18.2.0): + /next-themes@0.2.1(next@13.4.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} peerDependencies: next: '*' react: '*' react-dom: '*' dependencies: - next: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /next@13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-FV3pBrAAnAIfOclTvncw9dDohyeuEEXPe5KNcva91anT/rdycWbgtu3IjUj4n5yHnWK8YEPo0vrUecHmnmUNbA==} + /next@13.4.4(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-C5S0ysM0Ily9McL4Jb48nOQHT1BukOWI59uC3X/xCMlYIh9rJZCv7nzG92J6e1cOBqQbKovlpgvHWFmz4eKKEA==} engines: {node: '>=16.8.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 fibers: '>= 3.1.0' - node-sass: ^6.0.0 || ^7.0.0 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 @@ -6572,12 +6803,10 @@ packages: optional: true fibers: optional: true - node-sass: - optional: true sass: optional: true dependencies: - '@next/env': 13.4.3 + '@next/env': 13.4.4 '@swc/helpers': 0.5.1 busboy: 1.6.0 caniuse-lite: 1.0.30001470 @@ -6587,20 +6816,62 @@ packages: styled-jsx: 5.1.1(@babel/core@7.21.3)(react@18.2.0) zod: 3.21.4 optionalDependencies: - '@next/swc-darwin-arm64': 13.4.3 - '@next/swc-darwin-x64': 13.4.3 - '@next/swc-linux-arm64-gnu': 13.4.3 - '@next/swc-linux-arm64-musl': 13.4.3 - '@next/swc-linux-x64-gnu': 13.4.3 - '@next/swc-linux-x64-musl': 13.4.3 - '@next/swc-win32-arm64-msvc': 13.4.3 - '@next/swc-win32-ia32-msvc': 13.4.3 - '@next/swc-win32-x64-msvc': 13.4.3 + '@next/swc-darwin-arm64': 13.4.4 + '@next/swc-darwin-x64': 13.4.4 + '@next/swc-linux-arm64-gnu': 13.4.4 + '@next/swc-linux-arm64-musl': 13.4.4 + '@next/swc-linux-x64-gnu': 13.4.4 + '@next/swc-linux-x64-musl': 13.4.4 + '@next/swc-win32-arm64-msvc': 13.4.4 + '@next/swc-win32-ia32-msvc': 13.4.4 + '@next/swc-win32-x64-msvc': 13.4.4 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros + dev: false - /nextra-theme-docs@2.6.0(next@13.4.3)(nextra@2.6.0)(react-dom@18.2.0)(react@18.2.0): + /next@13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-C5S0ysM0Ily9McL4Jb48nOQHT1BukOWI59uC3X/xCMlYIh9rJZCv7nzG92J6e1cOBqQbKovlpgvHWFmz4eKKEA==} + engines: {node: '>=16.8.0'} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + fibers: '>= 3.1.0' + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + fibers: + optional: true + sass: + optional: true + dependencies: + '@next/env': 13.4.4 + '@swc/helpers': 0.5.1 + busboy: 1.6.0 + caniuse-lite: 1.0.30001470 + postcss: 8.4.14 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.22.1)(react@18.2.0) + zod: 3.21.4 + optionalDependencies: + '@next/swc-darwin-arm64': 13.4.4 + '@next/swc-darwin-x64': 13.4.4 + '@next/swc-linux-arm64-gnu': 13.4.4 + '@next/swc-linux-arm64-musl': 13.4.4 + '@next/swc-linux-x64-gnu': 13.4.4 + '@next/swc-linux-x64-musl': 13.4.4 + '@next/swc-win32-arm64-msvc': 13.4.4 + '@next/swc-win32-ia32-msvc': 13.4.4 + '@next/swc-win32-x64-msvc': 13.4.4 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + + /nextra-theme-docs@2.6.0(next@13.4.4)(nextra@2.6.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-/baIEzrBDjWD60/6l+mxUND0ZAjF27uRIUWP5QRWb01TQDA8Nqy8a/ANYM0a3bx4RgL/YBt47D0aWu/beWL1Fg==} peerDependencies: next: '>=9.5.3' @@ -6616,17 +6887,17 @@ packages: git-url-parse: 13.1.0 intersection-observer: 0.12.2 match-sorter: 6.3.1 - next: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) - next-seo: 6.0.0(next@13.4.3)(react-dom@18.2.0)(react@18.2.0) - next-themes: 0.2.1(next@13.4.3)(react-dom@18.2.0)(react@18.2.0) - nextra: 2.6.0(next@13.4.3)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) + next-seo: 6.0.0(next@13.4.4)(react-dom@18.2.0)(react@18.2.0) + next-themes: 0.2.1(next@13.4.4)(react-dom@18.2.0)(react@18.2.0) + nextra: 2.6.0(next@13.4.4)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) scroll-into-view-if-needed: 3.0.10 zod: 3.21.4 dev: false - /nextra@2.6.0(next@13.4.3)(react-dom@18.2.0)(react@18.2.0): + /nextra@2.6.0(next@13.4.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-yLYcjQWBfzlUUuf7q8M5DXIpNId19RB5SyrpjcNB/KvZ1S2CQpf5cXmpRzKGl015NI3MRAX+z7pMR2qiU3HtwA==} engines: {node: '>=16'} peerDependencies: @@ -6643,7 +6914,7 @@ packages: gray-matter: 4.0.3 katex: 0.16.6 lodash.get: 4.4.2 - next: 13.4.3(@babel/core@7.21.3)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.4(@babel/core@7.22.1)(react-dom@18.2.0)(react@18.2.0) next-mdx-remote: 4.4.1(react-dom@18.2.0)(react@18.2.0) p-limit: 3.1.0 react: 18.2.0 @@ -6952,7 +7223,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.21.4 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -7195,6 +7466,62 @@ packages: engines: {node: '>=4'} dev: false + /prettier-plugin-tailwindcss@0.3.0(@ianvs/prettier-plugin-sort-imports@4.0.0)(prettier@2.8.8): + resolution: {integrity: sha512-009/Xqdy7UmkcTBpwlq7jsViDqXAYSOMLDrHAdTMlVZOrKfM2o9Ci7EMWTMZ7SkKBFTG04UM9F9iM2+4i6boDA==} + engines: {node: '>=12.17.0'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@shufo/prettier-plugin-blade': '*' + '@trivago/prettier-plugin-sort-imports': '*' + prettier: '>=2.2.0' + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + prettier-plugin-twig-melody: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@shufo/prettier-plugin-blade': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + prettier-plugin-twig-melody: + optional: true + dependencies: + '@ianvs/prettier-plugin-sort-imports': 4.0.0(prettier@2.8.8) + prettier: 2.8.8 + dev: false + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -7659,6 +7986,13 @@ packages: dependencies: lru-cache: 6.0.0 + /semver@7.5.1: + resolution: {integrity: sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + /seroval@0.5.1: resolution: {integrity: sha512-ZfhQVB59hmIauJG5Ydynupy8KHyr5imGNtdDhbZG68Ufh1Ynkv9KOYOAABf71oVbQxJ8VkWnMHAjEHE7fWkH5g==} engines: {node: '>=10'} @@ -7756,9 +8090,9 @@ packages: peerDependencies: solid-js: ^1.3 dependencies: - '@babel/generator': 7.21.3 + '@babel/generator': 7.22.0 '@babel/helper-module-imports': 7.21.4 - '@babel/types': 7.21.5 + '@babel/types': 7.22.0 solid-js: 1.7.5 /solid-start-node@0.2.26(solid-start@0.2.26)(undici@5.20.0)(vite@4.2.1): @@ -8088,6 +8422,24 @@ packages: '@babel/core': 7.21.3 client-only: 0.0.1 react: 18.2.0 + dev: false + + /styled-jsx@5.1.1(@babel/core@7.22.1)(react@18.2.0): + resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + dependencies: + '@babel/core': 7.22.1 + client-only: 0.0.1 + react: 18.2.0 /sucrase@3.31.0: resolution: {integrity: sha512-6QsHnkqyVEzYcaiHsOKkzOtOgdJcb8i54x6AV2hDwyZcY9ZyykGZVw6L/YN98xC0evwTP6utsWWrKRaa8QlfEQ==} @@ -8405,65 +8757,65 @@ packages: yargs: 17.7.1 dev: false - /turbo-darwin-64@1.9.3: - resolution: {integrity: sha512-0dFc2cWXl82kRE4Z+QqPHhbEFEpUZho1msHXHWbz5+PqLxn8FY0lEVOHkq5tgKNNEd5KnGyj33gC/bHhpZOk5g==} + /turbo-darwin-64@1.9.9: + resolution: {integrity: sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==} cpu: [x64] os: [darwin] requiresBuild: true dev: false optional: true - /turbo-darwin-arm64@1.9.3: - resolution: {integrity: sha512-1cYbjqLBA2zYE1nbf/qVnEkrHa4PkJJbLo7hnuMuGM0bPzh4+AnTNe98gELhqI1mkTWBu/XAEeF5u6dgz0jLNA==} + /turbo-darwin-arm64@1.9.9: + resolution: {integrity: sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==} cpu: [arm64] os: [darwin] requiresBuild: true dev: false optional: true - /turbo-linux-64@1.9.3: - resolution: {integrity: sha512-UuBPFefawEwpuxh5pM9Jqq3q4C8M0vYxVYlB3qea/nHQ80pxYq7ZcaLGEpb10SGnr3oMUUs1zZvkXWDNKCJb8Q==} + /turbo-linux-64@1.9.9: + resolution: {integrity: sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /turbo-linux-arm64@1.9.3: - resolution: {integrity: sha512-vUrNGa3hyDtRh9W0MkO+l1dzP8Co2gKnOVmlJQW0hdpOlWlIh22nHNGGlICg+xFa2f9j4PbQlWTsc22c019s8Q==} + /turbo-linux-arm64@1.9.9: + resolution: {integrity: sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /turbo-windows-64@1.9.3: - resolution: {integrity: sha512-0BZ7YaHs6r+K4ksqWus1GKK3W45DuDqlmfjm/yuUbTEVc8szmMCs12vugU2Zi5GdrdJSYfoKfEJ/PeegSLIQGQ==} + /turbo-windows-64@1.9.9: + resolution: {integrity: sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==} cpu: [x64] os: [win32] requiresBuild: true dev: false optional: true - /turbo-windows-arm64@1.9.3: - resolution: {integrity: sha512-QJUYLSsxdXOsR1TquiOmLdAgtYcQ/RuSRpScGvnZb1hY0oLc7JWU0llkYB81wVtWs469y8H9O0cxbKwCZGR4RQ==} + /turbo-windows-arm64@1.9.9: + resolution: {integrity: sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: false optional: true - /turbo@1.9.3: - resolution: {integrity: sha512-ID7mxmaLUPKG/hVkp+h0VuucB1U99RPCJD9cEuSEOdIPoSIuomcIClEJtKamUsdPLhLCud+BvapBNnhgh58Nzw==} + /turbo@1.9.9: + resolution: {integrity: sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.9.3 - turbo-darwin-arm64: 1.9.3 - turbo-linux-64: 1.9.3 - turbo-linux-arm64: 1.9.3 - turbo-windows-64: 1.9.3 - turbo-windows-arm64: 1.9.3 + turbo-darwin-64: 1.9.9 + turbo-darwin-arm64: 1.9.9 + turbo-linux-64: 1.9.9 + turbo-linux-arm64: 1.9.9 + turbo-windows-64: 1.9.9 + turbo-windows-arm64: 1.9.9 dev: false /type-check@0.4.0: @@ -8817,10 +9169,10 @@ packages: solid-js: ^1.7.2 vite: ^3.0.0 || ^4.0.0 dependencies: - '@babel/core': 7.21.3 - '@babel/preset-typescript': 7.21.5(@babel/core@7.21.3) + '@babel/core': 7.22.1 + '@babel/preset-typescript': 7.21.5(@babel/core@7.22.1) '@types/babel__core': 7.20.0 - babel-preset-solid: 1.7.4(@babel/core@7.21.3) + babel-preset-solid: 1.7.4(@babel/core@7.22.1) merge-anything: 5.1.6 solid-js: 1.7.5 solid-refresh: 0.5.2(solid-js@1.7.5) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index de8e6ec2be..eca81c9e39 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: + - "packages/config/*" - "packages/*" - "examples/*" - - "common/*" - "docs" diff --git a/prettier.config.cjs b/prettier.config.cjs new file mode 100644 index 0000000000..edcb294f6c --- /dev/null +++ b/prettier.config.cjs @@ -0,0 +1,30 @@ +/** @typedef {import("prettier").Config} PrettierConfig */ + +/** @type { PrettierConfig | SortImportsConfig } */ +const config = { + arrowParens: "always", + printWidth: 80, + singleQuote: false, + semi: true, + trailingComma: "all", + tabWidth: 2, + plugins: [ + "@ianvs/prettier-plugin-sort-imports", + "prettier-plugin-tailwindcss", + ], + // Last version that doesn't squash type and value imports + importOrderTypeScriptVersion: "4.4.0", + importOrder: [ + "^(react/(.*)$)|^(react$)", + "^(next/(.*)$)|^(next$)", + "", + "", + "^@uploadthing/(.*)$", + "^uploadthing/(.*)$", + "", + "^~/(.*)$", + "^[./]", + ], +}; + +module.exports = config;