Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-formData-bug-in-rn
Browse files Browse the repository at this point in the history
  • Loading branch information
shashkovdanil committed Jan 5, 2025
2 parents d209425 + a1a1cf4 commit 7c85147
Show file tree
Hide file tree
Showing 243 changed files with 13,375 additions and 16,880 deletions.
10 changes: 10 additions & 0 deletions .changeset/nice-penguins-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"uploadthing": minor
"@uploadthing/svelte": minor
"@uploadthing/react": minor
"@uploadthing/solid": minor
"@uploadthing/expo": minor
"@uploadthing/vue": minor
---

feat: allow custom fetch override
1 change: 0 additions & 1 deletion .github/replace-workspace-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ for (const dep in workspacePkg.peerDependencies) {
}

// Remove unnecessary fields
workspacePkg.eslintConfig = undefined;
workspacePkg.devDependencies = undefined;
workspacePkg.scripts = undefined;

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:

- name: Build
run: pnpm turbo build --filter "./packages/*"

- name: Install Playwright
run: pnpm exec playwright install chromium

- name: Test
run: pnpm run test
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pkg-pr-new.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Publish Test Releases
on: [push, pull_request]

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ node_modules
# testing
coverage

# astro
.astro

# next.js
.next/
out/
Expand All @@ -26,6 +29,7 @@ expo-env.d.ts
.data
.idea
*.db
*.timestamp_*

# debug
npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11
22.12
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ yarn-error.log*

CHANGELOG.md

.astro
.svelte-kit
.solid
.nuxt
.output

routeTree.gen.ts

pnpm-lock.yaml
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"eslint.workingDirectories": [
"docs",
{ "pattern": "./packages/**" },
{ "pattern": "./examples/**" }
{ "pattern": "./examples/**" },
{ "pattern": "./tooling/**" },
{ "pattern": "./playground/**" },
{ "pattern": "./playground-v6/**" }
],
"eslint.useFlatConfig": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
Expand Down
52 changes: 22 additions & 30 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,54 @@
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.17.4",
"@headlessui/react": "^2.1.8",
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.1.3",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.11",
"@scalar/api-reference-react": "^0.3.37",
"@algolia/autocomplete-core": "^1.17.8",
"@headlessui/react": "^2.2.0",
"@headlessui/tailwindcss": "^0.2.1",
"@heroicons/react": "^2.2.0",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^15.1.3",
"@scalar/api-reference-react": "^0.4.8",
"@shikijs/transformers": "^1.26.1",
"@sindresorhus/slugify": "^2.1.1",
"@tailwindcss/typography": "^0.5.10",
"@tailwindcss/typography": "^0.5.15",
"@types/mdast": "^4.0.4",
"@types/mdx": "^2.0.13",
"@types/node": "^20.14.0",
"@types/node": "^22.10.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/react-highlight-words": "^0.20.0",
"@uploadthing/react": "workspace:*",
"acorn": "^8.12.1",
"autoprefixer": "^10.4.20",
"clsx": "^2.1.0",
"fast-glob": "^3.3.2",
"flexsearch": "^0.7.43",
"framer-motion": "^11.5.4",
"mdast-util-to-string": "^4.0.0",
"mdx-annotations": "^0.1.4",
"next": "14.2.11",
"motion": "^12.0.0-alpha.2",
"next": "15.1.3",
"next-sitemap": "^4.2.3",
"next-themes": "^0.3.0",
"next-view-transitions": "^0.3.0",
"next-themes": "^0.4.4",
"next-view-transitions": "^0.3.4",
"npm-to-yarn": "^3.0.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-highlight-words": "^0.20.0",
"recma-import-images": "^0.0.3",
"remark": "^15.0.1",
"remark-gfm": "^4.0.0",
"remark-mdx": "^3.0.1",
"remark-mdx": "^3.1.0",
"remark-unwrap-images": "^4.0.0",
"shiki": "^1.17.5",
"sharp": "0.33.5",
"shiki": "^1.26.1",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.4.16",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"unified": "^11.0.5",
"unist-util-filter": "^5.0.1",
"unist-util-visit": "^5.0.0",
"uploadthing": "workspace:*",
"zod": "^3.23.8",
"zustand": "^4.3.2"
},
"devDependencies": {
"@shikijs/transformers": "^1.17.5",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.1",
"prettier": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"sharp": "0.33.1"
},
"packageManager": "pnpm@9.6.0"
"zod": "^3.24.1",
"zustand": "^5.0.2"
}
}
3 changes: 1 addition & 2 deletions docs/postcss.config.cjs → docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
2 changes: 1 addition & 1 deletion docs/src/app/(docs)/client-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LogoBlob, LogoText } from "@/components/Logo";
import { Navigation } from "@/components/Navigation";
import { SectionProvider, type Section } from "@/components/SectionProvider";
import { XMarkIcon } from "@heroicons/react/20/solid";
import { motion } from "framer-motion";
import { motion } from "motion/react";
import { Link } from "next-view-transitions";

