Skip to content

Commit

Permalink
Merge branch 'main' into without-dropzone-package
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Jan 4, 2025
2 parents d1291ff + e14e353 commit d88e8a3
Show file tree
Hide file tree
Showing 239 changed files with 9,516 additions and 10,609 deletions.
6 changes: 0 additions & 6 deletions .changeset/healthy-experts-exist.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/modern-numbers-cough.md

This file was deleted.

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
5 changes: 0 additions & 5 deletions .changeset/odd-icons-pretend.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rude-pumas-explode.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/six-dodos-brush.md

This file was deleted.

7 changes: 6 additions & 1 deletion .github/release-canary.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ async function version() {

// Update dependencies
for (const dep in pkg.dependencies) {
if (versions[dep]) {
if (versions[dep] && pkg.dependencies[dep].startsWith("workspace:")) {
pkg.dependencies[dep] = versions[dep];
}
}
for (const dep in pkg.peerDependencies) {
if (versions[dep] && pkg.peerDependencies[dep].startsWith("workspace:")) {
pkg.peerDependencies[dep] = versions[dep];
}
}

const fmt = prettier.format(JSON.stringify(pkg), { filepath: pkgJsonPath });
fs.writeFileSync(pkgJsonPath, fmt);
Expand Down
10 changes: 7 additions & 3 deletions .github/replace-workspace-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,21 @@ await Promise.all(
const workspacePkg = await Bun.file("package.json").json();
for (const dep in workspacePkg.dependencies) {
if (dep in packageVersions) {
workspacePkg.dependencies[dep] = packageVersions[dep];
if (workspacePkg.dependencies[dep].startsWith("workspace:")) {
workspacePkg.dependencies[dep] = packageVersions[dep];
}
}
}
for (const dep in workspacePkg.peerDependencies) {
if (dep in packageVersions) {
if (
dep in packageVersions &&
workspacePkg.peerDependencies[dep].startsWith("workspace:")
) {
workspacePkg.peerDependencies[dep] = packageVersions[dep];
}
}

// 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@
"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"
},
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#a21d1d",
"titleBar.activeForeground": "#FFF0F0",
"titleBar.inactiveBackground": "#612121",
"titleBar.inactiveForeground": "#f5a5a5"
}
}
34 changes: 13 additions & 21 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@
"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",
"@headlessui/react": "^2.2.0",
"@headlessui/tailwindcss": "^0.2.1",
"@heroicons/react": "^2.2.0",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.11",
"@scalar/api-reference-react": "^0.3.37",
"@next/mdx": "^15.1.3",
"@scalar/api-reference-react": "^0.4.8",
"@shikijs/transformers": "^1.17.5",
"@sindresorhus/slugify": "^2.1.1",
"@tailwindcss/typography": "^0.5.10",
"@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.19",
"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",
Expand All @@ -49,24 +49,16 @@
"remark-gfm": "^4.0.0",
"remark-mdx": "^3.0.1",
"remark-unwrap-images": "^4.0.0",
"sharp": "0.33.1",
"shiki": "^1.17.5",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.4.1",
"typescript": "^5.5.2",
"tailwindcss": "^3.4.16",
"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": "[email protected]"
}
}
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: {},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ApiReferenceReact } from "@scalar/api-reference-react";
import { useTheme } from "next-themes";

const specUrl = "https://api.uploadthing.com/openapi-spec.json";
// const specUrl = "https://api.ut-staging.com/openapi-spec.json";

const useMutationObserver = (
ref: RefObject<HTMLElement>,
Expand Down
8 changes: 4 additions & 4 deletions docs/src/app/(docs)/api-reference/server/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ Environment variables follows the naming convention of `UPLOADTHING_<NAME>`

<Properties>
<Property name="callbackUrl" type="string" since="6.0">
The URL to where your route handler is hosted. This is called via webhook
after your file is uploaded. UploadThing attempts to automatically detect
this value based on the request URL and headers. You can override this if
the automatic detection fails.
The full, absolute URL to where your route handler is hosted. This is called
via webhook after your file is uploaded. UploadThing attempts to
automatically detect this value based on the request URL and headers. You
can override this if the automatic detection fails.
</Property>
<Property
name="token"
Expand Down
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
5 changes: 0 additions & 5 deletions docs/src/app/(docs)/concepts/regions-acl/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ dashboard. Under `Regions and ACL`, you can select the ACL you want to use as
default. You may also toggle the ability to override the default ACL on a
per-request basis.

<Note>
Private files are currently only available on regions other than the default
(`AWS us-west-2`).
</Note>

![Access control settings](@/images/acl-settings.png)

### Using signed URLs
Expand Down
6 changes: 3 additions & 3 deletions docs/src/app/(docs)/faq/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ your app would not be reachable by the callback:
In this case, you can use a tool like [ngrok](https://ngrok.com/) or
[Cloudflare Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/)
to expose your application to the internet. Start the application with the
`UPLOADTHING_URL` variable set to the tunneled URL.
`UPLOADTHING_CALLBACK_URL` variable set to the tunneled URL.

#### Your app is running behind a reverse proxy such as Nginx.

The automatic URL inference unfortunately breaks for certain reverse proxy
setups. In this case, set either the
[`config.callbackUrl`](/api-reference/server#config) when you're creating the
server entrypoints or the `UPLOADTHING_URL` environment variable to the public
URL of your application.
server entrypoints or the `UPLOADTHING_CALLBACK_URL` environment variable to the
public URL of your application.

You will get a warning in the console if we detect a localhost URL is being used
as the callback URL in production.
Expand Down
Loading

0 comments on commit d88e8a3

Please sign in to comment.