Skip to content

Commit 618f46d

Browse files
committed
Merge branch 'main' into node-version
* main: @tus/gcs-store: require @google-cloud/storage ^7 (#735) Rename POST_RECEIVE_V2 to POST_RECEIVE (#724) Refactor server to run in all (Node.js compatible) runtimes and meta frameworks (#710)
2 parents 061de23 + 4a0fe1c commit 618f46d

32 files changed

+1392
-1122
lines changed

.changeset/little-pets-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tus/gcs-store": major
3+
---
4+
5+
@google-cloud/storage@7 is now required as peer dependency.

.changeset/polite-bikes-train.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@tus/server": major
3+
---
4+
5+
- Introduce `handleWeb(req: Request)` to integrate into meta frameworks
6+
(such as Next.js, Nuxt, React Router, SvelteKit, etc) and other Node.js compatible runtime environments.
7+
- All events and hooks now emit `Request`/`Response` instead of `http.IncomingMessage`/`http.ServerResponse`.
8+
- The function version of the options `maxSize`, `generateUrl`, `getFileIdFromRequest`, `namingFunction`, `locker`
9+
also now use `Request`/`Response`.
10+
- Your `onUploadCreate` and `onUploadFinish` hooks no longer need to return the response object.
11+
- If you want to change the metadata in `onUploadCreate` you can return `Promise<{ metadata: Record<string, string> }>`.
12+
This will will internally merge the existing metadata with the new metadata.
13+
- `onUploadFinish` can return `Promise<{ status_code?: number headers?: Record<string, string | number> body?: string }>`

.changeset/spicy-garlics-look.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tus/server": major
3+
"@tus/utils": minor
4+
---
5+
6+
- `POST_RECEIVE_V2` has been renamed to `POST_RECEIVE`. The deprecated version of `POST_RECEIVE` has been removed.

biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
"enabled": true
55
},
66
"files": {
7-
"ignore": ["./**/dist/**/*"]
7+
"ignore": [".git", "node_modules", "./**/dist/**/*"]
88
},
99
"linter": {
1010
"enabled": true,
1111
"rules": {
1212
"recommended": true,
1313
"style": {
1414
"noParameterAssign": "off"
15+
},
16+
"performance": {
17+
"noDelete": "off"
1518
}
1619
}
1720
},

0 commit comments

Comments
 (0)