From 0b348760256514200d7e3a4e14b409d728f8eb8e Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Sat, 13 Jan 2024 10:58:34 +0100 Subject: [PATCH 1/7] bunchee 2 --- package.json | 1 + packages/config/tsup/index.d.ts | 4 - packages/config/tsup/index.js | 14 - packages/config/tsup/package.json | 11 - packages/dropzone/package.json | 6 +- packages/dropzone/tsup.config.ts | 13 - packages/mime-types/package.json | 6 +- packages/mime-types/tsup.config.ts | 12 - packages/react/package.json | 7 +- packages/react/postcss.config.js | 6 - packages/react/src/components/button.tsx | 2 + packages/react/src/components/dropzone.tsx | 2 + packages/react/src/hooks.ts | 2 + packages/react/src/index.ts | 2 - packages/react/src/next-ssr-plugin.tsx | 2 + packages/react/src/useUploadThing.ts | 2 +- packages/react/tailwind.config.cjs | 83 --- packages/react/tailwind.config.ts | 8 + packages/react/tsconfig.sourcemap.json | 11 - packages/react/tsup.config.ts | 14 - packages/shared/package.json | 6 +- packages/shared/tsup.config.ts | 12 - packages/solid/package.json | 2 +- packages/uploadthing/package.json | 122 ++++- packages/uploadthing/src/constants.ts | 5 +- packages/uploadthing/src/sdk/utils.ts | 2 +- packages/uploadthing/src/server.ts | 9 +- packages/uploadthing/tsconfig.sourcemap.json | 11 - packages/uploadthing/tsup.config.ts | 19 - pnpm-lock.yaml | 537 +++++++++++++++++-- 30 files changed, 618 insertions(+), 315 deletions(-) delete mode 100644 packages/config/tsup/index.d.ts delete mode 100644 packages/config/tsup/index.js delete mode 100644 packages/config/tsup/package.json delete mode 100644 packages/dropzone/tsup.config.ts delete mode 100644 packages/mime-types/tsup.config.ts delete mode 100644 packages/react/postcss.config.js delete mode 100644 packages/react/tailwind.config.cjs create mode 100644 packages/react/tailwind.config.ts delete mode 100644 packages/react/tsconfig.sourcemap.json delete mode 100644 packages/react/tsup.config.ts delete mode 100644 packages/shared/tsup.config.ts delete mode 100644 packages/uploadthing/tsconfig.sourcemap.json delete mode 100644 packages/uploadthing/tsup.config.ts diff --git a/package.json b/package.json index 65d90a2f6b..cba2ab42f3 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@manypkg/cli": "^0.20.0", "@types/node": "18.16.0", "@uploadthing/eslint-config": "0.2.0", + "bunchee": "^4.3.3", "dotenv": "latest", "prettier": "^2.8.8", "prettier-plugin-tailwindcss": "^0.3.0", diff --git a/packages/config/tsup/index.d.ts b/packages/config/tsup/index.d.ts deleted file mode 100644 index 33a1611153..0000000000 --- a/packages/config/tsup/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 45527a14cc..0000000000 --- a/packages/config/tsup/index.js +++ /dev/null @@ -1,14 +0,0 @@ -const { execSync } = require("child_process"); - -/** @type {import("tsup").Options} */ -const config = { - sourcemap: true, - dts: true, - format: ["esm", "cjs"], - async onSuccess() { - // emit dts and sourcemaps 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 deleted file mode 100644 index 35257e1267..0000000000 --- a/packages/config/tsup/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "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/dropzone/package.json b/packages/dropzone/package.json index d985333a5c..4409c089c1 100644 --- a/packages/dropzone/package.json +++ b/packages/dropzone/package.json @@ -35,9 +35,9 @@ }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "tsup", + "build": "bunchee", "clean": "git clean -xdf dist node_modules", - "dev": "tsup --watch", + "dev": "bunchee -w", "typecheck": "tsc --noEmit" }, "dependencies": { @@ -48,11 +48,9 @@ "@types/react": "18.2.33", "@uploadthing/eslint-config": "0.2.0", "@uploadthing/tsconfig": "0.1.0", - "@uploadthing/tsup-config": "0.1.0", "eslint": "^8.47.0", "react": "18.2.0", "solid-js": "^1.7.11", - "tsup": "6.7.0", "typescript": "^5.1.6" }, "eslintConfig": { diff --git a/packages/dropzone/tsup.config.ts b/packages/dropzone/tsup.config.ts deleted file mode 100644 index 5a1d93c747..0000000000 --- a/packages/dropzone/tsup.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from "tsup"; - -import { config } from "@uploadthing/tsup-config"; - -export default defineConfig((opts) => ({ - ...config, - entry: ["./src/core.ts", "./src/react.tsx", "./src/solid.tsx"], - external: ["react", "solid-js"], - clean: !opts.watch, - async onSuccess() { - // void - }, -})); diff --git a/packages/mime-types/package.json b/packages/mime-types/package.json index 45a60d5baf..975ccc2ec7 100644 --- a/packages/mime-types/package.json +++ b/packages/mime-types/package.json @@ -27,17 +27,15 @@ ], "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "tsup", + "build": "bunchee", "clean": "git clean -xdf dist node_modules", - "dev": "tsup --watch", + "dev": "bunchee -w", "typecheck": "tsc --noEmit" }, "devDependencies": { "@uploadthing/eslint-config": "0.2.0", "@uploadthing/tsconfig": "0.1.0", - "@uploadthing/tsup-config": "0.1.0", "eslint": "^8.47.0", - "tsup": "6.7.0", "typescript": "^5.1.6" }, "publishConfig": { diff --git a/packages/mime-types/tsup.config.ts b/packages/mime-types/tsup.config.ts deleted file mode 100644 index 403660cbd4..0000000000 --- a/packages/mime-types/tsup.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsup"; - -import { config } from "@uploadthing/tsup-config"; - -export default defineConfig((opts) => ({ - ...config, - entry: ["./src/index.ts", "./src/db.ts"], - clean: !opts.watch, - async onSuccess() { - // void - }, -})); diff --git a/packages/react/package.json b/packages/react/package.json index 5bf443563a..aca6649288 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -37,7 +37,8 @@ "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", "clean": "git clean -xdf dist node_modules", - "build": "tsup", + "build:tw": "tailwindcss -i ./src/styles.css -o ./dist/index.css", + "build": "rm -rf dist && bunchee && npm run build:tw", "test": "vitest run", "test:watch": "vitest", "typecheck": "tsc --noEmit", @@ -66,14 +67,10 @@ "@types/react-dom": "18.2.14", "@uploadthing/eslint-config": "0.2.0", "@uploadthing/tsconfig": "0.1.0", - "@uploadthing/tsup-config": "0.1.0", - "autoprefixer": "10.4.14", "eslint": "^8.47.0", "next": "14.0.1", - "postcss": "8.4.31", "react": "18.2.0", "tailwindcss": "^3.3.2", - "tsup": "6.7.0", "typescript": "^5.1.6", "uploadthing": "6.1.1", "vitest": "^0.30.1", diff --git a/packages/react/postcss.config.js b/packages/react/postcss.config.js deleted file mode 100644 index 12a703d900..0000000000 --- a/packages/react/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/packages/react/src/components/button.tsx b/packages/react/src/components/button.tsx index ac3c751164..bf35d9ec68 100644 --- a/packages/react/src/components/button.tsx +++ b/packages/react/src/components/button.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useEffect, useRef, useState } from "react"; import { twMerge } from "tailwind-merge"; diff --git a/packages/react/src/components/dropzone.tsx b/packages/react/src/components/dropzone.tsx index d014b1aa1d..ab680c7cea 100644 --- a/packages/react/src/components/dropzone.tsx +++ b/packages/react/src/components/dropzone.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useCallback, useEffect, useState } from "react"; import { twMerge } from "tailwind-merge"; diff --git a/packages/react/src/hooks.ts b/packages/react/src/hooks.ts index 398f6899f8..2bafdd6c33 100644 --- a/packages/react/src/hooks.ts +++ b/packages/react/src/hooks.ts @@ -1,3 +1,5 @@ +"use client"; + export { generateReactHelpers } from "./useUploadThing"; export { useDropzone } from "@uploadthing/dropzone/react"; diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index ccf921b00f..515977c6c6 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,5 +1,3 @@ -import "./styles.css"; - export { UploadButton, UploadDropzone, diff --git a/packages/react/src/next-ssr-plugin.tsx b/packages/react/src/next-ssr-plugin.tsx index 2f48dee44e..2393d6a987 100644 --- a/packages/react/src/next-ssr-plugin.tsx +++ b/packages/react/src/next-ssr-plugin.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useId } from "react"; import { useServerInsertedHTML } from "next/navigation"; diff --git a/packages/react/src/useUploadThing.ts b/packages/react/src/useUploadThing.ts index f782513c61..fb0d2645fc 100644 --- a/packages/react/src/useUploadThing.ts +++ b/packages/react/src/useUploadThing.ts @@ -164,7 +164,7 @@ export const generateReactHelpers = (initOpts?: { DANGEROUS__uploadFiles(endpoint, { ...opts, url, - } as any), + }), } as const; }; diff --git a/packages/react/tailwind.config.cjs b/packages/react/tailwind.config.cjs deleted file mode 100644 index 0be0ec68a4..0000000000 --- a/packages/react/tailwind.config.cjs +++ /dev/null @@ -1,83 +0,0 @@ -const colors = require("tailwindcss/colors"); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"], - corePlugins: { - preflight: false, - }, - theme: { - fontFamily: { - display: ["Inter"], - }, - boxShadow: { - sm: "0 1px 2px 0 rgb(0 0 0 / 0.15)", - DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3)", - md: "0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3)", - lg: "0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3)", - xl: "0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3)", - "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.75)", - inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.15)", - }, - extend: { - colors: { - truegray: colors.neutral, - red: colors.rose, - gray: { - ...colors.zinc, - 750: "#333338", - 850: "#202023", - 950: "#0C0C0E", - }, - pink: { - 50: "#FEE6F0", - 100: "#FDCDE1", - 200: "#F1A5C6", - 300: "#ED8AB5", - 400: "#E96EA4", - 500: "#E24A8D", - 600: "#DB1D70", - 700: "#C01A62", - 800: "#A41654", - 900: "#6E0F38", - }, - }, - fontSize: { - xxs: ".6rem", - }, - keyframes: { - "fade-in-down": { - "0%": { - opacity: "0", - transform: "translateY(-10px)", - }, - "100%": { - opacity: "1", - transform: "translateY(0)", - }, - }, - "fade-in-left": { - "0%": { - opacity: "0", - transform: "translateX(10px)", - }, - "100%": { - opacity: "1", - transform: "translateX(0)", - }, - }, - "fade-in": { - "0%": { - opacity: "0", - }, - "100%": { - opacity: "1", - }, - }, - }, - brightness: { - 25: ".25", - }, - }, - }, -}; diff --git a/packages/react/tailwind.config.ts b/packages/react/tailwind.config.ts new file mode 100644 index 0000000000..1077fb8c68 --- /dev/null +++ b/packages/react/tailwind.config.ts @@ -0,0 +1,8 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"], + corePlugins: { + preflight: false, + }, +} satisfies Config; diff --git a/packages/react/tsconfig.sourcemap.json b/packages/react/tsconfig.sourcemap.json deleted file mode 100644 index 671ff12a71..0000000000 --- a/packages/react/tsconfig.sourcemap.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": true, - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "declarationDir": "dist" - }, - "exclude": ["tsup.config.ts", "test"] -} diff --git a/packages/react/tsup.config.ts b/packages/react/tsup.config.ts deleted file mode 100644 index 7c59cc326e..0000000000 --- a/packages/react/tsup.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from "tsup"; - -import { config } from "@uploadthing/tsup-config"; - -export default defineConfig((opts) => ({ - ...config, - entry: ["./src/index.ts", "./src/hooks.ts", "./src/next-ssr-plugin.tsx"], - clean: !opts.watch, - esbuildOptions: (option) => { - option.banner = { - js: `"use client";`, - }; - }, -})); diff --git a/packages/shared/package.json b/packages/shared/package.json index b282ea6982..29a1597f5c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -25,18 +25,16 @@ }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "tsup", + "build": "bunchee", "clean": "git clean -xdf dist node_modules", - "dev": "tsup --watch", + "dev": "bunchee -w", "typecheck": "tsc --noEmit" }, "devDependencies": { "@uploadthing/eslint-config": "0.2.0", "@uploadthing/mime-types": "0.2.2", "@uploadthing/tsconfig": "0.1.0", - "@uploadthing/tsup-config": "0.1.0", "eslint": "^8.47.0", - "tsup": "6.7.0", "typescript": "^5.1.6" }, "peerDependencies": { diff --git a/packages/shared/tsup.config.ts b/packages/shared/tsup.config.ts deleted file mode 100644 index 43a2bee0e5..0000000000 --- a/packages/shared/tsup.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsup"; - -import { config } from "@uploadthing/tsup-config"; - -export default defineConfig((opts) => ({ - ...config, - entry: ["./src/index.ts"], - clean: !opts.watch, - async onSuccess() { - // void - }, -})); diff --git a/packages/solid/package.json b/packages/solid/package.json index 29360999c4..bb766858d9 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -81,7 +81,7 @@ }, "sideEffects": false, "scripts": { - "build": "rm -rf dist && tsup --config ./tsup.config.js", + "buildd": "rm -rf dist && tsup --config ./tsup.config.js", "dev": "wait-on ../uploadthing/dist/server.mjs && tsup --watch --config ./tsup.config.js", "lint": "eslint \"**/*.{ts,tsx}\"", "typecheck": "tsc --noEmit" diff --git a/packages/uploadthing/package.json b/packages/uploadthing/package.json index 689555dee0..75fde4d618 100644 --- a/packages/uploadthing/package.json +++ b/packages/uploadthing/package.json @@ -8,44 +8,88 @@ "exports": { "./package.json": "./package.json", "./client": { - "types": "./dist/client.d.ts", - "import": "./dist/client.mjs", - "require": "./dist/client.js" + "import": { + "types": "./dist/client.d.mts", + "default": "./dist/client.mjs" + }, + "require": { + "types": "./dist/client.d.cts", + "default": "./dist/client.cjs" + } }, "./server": { - "types": "./dist/server.d.ts", - "import": "./dist/server.mjs", - "require": "./dist/server.js" + "import": { + "types": "./dist/server.d.mts", + "default": "./dist/server.mjs" + }, + "require": { + "types": "./dist/server.d.cts", + "default": "./dist/server.cjs" + } }, "./next": { - "types": "./dist/next.d.ts", - "import": "./dist/next.mjs", - "require": "./dist/next.js" + "import": { + "types": "./dist/next.d.mts", + "default": "./dist/next.mjs" + }, + "require": { + "types": "./dist/next.d.cts", + "default": "./dist/next.cjs" + } }, "./next-legacy": { - "types": "./dist/next-legacy.d.ts", - "import": "./dist/next-legacy.mjs", - "require": "./dist/next-legacy.js" + "import": { + "types": "./dist/next-legacy.d.mts", + "default": "./dist/next-legacy.mjs" + }, + "require": { + "types": "./dist/next-legacy.d.cts", + "default": "./dist/next-legacy.cjs" + } }, "./express": { - "import": "./dist/express.mjs", - "types": "./dist/express.d.ts", - "require": "./dist/express.js" + "import": { + "types": "./dist/express.d.mts", + "default": "./dist/express.mjs" + }, + "require": { + "types": "./dist/express.d.cts", + "default": "./dist/express.cjs" + } }, "./tw": { - "types": "./dist/tw.d.ts", - "import": "./dist/tw.mjs", - "require": "./dist/tw.js" + "import": { + "types": "./dist/tw.d.mts", + "default": "./dist/tw.mjs" + }, + "require": { + "types": "./dist/tw.d.cts", + "default": "./dist/tw.cjs" + } }, "./fastify": { - "types": "./dist/fastify.d.ts", - "import": "./dist/fastify.mjs", - "require": "./dist/fastify.js" + "import": { + "types": "./dist/fastify.d.mts", + "default": "./dist/fastify.mjs" + }, + "require": { + "types": "./dist/fastify.d.cts", + "default": "./dist/fastify.cjs" + } }, "./h3": { - "types": "./dist/h3.d.ts", - "import": "./dist/h3.mjs", - "require": "./dist/h3.js" + "import": { + "types": "./dist/h3.d.mts", + "default": "./dist/h3.mjs" + }, + "require": { + "types": "./dist/h3.d.cts", + "default": "./dist/h3.cjs" + } + }, + "./internal/types": { + "types": "./dist/internal/types.d.ts", + "default": "./dist/internal/types.js" } }, "files": [ @@ -84,9 +128,9 @@ }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "tsup", + "build": "bunchee", "clean": "git clean -xdf dist node_modules", - "dev": "tsup --watch", + "dev": "bunchee -w", "test": "vitest run", "test:watch": "vitest", "typecheck": "tsc --noEmit" @@ -101,7 +145,6 @@ "@types/react": "18.2.33", "@uploadthing/eslint-config": "0.2.0", "@uploadthing/tsconfig": "0.1.0", - "@uploadthing/tsup-config": "0.1.0", "eslint": "^8.47.0", "express": "^4.18.2", "fastify": "^4.23.2", @@ -109,13 +152,36 @@ "next": "14.0.1", "solid-js": "^1.7.11", "tailwindcss": "^3.3.2", - "tsup": "6.7.0", "type-fest": "^3.11.1", "typescript": "^5.1.6", "undici": "^5.20.0", "vitest": "^0.30.1", "zod": "^3.22.3" }, + "peerDependencies": { + "express": "*", + "fastify": "*", + "h3": "*", + "next": "*", + "tailwindcss": "*" + }, + "peerDependenciesMeta": { + "express": { + "optional": true + }, + "fastify": { + "optional": true + }, + "h3": { + "optional": true + }, + "next": { + "optional": true + }, + "tailwindcss": { + "optional": true + } + }, "eslintConfig": { "root": true, "extends": [ diff --git a/packages/uploadthing/src/constants.ts b/packages/uploadthing/src/constants.ts index 5eb711cca9..f2a51108de 100644 --- a/packages/uploadthing/src/constants.ts +++ b/packages/uploadthing/src/constants.ts @@ -1,4 +1 @@ -import packageJson from "../package.json"; - -if (!packageJson.version) throw new Error("no version found in package.json"); -export const UPLOADTHING_VERSION = packageJson.version; +export { version as UPLOADTHING_VERSION } from "../package.json"; diff --git a/packages/uploadthing/src/sdk/utils.ts b/packages/uploadthing/src/sdk/utils.ts index 391d4299a0..51dcde035f 100644 --- a/packages/uploadthing/src/sdk/utils.ts +++ b/packages/uploadthing/src/sdk/utils.ts @@ -10,7 +10,7 @@ import { import { UPLOADTHING_VERSION } from "../constants"; import { logger } from "../internal/logger"; import { uploadPart } from "../internal/multi-part"; -import type { UTEvents } from "../server"; +import type { UTEvents } from "../internal/types"; export function guardServerOnly() { if (typeof window !== "undefined") { diff --git a/packages/uploadthing/src/server.ts b/packages/uploadthing/src/server.ts index 10b09407b1..4d57b237af 100644 --- a/packages/uploadthing/src/server.ts +++ b/packages/uploadthing/src/server.ts @@ -14,7 +14,14 @@ import type { FileRouter } from "./internal/types"; import type { CreateBuilderOptions } from "./internal/upload-builder"; import { createBuilder } from "./internal/upload-builder"; -export * from "./internal/types"; +export type { + FileRouter, + ErrorMessage, + DistributiveOmit, + inferEndpointInput, + inferEndpointOutput, + inferErrorShape, +} from "./internal/types"; export { UTApi } from "./sdk"; export const createUploadthing = ( diff --git a/packages/uploadthing/tsconfig.sourcemap.json b/packages/uploadthing/tsconfig.sourcemap.json deleted file mode 100644 index 671ff12a71..0000000000 --- a/packages/uploadthing/tsconfig.sourcemap.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": true, - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "declarationDir": "dist" - }, - "exclude": ["tsup.config.ts", "test"] -} diff --git a/packages/uploadthing/tsup.config.ts b/packages/uploadthing/tsup.config.ts deleted file mode 100644 index a638583459..0000000000 --- a/packages/uploadthing/tsup.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { defineConfig } from "tsup"; - -import { config } from "@uploadthing/tsup-config"; - -export default defineConfig((opts) => ({ - ...config, - entry: [ - "./src/client.ts", - "./src/express.ts", - "./src/server.ts", - "./src/next.ts", - "./src/next-legacy.ts", - "./src/tw.ts", - "./src/fastify.ts", - "./src/h3.ts", - ], - clean: !opts.watch, - external: ["express", "h3", "tailwindcss"], -})); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b0e409798..1b83a4ca63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: '@uploadthing/eslint-config': specifier: 0.2.0 version: link:packages/config/eslint-config + bunchee: + specifier: ^4.3.3 + version: 4.3.3(typescript@5.1.6) dotenv: specifier: latest version: 16.3.1 @@ -737,22 +740,13 @@ importers: version: link:../tsconfig tsup: specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) + version: 6.7.0(@swc/core@1.3.102)(postcss@8.4.31)(typescript@5.1.6) typescript: specifier: ^5.1.6 version: 5.1.6 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.31)(typescript@5.1.6) - packages/dropzone: dependencies: attr-accept: @@ -771,9 +765,6 @@ importers: '@uploadthing/tsconfig': specifier: 0.1.0 version: link:../config/tsconfig - '@uploadthing/tsup-config': - specifier: 0.1.0 - version: link:../config/tsup eslint: specifier: ^8.47.0 version: 8.47.0 @@ -783,9 +774,6 @@ importers: solid-js: specifier: ^1.7.11 version: 1.8.7 - tsup: - specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) typescript: specifier: ^5.1.6 version: 5.1.6 @@ -798,15 +786,9 @@ importers: '@uploadthing/tsconfig': specifier: 0.1.0 version: link:../config/tsconfig - '@uploadthing/tsup-config': - specifier: 0.1.0 - version: link:../config/tsup eslint: specifier: ^8.47.0 version: 8.47.0 - tsup: - specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) typescript: specifier: ^5.1.6 version: 5.1.6 @@ -844,30 +826,18 @@ importers: '@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.31) eslint: specifier: ^8.47.0 version: 8.47.0 next: specifier: 14.0.1 version: 14.0.1(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) - postcss: - specifier: 8.4.31 - version: 8.4.31 react: specifier: 18.2.0 version: 18.2.0 tailwindcss: specifier: ^3.3.2 version: 3.3.2 - tsup: - specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) typescript: specifier: ^5.1.6 version: 5.1.6 @@ -895,15 +865,9 @@ importers: '@uploadthing/tsconfig': specifier: 0.1.0 version: link:../config/tsconfig - '@uploadthing/tsup-config': - specifier: 0.1.0 - version: link:../config/tsup eslint: specifier: ^8.47.0 version: 8.47.0 - tsup: - specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) typescript: specifier: ^5.1.6 version: 5.1.6 @@ -934,7 +898,7 @@ importers: version: 3.3.2 tsup: specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) + version: 6.7.0(@swc/core@1.3.102)(postcss@8.4.31)(typescript@5.1.6) tsup-preset-solid: specifier: 0.1.8 version: 0.1.8(esbuild@0.19.2)(solid-js@1.7.11)(tsup@6.7.0) @@ -972,9 +936,6 @@ importers: '@uploadthing/tsconfig': specifier: 0.1.0 version: link:../config/tsconfig - '@uploadthing/tsup-config': - specifier: 0.1.0 - version: link:../config/tsup eslint: specifier: ^8.47.0 version: 8.47.0 @@ -996,9 +957,6 @@ importers: tailwindcss: specifier: ^3.3.2 version: 3.3.2 - tsup: - specifier: 6.7.0 - version: 6.7.0(postcss@8.4.31)(typescript@5.1.6) type-fest: specifier: ^3.11.1 version: 3.11.1 @@ -3835,6 +3793,37 @@ packages: magic-string: 0.27.0 rollup: 3.28.1 + /@rollup/plugin-commonjs@25.0.7(rollup@4.9.5): + resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.1.0 + is-reference: 1.2.1 + magic-string: 0.30.3 + rollup: 4.9.5 + dev: false + + /@rollup/plugin-esm-shim@0.1.5(rollup@4.9.5): + resolution: {integrity: sha512-xnIjDm/0EbqAw0/rR1UE7eAo9db0ftGPqT8RUCFtkFxtCuspbbmj+wutoyxm32jBytyO3SgkxSG17OR893fV7A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + magic-string: 0.30.3 + rollup: 4.9.5 + dev: false + /@rollup/plugin-json@6.0.0(rollup@3.28.1): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} @@ -3847,6 +3836,19 @@ packages: '@rollup/pluginutils': 5.0.4(rollup@3.28.1) rollup: 3.28.1 + /@rollup/plugin-json@6.1.0(rollup@4.9.5): + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + rollup: 4.9.5 + dev: false + /@rollup/plugin-node-resolve@15.2.1(rollup@3.28.1): resolution: {integrity: sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==} engines: {node: '>=14.0.0'} @@ -3864,6 +3866,51 @@ packages: resolve: 1.22.4 rollup: 3.28.1 + /@rollup/plugin-node-resolve@15.2.3(rollup@4.9.5): + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.4 + rollup: 4.9.5 + dev: false + + /@rollup/plugin-replace@5.0.5(rollup@4.9.5): + resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + magic-string: 0.30.3 + rollup: 4.9.5 + dev: false + + /@rollup/plugin-wasm@6.2.2(rollup@4.9.5): + resolution: {integrity: sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + rollup: 4.9.5 + dev: false + /@rollup/pluginutils@5.0.4(rollup@3.28.1): resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} engines: {node: '>=14.0.0'} @@ -3878,6 +3925,125 @@ packages: picomatch: 2.3.1 rollup: 3.28.1 + /@rollup/pluginutils@5.1.0(rollup@4.9.5): + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.1 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 4.9.5 + dev: false + + /@rollup/rollup-android-arm-eabi@4.9.5: + resolution: {integrity: sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-android-arm64@4.9.5: + resolution: {integrity: sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-darwin-arm64@4.9.5: + resolution: {integrity: sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-darwin-x64@4.9.5: + resolution: {integrity: sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.5: + resolution: {integrity: sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.5: + resolution: {integrity: sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.5: + resolution: {integrity: sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.5: + resolution: {integrity: sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.5: + resolution: {integrity: sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.5: + resolution: {integrity: sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.5: + resolution: {integrity: sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.5: + resolution: {integrity: sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.5: + resolution: {integrity: sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@rushstack/eslint-patch@1.3.3: resolution: {integrity: sha512-0xd7qez0AQ+MbHatZTlI1gu5vkG8r7MYRUJAHPAHJBmGLs16zpkrpAVLvjQKQOqaXPDUBwOiJzNc00znHSCVBw==} dev: true @@ -3912,6 +4078,14 @@ packages: dependencies: solid-js: 1.7.11 + /@swc/core-darwin-arm64@1.3.102: + resolution: {integrity: sha512-CJDxA5Wd2cUMULj3bjx4GEoiYyyiyL8oIOu4Nhrs9X+tlg8DnkCm4nI57RJGP8Mf6BaXPIJkHX8yjcefK2RlDA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + /@swc/core-darwin-arm64@1.3.85: resolution: {integrity: sha512-jTikp+i4nO4Ofe6qGm4I3sFeebD1OvueBCHITux5tQKD6umN1c2z4CRGv6K49NIz/qEpUcdr6Qny6K+3yibVFQ==} engines: {node: '>=10'} @@ -3921,6 +4095,14 @@ packages: dev: true optional: true + /@swc/core-darwin-x64@1.3.102: + resolution: {integrity: sha512-X5akDkHwk6oAer49oER0qZMjNMkLH3IOZaV1m98uXIasAGyjo5WH1MKPeMLY1sY6V6TrufzwiSwD4ds571ytcg==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + /@swc/core-darwin-x64@1.3.85: resolution: {integrity: sha512-3uHYkjVU+2F+YbVYtq5rH0uCJIztFTALaS3mQEfQUZKXZ5/8jD5titTCRqFKtSlQg0CzaFZgsYsuqwYBmgN0mA==} engines: {node: '>=10'} @@ -3930,6 +4112,14 @@ packages: dev: true optional: true + /@swc/core-linux-arm-gnueabihf@1.3.102: + resolution: {integrity: sha512-kJH3XtZP9YQdjq/wYVBeFuiVQl4HaC4WwRrIxAHwe2OyvrwUI43dpW3LpxSggBnxXcVCXYWf36sTnv8S75o2Gw==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + /@swc/core-linux-arm-gnueabihf@1.3.85: resolution: {integrity: sha512-ouHzAHsFaEOkRuoTAOI/8n2m8BQAAnb4vr/xbMhhDOmix0lp5eNsW5Iac/EcJ2uG6B3n7P2K8oycj9SWkj+pfw==} engines: {node: '>=10'} @@ -3939,6 +4129,14 @@ packages: dev: true optional: true + /@swc/core-linux-arm64-gnu@1.3.102: + resolution: {integrity: sha512-flQP2WDyCgO24WmKA1wjjTx+xfCmavUete2Kp6yrM+631IHLGnr17eu7rYJ/d4EnDBId/ytMyrnWbTVkaVrpbQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@swc/core-linux-arm64-gnu@1.3.85: resolution: {integrity: sha512-/Z1CZOWiO+NqJEh1J20PIxQFHMH43upQJ1l7FJ5Z7+MyuYF8WkeJ7OSovau729pBR+38vvvccEJrMZIztfv7hQ==} engines: {node: '>=10'} @@ -3948,6 +4146,14 @@ packages: dev: true optional: true + /@swc/core-linux-arm64-musl@1.3.102: + resolution: {integrity: sha512-bQEQSnC44DyoIGLw1+fNXKVGoCHi7eJOHr8BdH0y1ooy9ArskMjwobBFae3GX4T1AfnrTaejyr0FvLYIb0Zkog==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@swc/core-linux-arm64-musl@1.3.85: resolution: {integrity: sha512-gfh7CfKavi076dbMBTzfdawSGcYfZ4+1Q+8aRkSesqepKHcIWIJti8Cf3zB4a6CHNhJe+VN0Gb7DEfumydAm1w==} engines: {node: '>=10'} @@ -3957,6 +4163,14 @@ packages: dev: true optional: true + /@swc/core-linux-x64-gnu@1.3.102: + resolution: {integrity: sha512-dFvnhpI478svQSxqISMt00MKTDS0e4YtIr+ioZDG/uJ/q+RpcNy3QI2KMm05Fsc8Y0d4krVtvCKWgfUMsJZXAg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@swc/core-linux-x64-gnu@1.3.85: resolution: {integrity: sha512-lWVqjHKzofb9q1qrBM4dLqO7CIisp08/xMS5Hz9DWex1gTc5F2b6yJO6Ceqwa256GMweJcdP6A5EvEFQAiZ5dg==} engines: {node: '>=10'} @@ -3966,6 +4180,14 @@ packages: dev: true optional: true + /@swc/core-linux-x64-musl@1.3.102: + resolution: {integrity: sha512-+a0M3CvjeIRNA/jTCzWEDh2V+mhKGvLreHOL7J97oULZy5yg4gf7h8lQX9J8t9QLbf6fsk+0F8bVH1Ie/PbXjA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@swc/core-linux-x64-musl@1.3.85: resolution: {integrity: sha512-EPJmlfqC05TUetnlErxNRyIp7Nc3B2w9abET6oQ/EgldeAeQnZ3M6svMViET/c2QSomgrU3rdP+Qcozkt62/4A==} engines: {node: '>=10'} @@ -3975,6 +4197,14 @@ packages: dev: true optional: true + /@swc/core-win32-arm64-msvc@1.3.102: + resolution: {integrity: sha512-w76JWLjkZNOfkB25nqdWUNCbt0zJ41CnWrJPZ+LxEai3zAnb2YtgB/cCIrwxDebRuMgE9EJXRj7gDDaTEAMOOQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + /@swc/core-win32-arm64-msvc@1.3.85: resolution: {integrity: sha512-ibckJDZw8kNosciMexwk0z75ZyUhwtiFMV9rSBpup0opa7NNCUCoERCJ1e9LRyMdhsVUoLpZg/KZiHCdTw96hQ==} engines: {node: '>=10'} @@ -3984,6 +4214,14 @@ packages: dev: true optional: true + /@swc/core-win32-ia32-msvc@1.3.102: + resolution: {integrity: sha512-vlDb09HiGqKwz+2cxDS9T5/461ipUQBplvuhW+cCbzzGuPq8lll2xeyZU0N1E4Sz3MVdSPx1tJREuRvlQjrwNg==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + /@swc/core-win32-ia32-msvc@1.3.85: resolution: {integrity: sha512-hY4MpHGUVQHL1T2kgRXOigDho4DTIpVPYzJ4uyy8VQRbS7GzN5XtvdGP/fA4zp8+2BQjcig+6J7Y92SY15ouNQ==} engines: {node: '>=10'} @@ -3993,6 +4231,14 @@ packages: dev: true optional: true + /@swc/core-win32-x64-msvc@1.3.102: + resolution: {integrity: sha512-E/jfSD7sShllxBwwgDPeXp1UxvIqehj/ShSUqq1pjR/IDRXngcRSXKJK92mJkNFY7suH6BcCWwzrxZgkO7sWmw==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@swc/core-win32-x64-msvc@1.3.85: resolution: {integrity: sha512-ktxWOMFJ0iqKn6WUHtXqi4CS7xkyHmrRtjllGRuGqxmLmDX/HSOfuQ55Tm1KXKk5oHLacJkUbOSF2kBrpZ8dpg==} engines: {node: '>=10'} @@ -4002,6 +4248,31 @@ packages: dev: true optional: true + /@swc/core@1.3.102(@swc/helpers@0.5.3): + resolution: {integrity: sha512-OAjNLY/f6QWKSDzaM3bk31A+OYHu6cPa9P/rFIx8X5d24tHXUpRiiq6/PYI6SQRjUPlB72GjsjoEU8F+ALadHg==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/counter': 0.1.2 + '@swc/helpers': 0.5.3 + '@swc/types': 0.1.5 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.102 + '@swc/core-darwin-x64': 1.3.102 + '@swc/core-linux-arm-gnueabihf': 1.3.102 + '@swc/core-linux-arm64-gnu': 1.3.102 + '@swc/core-linux-arm64-musl': 1.3.102 + '@swc/core-linux-x64-gnu': 1.3.102 + '@swc/core-linux-x64-musl': 1.3.102 + '@swc/core-win32-arm64-msvc': 1.3.102 + '@swc/core-win32-ia32-msvc': 1.3.102 + '@swc/core-win32-x64-msvc': 1.3.102 + /@swc/core@1.3.85: resolution: {integrity: sha512-qnoxp+2O0GtvRdYnXgR1v8J7iymGGYpx6f6yCK9KxipOZOjrlKILFANYlghQxZyPUfXwK++TFxfSlX4r9wK+kg==} engines: {node: '>=10'} @@ -4026,15 +4297,26 @@ packages: '@swc/core-win32-x64-msvc': 1.3.85 dev: true + /@swc/counter@0.1.2: + resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} + /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} dependencies: tslib: 2.6.2 + /@swc/helpers@0.5.3: + resolution: {integrity: sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==} + dependencies: + tslib: 2.6.2 + /@swc/types@0.1.4: resolution: {integrity: sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==} dev: true + /@swc/types@0.1.5: + resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + /@szmarczak/http-timer@1.1.2: resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} engines: {node: '>=6'} @@ -4191,6 +4473,10 @@ packages: /@types/estree@1.0.1: resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: false + /@types/express-serve-static-core@4.17.36: resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: @@ -4775,7 +5061,6 @@ packages: /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - dev: true /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -5309,6 +5594,38 @@ packages: resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} dev: false + /bunchee@4.3.3(typescript@5.1.6): + resolution: {integrity: sha512-V1IOXXkddDTbf4QuZUYOAKilkAYHfvfU0NU82h7O7yvmUdWbDuP60N970qSdS5118kps8qG9UoshHclHoLq1Pg==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + typescript: ^4.1 || ^5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + typescript: + optional: true + dependencies: + '@rollup/plugin-commonjs': 25.0.7(rollup@4.9.5) + '@rollup/plugin-esm-shim': 0.1.5(rollup@4.9.5) + '@rollup/plugin-json': 6.1.0(rollup@4.9.5) + '@rollup/plugin-node-resolve': 15.2.3(rollup@4.9.5) + '@rollup/plugin-replace': 5.0.5(rollup@4.9.5) + '@rollup/plugin-wasm': 6.2.2(rollup@4.9.5) + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + '@swc/core': 1.3.102(@swc/helpers@0.5.3) + '@swc/helpers': 0.5.3 + arg: 5.0.2 + pretty-bytes: 5.6.0 + publint: 0.2.7 + rollup: 4.9.5 + rollup-plugin-dts: 6.1.0(rollup@4.9.5)(typescript@5.1.6) + rollup-plugin-swc3: 0.11.0(@swc/core@1.3.102)(rollup@4.9.5) + rollup-preserve-directives: 1.1.1(rollup@4.9.5) + tslib: 2.6.2 + typescript: 5.1.6 + dev: false + /bundle-name@3.0.0: resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} engines: {node: '>=12'} @@ -7940,6 +8257,12 @@ packages: dependencies: resolve-pkg-maps: 1.0.0 + /get-tsconfig@4.7.2: + resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: false + /git-up@7.0.0: resolution: {integrity: sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==} dependencies: @@ -8451,6 +8774,13 @@ packages: /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + /ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minimatch: 5.1.6 + dev: false + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -9240,6 +9570,13 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: false + /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -10331,6 +10668,29 @@ packages: engines: {node: '>=8'} dev: false + /npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + npm-normalize-package-bin: 2.0.0 + dev: false + + /npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dev: false + + /npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + dev: false + /npm-run-path@2.0.2: resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} engines: {node: '>=4'} @@ -10994,6 +11354,11 @@ packages: hasBin: true dev: false + /pretty-bytes@5.6.0: + resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} + engines: {node: '>=6'} + dev: false + /pretty-format@27.5.1: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -11049,6 +11414,16 @@ packages: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: false + /publint@0.2.7: + resolution: {integrity: sha512-tLU4ee3110BxWfAmCZggJmCUnYWgPTr0QLnx08sqpLYa8JHRiOudd+CgzdpfU5x5eOaW2WMkpmOrFshRFYK7Mw==} + engines: {node: '>=16'} + hasBin: true + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.0.0 + sade: 1.8.1 + dev: false + /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -11557,6 +11932,35 @@ packages: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} dev: false + /rollup-plugin-dts@6.1.0(rollup@4.9.5)(typescript@5.1.6): + resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} + engines: {node: '>=16'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 + dependencies: + magic-string: 0.30.5 + rollup: 4.9.5 + typescript: 5.1.6 + optionalDependencies: + '@babel/code-frame': 7.22.13 + dev: false + + /rollup-plugin-swc3@0.11.0(@swc/core@1.3.102)(rollup@4.9.5): + resolution: {integrity: sha512-luB9Ngb1YieWPpJttKvkmjN3lG5l28SmASLbf2CoScUB2+EImU0bE8wX4EYKEqv5clVulhWRQHQvE+H33X/03g==} + engines: {node: '>=12'} + peerDependencies: + '@swc/core': '>=1.2.165' + rollup: ^2.0.0 || ^3.0.0 || ^4.0.0 + dependencies: + '@fastify/deepmerge': 1.3.0 + '@rollup/pluginutils': 5.1.0(rollup@4.9.5) + '@swc/core': 1.3.102(@swc/helpers@0.5.3) + get-tsconfig: 4.7.2 + rollup: 4.9.5 + rollup-preserve-directives: 1.1.1(rollup@4.9.5) + dev: false + /rollup-plugin-visualizer@5.9.2(rollup@3.28.1): resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} @@ -11573,6 +11977,15 @@ packages: source-map: 0.7.4 yargs: 17.7.2 + /rollup-preserve-directives@1.1.1(rollup@4.9.5): + resolution: {integrity: sha512-+eQafbuEfDPfxQ9hQPlwaROfin4yiVRxap8hnrvvvcSGoukv1tTiYpAW9mvm3uR8J+fe4xd8FdVd5rz9q7jZ+Q==} + peerDependencies: + rollup: ^2.0.0 || ^3.0.0 || ^4.0.0 + dependencies: + magic-string: 0.30.5 + rollup: 4.9.5 + dev: false + /rollup-route-manifest@1.0.0(rollup@3.28.1): resolution: {integrity: sha512-3CmcMmCLAzJDUXiO3z6386/Pt8/k9xTZv8gIHyXI8hYGoAInnYdOsFXiGGzQRMy6TXR1jUZme2qbdwjH2nFMjg==} engines: {node: '>=8'} @@ -11589,6 +12002,29 @@ packages: optionalDependencies: fsevents: 2.3.2 + /rollup@4.9.5: + resolution: {integrity: sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.5 + '@rollup/rollup-android-arm64': 4.9.5 + '@rollup/rollup-darwin-arm64': 4.9.5 + '@rollup/rollup-darwin-x64': 4.9.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.5 + '@rollup/rollup-linux-arm64-gnu': 4.9.5 + '@rollup/rollup-linux-arm64-musl': 4.9.5 + '@rollup/rollup-linux-riscv64-gnu': 4.9.5 + '@rollup/rollup-linux-x64-gnu': 4.9.5 + '@rollup/rollup-linux-x64-musl': 4.9.5 + '@rollup/rollup-win32-arm64-msvc': 4.9.5 + '@rollup/rollup-win32-ia32-msvc': 4.9.5 + '@rollup/rollup-win32-x64-msvc': 4.9.5 + fsevents: 2.3.2 + dev: false + /route-sort@1.0.0: resolution: {integrity: sha512-SFgmvjoIhp5S4iBEDW3XnbT+7PRuZ55oRuNjY+CDB1SGZkyCG9bqQ3/dhaZTctTBYMAvDxd2Uy9dStuaUfgJqQ==} engines: {node: '>= 6'} @@ -12729,7 +13165,7 @@ packages: tsup: ^6.5.0 dependencies: esbuild-plugin-solid: 0.5.0(esbuild@0.19.2)(solid-js@1.7.11) - tsup: 6.7.0(postcss@8.4.31)(typescript@5.1.6) + tsup: 6.7.0(@swc/core@1.3.102)(postcss@8.4.31)(typescript@5.1.6) type-fest: 3.11.1 transitivePeerDependencies: - esbuild @@ -12737,7 +13173,7 @@ packages: - supports-color dev: true - /tsup@6.7.0(postcss@8.4.31)(typescript@5.1.6): + /tsup@6.7.0(@swc/core@1.3.102)(postcss@8.4.31)(typescript@5.1.6): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -12753,6 +13189,7 @@ packages: typescript: optional: true dependencies: + '@swc/core': 1.3.102(@swc/helpers@0.5.3) bundle-require: 4.0.1(esbuild@0.17.19) cac: 6.7.14 chokidar: 3.5.3 From 18c4b9c83fa42d38b91afc997037b6ae1dc23900 Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Sat, 13 Jan 2024 11:01:58 +0100 Subject: [PATCH 2/7] rm unused --- packages/uploadthing/src/internal/types.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/uploadthing/src/internal/types.ts b/packages/uploadthing/src/internal/types.ts index 649fefcbda..98011350e2 100644 --- a/packages/uploadthing/src/internal/types.ts +++ b/packages/uploadthing/src/internal/types.ts @@ -38,8 +38,6 @@ type ResolverOptions = { file: UploadedFile; }; -export type AnyRuntime = "app" | "pages" | "web" | "express" | "fastify" | "h3"; - export type MiddlewareFnArgs = { req: TRequest; res: TResponse; From 6ec3eb9f21fd6e70ed9ec3c1f07d4b4fb695bc25 Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Sat, 13 Jan 2024 12:34:17 +0100 Subject: [PATCH 3/7] seems to work? --- packages/config/tsconfig/base.json | 35 +++++--- packages/dropzone/package.json | 20 ++++- packages/mime-types/package.json | 6 +- packages/react/package.json | 6 +- packages/react/src/useUploadThing.ts | 2 +- packages/react/tsconfig.json | 16 +--- packages/shared/package.json | 4 +- packages/uploadthing/package.json | 118 ++++++--------------------- packages/uploadthing/tsconfig.json | 22 +---- 9 files changed, 77 insertions(+), 152 deletions(-) diff --git a/packages/config/tsconfig/base.json b/packages/config/tsconfig/base.json index d72a9f3a27..9e9b47568e 100644 --- a/packages/config/tsconfig/base.json +++ b/packages/config/tsconfig/base.json @@ -1,20 +1,33 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "display": "Default", "compilerOptions": { - "composite": false, + "target": "ES2020", + "lib": ["DOM", "DOM.Iterable", "ES2020"], + "module": "ESNext", + "moduleResolution": "Bundler", + "resolveJsonModule": true, + "allowJs": true, + "checkJs": true, + + "noEmit": true, "declaration": true, "declarationMap": true, + "sourceMap": true, + "removeComments": true, + + "strict": true, + // "noFallthroughCasesInSwitch": true, + // "noImplicitOverride": true, + // "noImplicitReturns": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "useUnknownInCatchVariables": true, + // "noUncheckedIndexedAccess": true, + + "allowSyntheticDefaultImports": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "inlineSources": false, - "isolatedModules": true, - "moduleResolution": "node", - "noUnusedLocals": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, "skipLibCheck": true, - "strict": true - }, - "exclude": ["node_modules"] + "useDefineForClassFields": true + } } diff --git a/packages/dropzone/package.json b/packages/dropzone/package.json index 4409c089c1..f4ece8c2d1 100644 --- a/packages/dropzone/package.json +++ b/packages/dropzone/package.json @@ -7,17 +7,17 @@ "./core": { "types": "./dist/core.d.ts", "import": "./dist/core.mjs", - "require": "./dist/core.js" + "require": "./dist/core.cjs" }, "./solid": { "types": "./dist/solid.d.ts", "import": "./dist/solid.mjs", - "require": "./dist/solid.js" + "require": "./dist/solid.cjs" }, "./react": { "types": "./dist/react.d.ts", "import": "./dist/react.mjs", - "require": "./dist/react.js" + "require": "./dist/react.cjs" } }, "files": [ @@ -35,7 +35,7 @@ }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "bunchee", + "build": "rm -rf dist && bunchee", "clean": "git clean -xdf dist node_modules", "dev": "bunchee -w", "typecheck": "tsc --noEmit" @@ -53,6 +53,18 @@ "solid-js": "^1.7.11", "typescript": "^5.1.6" }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "solid-js": "^1.7.11" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "solid-js": { + "optional": true + } + }, "eslintConfig": { "root": true, "extends": [ diff --git a/packages/mime-types/package.json b/packages/mime-types/package.json index 975ccc2ec7..4a55e4c862 100644 --- a/packages/mime-types/package.json +++ b/packages/mime-types/package.json @@ -7,12 +7,12 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": "./dist/index.cjs" }, "./db": { "types": "./dist/db.d.ts", "import": "./dist/db.mjs", - "require": "./dist/db.js" + "require": "./dist/db.cjs" } }, "typesVersions": { @@ -27,7 +27,7 @@ ], "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "bunchee", + "build": "rm -rf dist && bunchee", "clean": "git clean -xdf dist node_modules", "dev": "bunchee -w", "typecheck": "tsc --noEmit" diff --git a/packages/react/package.json b/packages/react/package.json index aca6649288..0150e0dc20 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -8,17 +8,17 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": "./dist/index.cjs" }, "./hooks": { "types": "./dist/hooks.d.ts", "import": "./dist/hooks.mjs", - "require": "./dist/hooks.js" + "require": "./dist/hooks.cjs" }, "./next-ssr-plugin": { "types": "./dist/next-ssr-plugin.d.ts", "import": "./dist/next-ssr-plugin.mjs", - "require": "./dist/next-ssr-plugin.js" + "require": "./dist/next-ssr-plugin.cjs" } }, "files": [ diff --git a/packages/react/src/useUploadThing.ts b/packages/react/src/useUploadThing.ts index fb0d2645fc..f782513c61 100644 --- a/packages/react/src/useUploadThing.ts +++ b/packages/react/src/useUploadThing.ts @@ -164,7 +164,7 @@ export const generateReactHelpers = (initOpts?: { DANGEROUS__uploadFiles(endpoint, { ...opts, url, - }), + } as any), } as const; }; diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index b224717068..565c29bd78 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -1,20 +1,6 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Default", + "extends": "@uploadthing/tsconfig/base.json", "compilerOptions": { - "composite": false, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "inlineSources": false, - "isolatedModules": true, - "moduleResolution": "node", - "noUnusedLocals": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, - "skipLibCheck": true, - "strict": true, "jsx": "react-jsx" }, "include": ["src/**/*", "*.ts", "test"], diff --git a/packages/shared/package.json b/packages/shared/package.json index 29a1597f5c..553e6cf7c1 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -7,7 +7,7 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": "./dist/index.cjs" } }, "files": [ @@ -25,7 +25,7 @@ }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "bunchee", + "build": "rm -rf dist && bunchee", "clean": "git clean -xdf dist node_modules", "dev": "bunchee -w", "typecheck": "tsc --noEmit" diff --git a/packages/uploadthing/package.json b/packages/uploadthing/package.json index 75fde4d618..2e46dfd29e 100644 --- a/packages/uploadthing/package.json +++ b/packages/uploadthing/package.json @@ -8,84 +8,44 @@ "exports": { "./package.json": "./package.json", "./client": { - "import": { - "types": "./dist/client.d.mts", - "default": "./dist/client.mjs" - }, - "require": { - "types": "./dist/client.d.cts", - "default": "./dist/client.cjs" - } + "types": "./dist/client.d.ts", + "import": "./dist/client.mjs", + "require": "./dist/client.cjs" }, "./server": { - "import": { - "types": "./dist/server.d.mts", - "default": "./dist/server.mjs" - }, - "require": { - "types": "./dist/server.d.cts", - "default": "./dist/server.cjs" - } + "types": "./dist/server.d.ts", + "import": "./dist/server.mjs", + "require": "./dist/server.cjs" }, "./next": { - "import": { - "types": "./dist/next.d.mts", - "default": "./dist/next.mjs" - }, - "require": { - "types": "./dist/next.d.cts", - "default": "./dist/next.cjs" - } + "types": "./dist/next.d.ts", + "import": "./dist/next.mjs", + "require": "./dist/next.cjs" }, "./next-legacy": { - "import": { - "types": "./dist/next-legacy.d.mts", - "default": "./dist/next-legacy.mjs" - }, - "require": { - "types": "./dist/next-legacy.d.cts", - "default": "./dist/next-legacy.cjs" - } + "types": "./dist/next-legacy.d.ts", + "import": "./dist/next-legacy.mjs", + "require": "./dist/next-legacy.cjs" }, "./express": { - "import": { - "types": "./dist/express.d.mts", - "default": "./dist/express.mjs" - }, - "require": { - "types": "./dist/express.d.cts", - "default": "./dist/express.cjs" - } + "types": "./dist/express.d.ts", + "import": "./dist/express.mjs", + "require": "./dist/express.cjs" }, "./tw": { - "import": { - "types": "./dist/tw.d.mts", - "default": "./dist/tw.mjs" - }, - "require": { - "types": "./dist/tw.d.cts", - "default": "./dist/tw.cjs" - } + "types": "./dist/tw.d.ts", + "import": "./dist/tw.mjs", + "require": "./dist/tw.cjs" }, "./fastify": { - "import": { - "types": "./dist/fastify.d.mts", - "default": "./dist/fastify.mjs" - }, - "require": { - "types": "./dist/fastify.d.cts", - "default": "./dist/fastify.cjs" - } + "types": "./dist/fastify.d.ts", + "import": "./dist/fastify.mjs", + "require": "./dist/fastify.cjs" }, "./h3": { - "import": { - "types": "./dist/h3.d.mts", - "default": "./dist/h3.mjs" - }, - "require": { - "types": "./dist/h3.d.cts", - "default": "./dist/h3.cjs" - } + "types": "./dist/h3.d.ts", + "import": "./dist/h3.mjs", + "require": "./dist/h3.cjs" }, "./internal/types": { "types": "./dist/internal/types.d.ts", @@ -98,37 +58,9 @@ "publishConfig": { "access": "public" }, - "typesVersions": { - "*": { - "client": [ - "dist/client.d.ts" - ], - "server": [ - "dist/server.d.ts" - ], - "next": [ - "dist/next.d.ts" - ], - "next-legacy": [ - "dist/next-legacy.d.ts" - ], - "tw": [ - "dist/tw.d.ts" - ], - "express": [ - "dist/express.d.ts" - ], - "fastify": [ - "dist/fastify.d.ts" - ], - "h3": [ - "dist/h3.d.ts" - ] - } - }, "scripts": { "lint": "eslint \"**/*.{ts,tsx}\" --max-warnings 0", - "build": "bunchee", + "build": "rm -rf dist && bunchee", "clean": "git clean -xdf dist node_modules", "dev": "bunchee -w", "test": "vitest run", diff --git a/packages/uploadthing/tsconfig.json b/packages/uploadthing/tsconfig.json index 5677f1e1c8..e4b9f6d570 100644 --- a/packages/uploadthing/tsconfig.json +++ b/packages/uploadthing/tsconfig.json @@ -1,22 +1,4 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Default", - "compilerOptions": { - "composite": false, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "inlineSources": false, - "isolatedModules": true, - "moduleResolution": "node", - "noUnusedLocals": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, - "skipLibCheck": true, - "strict": true - }, - "include": ["src/**/*", "*.ts", "test/**/*"], - "exclude": ["node_modules"] + "extends": "@uploadthing/tsconfig/base.json", + "include": ["**/*.ts", "**/*.tsx"] } From 804aaead7d72439c33f08d795107a32e15acf8cc Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Fri, 19 Jan 2024 13:52:07 +0100 Subject: [PATCH 4/7] fix build --- packages/config/tsconfig/base.json | 11 +++-------- packages/shared/src/utils.ts | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/config/tsconfig/base.json b/packages/config/tsconfig/base.json index 9e9b47568e..69f08ad8d6 100644 --- a/packages/config/tsconfig/base.json +++ b/packages/config/tsconfig/base.json @@ -12,10 +12,10 @@ "noEmit": true, "declaration": true, "declarationMap": true, - "sourceMap": true, - "removeComments": true, + "skipLibCheck": true, "strict": true, + "noImplicitAny": false, // "noFallthroughCasesInSwitch": true, // "noImplicitOverride": true, // "noImplicitReturns": true, @@ -23,11 +23,6 @@ // "noUnusedParameters": true, // "useUnknownInCatchVariables": true, // "noUncheckedIndexedAccess": true, - - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true, - "useDefineForClassFields": true + } } diff --git a/packages/shared/src/utils.ts b/packages/shared/src/utils.ts index 91e8aa5ae7..8e3a733c98 100644 --- a/packages/shared/src/utils.ts +++ b/packages/shared/src/utils.ts @@ -137,7 +137,7 @@ export const withExponentialBackoff = async ( let backoffMs = 500; let backoffFuzzMs = 0; - let result = undefined; + let result: Awaited | undefined = undefined; while (tries <= MAX_RETRIES) { result = await doTheThing(); if (result !== undefined) return result; From e79693629a9a9daf1dbce474e625b8596c53bd44 Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Fri, 19 Jan 2024 13:53:16 +0100 Subject: [PATCH 5/7] resolve mimetypes in tests --- packages/react/vitest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/vitest.config.ts b/packages/react/vitest.config.ts index 98effcf129..99fb88fcc8 100644 --- a/packages/react/vitest.config.ts +++ b/packages/react/vitest.config.ts @@ -5,6 +5,7 @@ export default defineConfig({ test: {}, resolve: { alias: { + "@uploadthing/mime-types/db": join(__dirname, "../mime-types/src/db"), "uploadthing/server": join(__dirname, "../uploadthing/src/server"), "uploadthing/client": join(__dirname, "../uploadthing/src/client"), }, From 97e85280657aa9dfb888f4354476e77af0dfe1cf Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Fri, 19 Jan 2024 13:55:38 +0100 Subject: [PATCH 6/7] fmt --- packages/config/tsconfig/base.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/config/tsconfig/base.json b/packages/config/tsconfig/base.json index 69f08ad8d6..a44af10bdc 100644 --- a/packages/config/tsconfig/base.json +++ b/packages/config/tsconfig/base.json @@ -15,7 +15,7 @@ "skipLibCheck": true, "strict": true, - "noImplicitAny": false, + "noImplicitAny": false // "noFallthroughCasesInSwitch": true, // "noImplicitOverride": true, // "noImplicitReturns": true, @@ -23,6 +23,5 @@ // "noUnusedParameters": true, // "useUnknownInCatchVariables": true, // "noUncheckedIndexedAccess": true, - } } From 0b7560973fb8fc6330932d9570f9dcca27b9cb8d Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Fri, 19 Jan 2024 13:56:37 +0100 Subject: [PATCH 7/7] fix --- packages/solid/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/solid/tsconfig.json b/packages/solid/tsconfig.json index 008ff91eb3..c63594daba 100644 --- a/packages/solid/tsconfig.json +++ b/packages/solid/tsconfig.json @@ -13,7 +13,7 @@ "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "moduleResolution": "node", + "moduleResolution": "Bundler", "jsx": "preserve", "jsxImportSource": "solid-js", "esModuleInterop": true,