const PreviewBanner = (props: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(docs)/getting-started/astro/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const routerConfig = extractRouterConfig(uploadRouter);
(globalThis as any).__UPLOADTHING ??= routerConfig;
---
<script define:vars={{ routerConfig }}>
<script define:vars={{ routerConfig }} is:inline>
/**
* Injecting config to the client. This prevents the client from fetching
* the configuration from the server, since we already have it.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/(docs)/getting-started/nuxt/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ the [File Router API](/file-routes).
`UploadRouter` for the module to pick up your router and it's types.
</Note>

```ts {{ title: "src/lib/server/uploadthing.ts" }}
```ts {{ title: "server/uploadthing.ts" }}
import type { H3Event } from "h3";

import { createUploadthing } from "uploadthing/h3";
Expand Down
7 changes: 1 addition & 6 deletions docs/src/app/blog/_components/layouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ import {
} from "@/components/SectionProvider";
import { type ArticleWithSlug } from "@/lib/articles";
import { formatDate } from "@/lib/utils";
import {
AnimatePresence,
motion,
useScroll,
useTransform,
} from "framer-motion";
import { AnimatePresence, motion, useScroll, useTransform } from "motion/react";
import { Link, useTransitionRouter } from "next-view-transitions";

function ArrowLeftIcon(props: React.ComponentPropsWithoutRef<"svg">) {
Expand Down
7 changes: 4 additions & 3 deletions docs/src/app/blog/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export async function generateStaticParams() {
return allTags.map((tag) => ({ category: tag }));
}

export default function ArticlesIndex(
export default async function ArticlesIndex(
props: Readonly<{
params: { category: string };
params: Promise<{ category: string }>;
}>,
) {
return <ArticlesPage tag={props.params.category} />;
const { category } = await props.params;
return <ArticlesPage tag={category} />;
}
2 changes: 1 addition & 1 deletion docs/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MobileSearch, Search } from "@/components/Search";
import { ThemeToggle } from "@/components/ThemeToggle";
import { socials } from "@/site-config";
import clsx from "clsx";
import { motion, MotionValue, useScroll, useTransform } from "framer-motion";
import { motion, MotionValue, useScroll, useTransform } from "motion/react";
import { Link } from "next-view-transitions";

function TopLevelNavItem({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useRef } from "react";
import { useSectionStore } from "@/components/SectionProvider";
import { Tag, TagColor } from "@/components/Tag";
import { remToPx } from "@/lib/remToPx";
import { useInView } from "framer-motion";
import { useInView } from "motion/react";
import { Link } from "next-view-transitions";

import { AnchorIcon } from "./icons";
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/MobileNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TransitionChild,
} from "@headlessui/react";
import { Bars2Icon, XMarkIcon } from "@heroicons/react/24/outline";
import { motion } from "framer-motion";
import { motion } from "motion/react";
import { create } from "zustand";

const IsInsideMobileNavigationContext = createContext(false);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Tag } from "@/components/Tag";
import { remToPx } from "@/lib/remToPx";
import { NavGroup, navigation } from "@/site-config";
import clsx from "clsx";
import { AnimatePresence, motion, useIsPresent } from "framer-motion";
import { AnimatePresence, motion, useIsPresent } from "motion/react";
import { Link } from "next-view-transitions";

function useInitialValue<T>(value: T, condition = true) {
Expand Down
2 changes: 2 additions & 0 deletions docs/src/mdx/rehype.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function rehypeShiki() {
"bash",
"typescript",
"javascript",
"jsx",
"tsx",
"astro",
"vue",
"svelte",
Expand Down
6 changes: 3 additions & 3 deletions examples/backend-adapters/client-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"devDependencies": {
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"typescript": "^5.5.2",
"vite": "^5.4.8"
"@vitejs/plugin-react-swc": "^3.7.2",
"typescript": "5.7.2",
"vite": "^6.0.7"
}
}
4 changes: 2 additions & 2 deletions examples/backend-adapters/client-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"uploadthing": "7.4.4"
},
"devDependencies": {
"typescript": "^5.5.2",
"vite": "^5.4.8"
"typescript": "5.7.2",
"vite": "^6.0.7"
}
}
6 changes: 3 additions & 3 deletions examples/backend-adapters/client-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"vue": "^3.4.21"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "^5.5.2",
"vite": "^5.4.8",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "5.7.2",
"vite": "^6.0.7",
"vue-tsc": "^2.0.6"
}
}
6 changes: 3 additions & 3 deletions examples/backend-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"test": "playwright test"
},
"dependencies": {
"@playwright/test": "1.45.0",
"@playwright/test": "1.49.1",
"@uploadthing/react": "7.1.5",
"concurrently": "^8.2.2",
"typescript": "^5.5.2",
"concurrently": "^9.1.2",
"typescript": "5.7.2",
"uploadthing": "7.4.4"
}
}
36 changes: 18 additions & 18 deletions examples/backend-adapters/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
"dev:effect": "NODE_ENV=development PORT=3003 tsx watch src/effect-platform.ts"
},
"dependencies": {
"@effect/platform": "0.70.7",
"@effect/platform-node": "0.65.7",
"@elysiajs/cors": "^1.1.1",
"@fastify/cors": "^9.0.1",
"@hono/node-server": "^1.8.2",
"@sinclair/typebox": "^0.34.3",
"@effect/platform": "0.72.0",
"@effect/platform-node": "0.68.0",
"@elysiajs/cors": "^1.2.0",
"@fastify/cors": "^10.0.1",
"@hono/node-server": "^1.13.7",
"@sinclair/typebox": "^0.34.13",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"effect": "3.11.5",
"elysia": "^1.1.16",
"express": "^4.18.2",
"fastify": "^4.26.1",
"h3": "^1.11.1",
"hono": "^4.0.8",
"listhen": "^1.7.2",
"effect": "3.12.0",
"elysia": "^1.2.9",
"express": "^5.0.1",
"fastify": "^5.2.0",
"h3": "^1.13.0",
"hono": "^4.6.15",
"listhen": "^1.9.0",
"uploadthing": "7.4.4"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240620.0",
"@cloudflare/workers-types": "^4.20241230.0",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"tsx": "^4.7.1",
"typescript": "^5.5.2",
"wrangler": "^3.62.0"
"@types/express": "^5.0.0",
"tsx": "^4.19.2",
"typescript": "5.7.2",
"wrangler": "^3.99.0"
}
}
4 changes: 3 additions & 1 deletion examples/backend-adapters/server/src/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import { uploadRouter } from "./router";

const app = express();
app.use(cors());
app.get("/api", (req, res) => res.send("Hello from Express!"));
app.get("/api", (req, res) => {
res.send("Hello from Express!");
});

app.use(
"/api/uploadthing",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-appdir/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading

0 comments on commit 7c85147

Please sign in to comment.