From 946cb99d3051c3982f14740874b6613bf3c4bc65 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 9 Apr 2024 09:50:15 +0200 Subject: [PATCH 1/2] feat: add updateACL to sdk (#742) --- .changeset/two-pugs-impress.md | 5 ++ docs/src/pages/api-reference/ut-api.mdx | 31 ++++++++ packages/uploadthing/src/sdk/index.ts | 35 +++++++++ packages/uploadthing/src/sdk/types.ts | 2 + packages/uploadthing/test/__test-helpers.ts | 7 ++ packages/uploadthing/test/sdk.test.ts | 80 +++++++++++++++++++++ 6 files changed, 160 insertions(+) create mode 100644 .changeset/two-pugs-impress.md diff --git a/.changeset/two-pugs-impress.md b/.changeset/two-pugs-impress.md new file mode 100644 index 0000000000..659dafee4f --- /dev/null +++ b/.changeset/two-pugs-impress.md @@ -0,0 +1,5 @@ +--- +"uploadthing": minor +--- + +feat: add ability to update a file's ACL to UTApi diff --git a/docs/src/pages/api-reference/ut-api.mdx b/docs/src/pages/api-reference/ut-api.mdx index 2347c93854..e0dfb0650b 100644 --- a/docs/src/pages/api-reference/ut-api.mdx +++ b/docs/src/pages/api-reference/ut-api.mdx @@ -323,3 +323,34 @@ const url = await utapi.getSignedURL(fileKey, { > `TimeString` refers to a human-readable string that can be parsed as a number, > followed by a unit of time. For example, `1s`, `1 second`, `2m`, `2 minutes`, > `7 days` etc. If no unit is specified, seconds are assumed. + +### `updateACL` + +> Added in `v6.8` + +Update the [ACL](/regions-and-acl#access-controls) of set of files. + +```ts +import { utapi } from "~/server/uploadthing.ts"; + +// Make a single file public +await utapi.updateACL( + "2e0fdb64-9957-4262-8e45-f372ba903ac8_image.jpg", + "public-read", +); + +// Make multiple files private +await utapi.updateACL( + [ + "2e0fdb64-9957-4262-8e45-f372ba903ac8_image.jpg", + "1649353b-04ea-48a2-9db7-31de7f562c8d_image2.jpg", + ], + "private", +); +``` + +| Arguments | Type | Required | Description | +| :----------- | :------------------------- | :------- | :--------------------------------------------------------- | +| keys | string \| string[] | Yes | The fileKeys (or customIds) you want to update the ACL for | +| acl | "public-read" \| "private" | Yes | The ACL to update to. | +| opts.keyType | "fileKey" \| "customId" | No | The type of key you are passing in. Defaults to `fileKey` | diff --git a/packages/uploadthing/src/sdk/index.ts b/packages/uploadthing/src/sdk/index.ts index f503150bf3..12ecbda9bb 100644 --- a/packages/uploadthing/src/sdk/index.ts +++ b/packages/uploadthing/src/sdk/index.ts @@ -2,6 +2,7 @@ import { process } from "std-env"; import { lookup } from "@uploadthing/mime-types"; import type { + ACL, FetchEsque, MaybeUrl, SerializedUploadThingError, @@ -17,6 +18,7 @@ import { UPLOADTHING_VERSION } from "../internal/constants"; import { incompatibleNodeGuard } from "../internal/incompat-node-guard"; import { initLogger, logger } from "../internal/logger"; import type { + ACLUpdateOptions, DeleteFilesOptions, FileEsque, GetFileUrlsOptions, @@ -428,4 +430,37 @@ export class UTApi { return json.url; }; + + /** + * Update the ACL of a file or set of files. + * + * @example + * // Make a single file public + * await utapi.updateACL("2e0fdb64-9957-4262-8e45-f372ba903ac8_image.jpg", "public-read"); + * + * // Make multiple files private + * await utapi.updateACL( + * [ + * "2e0fdb64-9957-4262-8e45-f372ba903ac8_image.jpg", + * "1649353b-04ea-48a2-9db7-31de7f562c8d_image2.jpg", + * ], + * "private", + * ); + */ + updateACL = (keys: string | string[], acl: ACL, opts?: ACLUpdateOptions) => { + guardServerOnly(); + + const { keyType = this.defaultKeyType } = opts ?? {}; + const updates = asArray(keys).map((key) => { + return keyType === "fileKey" + ? { fileKey: key, acl } + : { customId: key, acl }; + }); + + return this.requestUploadThing<{ success: true }>( + "/api/updateACL", + { updates }, + "An unknown error occurred while updating ACLs.", + ); + }; } diff --git a/packages/uploadthing/src/sdk/types.ts b/packages/uploadthing/src/sdk/types.ts index 06f47c8a3a..20053265ab 100644 --- a/packages/uploadthing/src/sdk/types.ts +++ b/packages/uploadthing/src/sdk/types.ts @@ -93,3 +93,5 @@ export interface GetSignedURLOptions extends KeyTypeOptionsBase { */ expiresIn?: Time; } + +export interface ACLUpdateOptions extends KeyTypeOptionsBase {} diff --git a/packages/uploadthing/test/__test-helpers.ts b/packages/uploadthing/test/__test-helpers.ts index f90ac81206..283f8ac2f5 100644 --- a/packages/uploadthing/test/__test-helpers.ts +++ b/packages/uploadthing/test/__test-helpers.ts @@ -225,6 +225,13 @@ export const it = itBase.extend({ return HttpResponse.json({ status: "done", callbackData: null }); }, ), + http.post( + "https://uploadthing.com/api/updateACL", + async ({ request }) => { + await callRequestSpy(request); + return HttpResponse.json({ success: true }); + }, + ), ); await use(db); // provide test context files.length = 0; // clear files after each test diff --git a/packages/uploadthing/test/sdk.test.ts b/packages/uploadthing/test/sdk.test.ts index 8e594fdbbd..e0cfcbe782 100644 --- a/packages/uploadthing/test/sdk.test.ts +++ b/packages/uploadthing/test/sdk.test.ts @@ -433,3 +433,83 @@ describe("getSignedURL", () => { expect(requestSpy).toHaveBeenCalledTimes(0); }); }); + +describe("updateACL", () => { + it("single file", async ({ db }) => { + const utapi = new UTApi({ apiKey: "sk_foo" }); + + await expect(utapi.updateACL("ut-key", "public-read")).resolves.toEqual({ + success: true, + }); + + expect(requestSpy).toHaveBeenCalledWith( + "https://uploadthing.com/api/updateACL", + { + body: { updates: [{ fileKey: "ut-key", acl: "public-read" }] }, + headers: { + "content-type": "application/json", + "x-uploadthing-api-key": "sk_foo", + "x-uploadthing-be-adapter": "server-sdk", + "x-uploadthing-version": expect.stringMatching(/\d+\.\d+\.\d+/), + }, + method: "POST", + }, + ); + }); + + it("many keys", async ({ db }) => { + const utapi = new UTApi({ apiKey: "sk_foo" }); + + await expect( + utapi.updateACL(["ut-key1", "ut-key2"], "public-read"), + ).resolves.toEqual({ success: true }); + + expect(requestSpy).toHaveBeenCalledWith( + "https://uploadthing.com/api/updateACL", + { + body: { + updates: [ + { fileKey: "ut-key1", acl: "public-read" }, + { fileKey: "ut-key2", acl: "public-read" }, + ], + }, + headers: { + "content-type": "application/json", + "x-uploadthing-api-key": "sk_foo", + "x-uploadthing-be-adapter": "server-sdk", + "x-uploadthing-version": expect.stringMatching(/\d+\.\d+\.\d+/), + }, + method: "POST", + }, + ); + }); + + it("many keys with keytype override", async ({ db }) => { + const utapi = new UTApi({ apiKey: "sk_foo" }); + + await expect( + utapi.updateACL(["my-custom-id1", "my-custom-id2"], "public-read", { + keyType: "customId", + }), + ).resolves.toEqual({ success: true }); + + expect(requestSpy).toHaveBeenCalledWith( + "https://uploadthing.com/api/updateACL", + { + body: { + updates: [ + { customId: "my-custom-id1", acl: "public-read" }, + { customId: "my-custom-id2", acl: "public-read" }, + ], + }, + headers: { + "content-type": "application/json", + "x-uploadthing-api-key": "sk_foo", + "x-uploadthing-be-adapter": "server-sdk", + "x-uploadthing-version": expect.stringMatching(/\d+\.\d+\.\d+/), + }, + method: "POST", + }, + ); + }); +}); From b563bc309b3c39d280e9841abe5d2cc2be8a0596 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Tue, 9 Apr 2024 00:54:27 -0700 Subject: [PATCH 2/2] =?UTF-8?q?chore(release):=20=F0=9F=93=A6=20=20version?= =?UTF-8?q?=20packages=20(#737)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] --- .changeset/fast-laws-move.md | 6 ------ .changeset/ninety-chicken-know.md | 6 ------ .changeset/two-melons-shop.md | 5 ----- .changeset/two-pugs-impress.md | 5 ----- docs/package.json | 4 ++-- examples/backend-adapters/client/package.json | 4 ++-- examples/backend-adapters/package.json | 4 ++-- examples/backend-adapters/server/package.json | 2 +- examples/minimal-appdir/package.json | 4 ++-- examples/minimal-astro-react/package.json | 4 ++-- examples/minimal-pagedir/package.json | 4 ++-- examples/minimal-solidstart/package.json | 4 ++-- examples/with-clerk-appdir/package.json | 4 ++-- examples/with-clerk-pagesdir/package.json | 4 ++-- examples/with-drizzle-appdir/package.json | 4 ++-- examples/with-drizzle-pagesdir/package.json | 4 ++-- examples/with-react-image-crop/package.json | 4 ++-- examples/with-serveractions/package.json | 2 +- examples/with-tailwindcss/package.json | 4 ++-- packages/mime-types/CHANGELOG.md | 6 ++++++ packages/mime-types/package.json | 2 +- packages/react/CHANGELOG.md | 9 +++++++++ packages/react/package.json | 6 +++--- packages/shared/CHANGELOG.md | 6 ++++++ packages/shared/package.json | 4 ++-- packages/solid/CHANGELOG.md | 9 +++++++++ packages/solid/package.json | 6 +++--- packages/uploadthing/CHANGELOG.md | 14 ++++++++++++++ packages/uploadthing/package.json | 6 +++--- 29 files changed, 84 insertions(+), 62 deletions(-) delete mode 100644 .changeset/fast-laws-move.md delete mode 100644 .changeset/ninety-chicken-know.md delete mode 100644 .changeset/two-melons-shop.md delete mode 100644 .changeset/two-pugs-impress.md diff --git a/.changeset/fast-laws-move.md b/.changeset/fast-laws-move.md deleted file mode 100644 index df878bee13..0000000000 --- a/.changeset/fast-laws-move.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@uploadthing/react": patch -"@uploadthing/solid": patch ---- - -fix dropzone not submitting when inside a form diff --git a/.changeset/ninety-chicken-know.md b/.changeset/ninety-chicken-know.md deleted file mode 100644 index 174af9e173..0000000000 --- a/.changeset/ninety-chicken-know.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@uploadthing/shared": minor -"uploadthing": minor ---- - -feat: minFileCount option on RouteConfig diff --git a/.changeset/two-melons-shop.md b/.changeset/two-melons-shop.md deleted file mode 100644 index 4aec839460..0000000000 --- a/.changeset/two-melons-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@uploadthing/mime-types": patch ---- - -Add support for 'model/step' MIME type diff --git a/.changeset/two-pugs-impress.md b/.changeset/two-pugs-impress.md deleted file mode 100644 index 659dafee4f..0000000000 --- a/.changeset/two-pugs-impress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"uploadthing": minor ---- - -feat: add ability to update a file's ACL to UTApi diff --git a/docs/package.json b/docs/package.json index 83c154efff..a7c8cfcbb3 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,13 +13,13 @@ "dependencies": { "@radix-ui/react-accordion": "^1.1.2", "@scalar/api-reference-react": "0.0.4", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "nextra": "^2.13.2", "nextra-theme-docs": "^2.13.2", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/react": "18.2.60", diff --git a/examples/backend-adapters/client/package.json b/examples/backend-adapters/client/package.json index 884e880d6e..83edae4045 100644 --- a/examples/backend-adapters/client/package.json +++ b/examples/backend-adapters/client/package.json @@ -8,10 +8,10 @@ "start": "vite preview" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/react": "18.2.60", diff --git a/examples/backend-adapters/package.json b/examples/backend-adapters/package.json index a7b5fba23e..90674686fb 100644 --- a/examples/backend-adapters/package.json +++ b/examples/backend-adapters/package.json @@ -19,10 +19,10 @@ "test": "playwright test" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "concurrently": "^8.2.2", "typescript": "^5.4.2", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@playwright/test": "1.42.1" diff --git a/examples/backend-adapters/server/package.json b/examples/backend-adapters/server/package.json index 4748edf0c4..4b14ed85ce 100644 --- a/examples/backend-adapters/server/package.json +++ b/examples/backend-adapters/server/package.json @@ -22,7 +22,7 @@ "h3": "^1.11.1", "hono": "^4.0.8", "listhen": "^1.7.2", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20240222.0", diff --git a/examples/minimal-appdir/package.json b/examples/minimal-appdir/package.json index 4c5f838e11..d48449fb61 100644 --- a/examples/minimal-appdir/package.json +++ b/examples/minimal-appdir/package.json @@ -9,11 +9,11 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/node": "^20.11.21", diff --git a/examples/minimal-astro-react/package.json b/examples/minimal-astro-react/package.json index 70b3faa9ee..3aecc4333e 100644 --- a/examples/minimal-astro-react/package.json +++ b/examples/minimal-astro-react/package.json @@ -12,11 +12,11 @@ "dependencies": { "@astrojs/node": "^8.2.1", "@astrojs/react": "^3.0.10", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "astro": "^4.4.5", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/react": "18.2.60", diff --git a/examples/minimal-pagedir/package.json b/examples/minimal-pagedir/package.json index b0ee930804..b51195cca9 100644 --- a/examples/minimal-pagedir/package.json +++ b/examples/minimal-pagedir/package.json @@ -9,11 +9,11 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/node": "^20.11.21", diff --git a/examples/minimal-solidstart/package.json b/examples/minimal-solidstart/package.json index cfc56546b3..204ba4bc18 100644 --- a/examples/minimal-solidstart/package.json +++ b/examples/minimal-solidstart/package.json @@ -12,9 +12,9 @@ "@solidjs/meta": "^0.29.3", "@solidjs/router": "^0.12.4", "@solidjs/start": "^0.6.0", - "@uploadthing/solid": "workspace:6.3.1", + "@uploadthing/solid": "workspace:6.3.2", "solid-js": "^1.8.15", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "vinxi": "0.3.4" }, "devDependencies": { diff --git a/examples/with-clerk-appdir/package.json b/examples/with-clerk-appdir/package.json index 3e070baa64..1001bcdbb5 100644 --- a/examples/with-clerk-appdir/package.json +++ b/examples/with-clerk-appdir/package.json @@ -12,11 +12,11 @@ "dependencies": { "@clerk/nextjs": "^4.29.8", "@t3-oss/env-nextjs": "^0.9.2", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/examples/with-clerk-pagesdir/package.json b/examples/with-clerk-pagesdir/package.json index 11d11abca0..4f979d62c4 100644 --- a/examples/with-clerk-pagesdir/package.json +++ b/examples/with-clerk-pagesdir/package.json @@ -12,11 +12,11 @@ "dependencies": { "@clerk/nextjs": "^4.29.8", "@t3-oss/env-nextjs": "^0.9.2", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/examples/with-drizzle-appdir/package.json b/examples/with-drizzle-appdir/package.json index 339cd8c1ab..30257f468b 100644 --- a/examples/with-drizzle-appdir/package.json +++ b/examples/with-drizzle-appdir/package.json @@ -11,13 +11,13 @@ }, "dependencies": { "@t3-oss/env-nextjs": "^0.9.2", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "better-sqlite3": "^9.4.3", "drizzle-orm": "^0.29.4", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/examples/with-drizzle-pagesdir/package.json b/examples/with-drizzle-pagesdir/package.json index d004fcb67b..bf7b97af46 100644 --- a/examples/with-drizzle-pagesdir/package.json +++ b/examples/with-drizzle-pagesdir/package.json @@ -11,14 +11,14 @@ }, "dependencies": { "@t3-oss/env-nextjs": "^0.9.2", - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "better-sqlite3": "^9.4.3", "drizzle-orm": "^0.29.4", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", "swr": "^2.2.5", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/examples/with-react-image-crop/package.json b/examples/with-react-image-crop/package.json index 9dff21541b..f8819d8995 100644 --- a/examples/with-react-image-crop/package.json +++ b/examples/with-react-image-crop/package.json @@ -9,12 +9,12 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", "react-image-crop": "^11.0.5", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/node": "^20.11.21", diff --git a/examples/with-serveractions/package.json b/examples/with-serveractions/package.json index 183f9a7a15..5941ebf7bd 100644 --- a/examples/with-serveractions/package.json +++ b/examples/with-serveractions/package.json @@ -12,7 +12,7 @@ "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/node": "^20.11.21", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f97f078bd5..e75d7cae6e 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -9,11 +9,11 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@uploadthing/react": "workspace:6.4.1", + "@uploadthing/react": "workspace:6.4.2", "next": "14.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "uploadthing": "workspace:6.7.0" + "uploadthing": "workspace:6.8.0" }, "devDependencies": { "@types/node": "^20.11.21", diff --git a/packages/mime-types/CHANGELOG.md b/packages/mime-types/CHANGELOG.md index 12cabde63b..722fed78fc 100644 --- a/packages/mime-types/CHANGELOG.md +++ b/packages/mime-types/CHANGELOG.md @@ -1,5 +1,11 @@ # @uploadthing/mime-types +## 0.2.7 + +### Patch Changes + +- [#740](https://github.com/pingdotgg/uploadthing/pull/740) [`0069ead`](https://github.com/pingdotgg/uploadthing/commit/0069eadbffd90db29df1966eae4f0a85aa3a8490) Thanks [@kaspnilsson](https://github.com/kaspnilsson)! - Add support for 'model/step' MIME type + ## 0.2.6 ### Patch Changes diff --git a/packages/mime-types/package.json b/packages/mime-types/package.json index 14c10364bd..087743e55a 100644 --- a/packages/mime-types/package.json +++ b/packages/mime-types/package.json @@ -1,6 +1,6 @@ { "name": "@uploadthing/mime-types", - "version": "0.2.6", + "version": "0.2.7", "type": "module", "license": "MIT", "main": "./dist/index.cjs", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 5e9f20849b..846dcb4096 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,14 @@ # @uploadthing/react +## 6.4.2 + +### Patch Changes + +- [#734](https://github.com/pingdotgg/uploadthing/pull/734) [`5606d15`](https://github.com/pingdotgg/uploadthing/commit/5606d15e952c077d652943fee4efdb3c32d33667) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - fix dropzone not submitting when inside a form + +- Updated dependencies [[`d627742`](https://github.com/pingdotgg/uploadthing/commit/d6277425c8b11ff92ad3168d302e54f70e6f2667)]: + - @uploadthing/shared@6.5.0 + ## 6.4.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 726cf61958..c25c939256 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@uploadthing/react", - "version": "6.4.1", + "version": "6.4.2", "type": "module", "license": "MIT", "main": "./dist/index.cjs", @@ -62,7 +62,7 @@ }, "dependencies": { "@uploadthing/dropzone": "workspace:0.2.1", - "@uploadthing/shared": "workspace:6.4.0", + "@uploadthing/shared": "workspace:6.5.0", "file-selector": "^0.6.0", "tailwind-merge": "^2.2.1" }, @@ -89,7 +89,7 @@ "react": "18.2.0", "tailwindcss": "^3.4.1", "typescript": "^5.4.2", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "wait-on": "^7.2.0", "zod": "^3.22.4" }, diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 8cb936161e..99abd0aebe 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -1,5 +1,11 @@ # @uploadthing/shared +## 6.5.0 + +### Minor Changes + +- [#739](https://github.com/pingdotgg/uploadthing/pull/739) [`d627742`](https://github.com/pingdotgg/uploadthing/commit/d6277425c8b11ff92ad3168d302e54f70e6f2667) Thanks [@markflorkowski](https://github.com/markflorkowski)! - feat: minFileCount option on RouteConfig + ## 6.4.0 ### Minor Changes diff --git a/packages/shared/package.json b/packages/shared/package.json index bfa37d6795..8c7771e853 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@uploadthing/shared", - "version": "6.4.0", + "version": "6.5.0", "type": "module", "license": "MIT", "main": "dist/index.cjs", @@ -35,7 +35,7 @@ }, "devDependencies": { "@uploadthing/eslint-config": "workspace:0.2.0", - "@uploadthing/mime-types": "workspace:0.2.6", + "@uploadthing/mime-types": "workspace:0.2.7", "@uploadthing/tsconfig": "workspace:0.1.0", "bunchee": "^5.1.2", "eslint": "^8.57.0", diff --git a/packages/solid/CHANGELOG.md b/packages/solid/CHANGELOG.md index 82d791af26..9897e182c1 100644 --- a/packages/solid/CHANGELOG.md +++ b/packages/solid/CHANGELOG.md @@ -1,5 +1,14 @@ # @uploadthing/solid +## 6.3.2 + +### Patch Changes + +- [#734](https://github.com/pingdotgg/uploadthing/pull/734) [`5606d15`](https://github.com/pingdotgg/uploadthing/commit/5606d15e952c077d652943fee4efdb3c32d33667) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - fix dropzone not submitting when inside a form + +- Updated dependencies [[`d627742`](https://github.com/pingdotgg/uploadthing/commit/d6277425c8b11ff92ad3168d302e54f70e6f2667)]: + - @uploadthing/shared@6.5.0 + ## 6.3.1 ### Patch Changes diff --git a/packages/solid/package.json b/packages/solid/package.json index be3e6bc561..e76bdbfcf9 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -3,7 +3,7 @@ "type": "module", "author": "OrJDev", "license": "MIT", - "version": "6.3.1", + "version": "6.3.2", "main": "./dist/server.cjs", "module": "./dist/server.js", "types": "./dist/index.d.ts", @@ -111,7 +111,7 @@ }, "dependencies": { "@uploadthing/dropzone": "workspace:0.2.1", - "@uploadthing/shared": "workspace:6.4.0", + "@uploadthing/shared": "workspace:6.5.0", "tailwind-merge": "^2.2.1" }, "devDependencies": { @@ -121,7 +121,7 @@ "tsup": "8.0.2", "tsup-preset-solid": "2.2.0", "typescript": "^5.4.2", - "uploadthing": "workspace:6.7.0", + "uploadthing": "workspace:6.8.0", "wait-on": "^7.2.0" }, "peerDependencies": { diff --git a/packages/uploadthing/CHANGELOG.md b/packages/uploadthing/CHANGELOG.md index 37939eb60b..f038d34b9f 100644 --- a/packages/uploadthing/CHANGELOG.md +++ b/packages/uploadthing/CHANGELOG.md @@ -1,5 +1,19 @@ # uploadthing +## 6.8.0 + +### Minor Changes + +- [#739](https://github.com/pingdotgg/uploadthing/pull/739) [`d627742`](https://github.com/pingdotgg/uploadthing/commit/d6277425c8b11ff92ad3168d302e54f70e6f2667) Thanks [@markflorkowski](https://github.com/markflorkowski)! - feat: minFileCount option on RouteConfig + +- [#742](https://github.com/pingdotgg/uploadthing/pull/742) [`946cb99`](https://github.com/pingdotgg/uploadthing/commit/946cb99d3051c3982f14740874b6613bf3c4bc65) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - feat: add ability to update a file's ACL to UTApi + +### Patch Changes + +- Updated dependencies [[`d627742`](https://github.com/pingdotgg/uploadthing/commit/d6277425c8b11ff92ad3168d302e54f70e6f2667), [`0069ead`](https://github.com/pingdotgg/uploadthing/commit/0069eadbffd90db29df1966eae4f0a85aa3a8490)]: + - @uploadthing/shared@6.5.0 + - @uploadthing/mime-types@0.2.7 + ## 6.7.0 ### Minor Changes diff --git a/packages/uploadthing/package.json b/packages/uploadthing/package.json index e2a4ebd731..d1cb5f5504 100644 --- a/packages/uploadthing/package.json +++ b/packages/uploadthing/package.json @@ -1,6 +1,6 @@ { "name": "uploadthing", - "version": "6.7.0", + "version": "6.8.0", "type": "module", "engines": { "node": ">=18.13.0" @@ -127,8 +127,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@uploadthing/mime-types": "workspace:0.2.6", - "@uploadthing/shared": "workspace:6.4.0", + "@uploadthing/mime-types": "workspace:0.2.7", + "@uploadthing/shared": "workspace:6.5.0", "consola": "^3.2.3", "std-env": "^3.7.0" },