Skip to content

Commit 60ec6eb

Browse files
committed
Merge branch 'main' into post-receive
* main: Refactor server to run in all (Node.js compatible) runtimes and meta frameworks (#710) [ci] release (#721) @tus/s3-store: fix unhandled promise rejection (#728) Bump @aws-sdk/client-s3 from 3.717.0 to 3.758.0 (#733) Bump @types/node from 22.10.1 to 22.13.7 (#734) Bump typescript from 5.6.2 to 5.8.2 (#731) @tus/azure-store: fix non-ASCII characters error on metadata (#725) Fix package-lock.json @tus/s3-store: add missing docs for `maxMultipartParts` (#720) [ci] release (#719) @tus/server: don't use AbortSignal.any to fix memory leak (#718) [ci] release (#713) Add .coderabbit.yml @tus/s3-store: add `maxMultipartParts` option (#712) [ci] release (#701) @tus/s3-store: add `minPartSize` option (#703)
2 parents da2fe87 + 51419da commit 60ec6eb

File tree

23 files changed

+1113
-852
lines changed

23 files changed

+1113
-852
lines changed

.changeset/gold-adults-warn.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/proud-terms-swim.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.coderabbit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "en-US"
3+
early_access: false
4+
reviews:
5+
profile: "chill"
6+
request_changes_workflow: false
7+
high_level_summary: false
8+
poem: false
9+
review_status: true
10+
sequence_diagrams: false
11+
collapse_walkthrough: false
12+
auto_review:
13+
enabled: true
14+
drafts: false
15+
chat:
16+
auto_reply: true

package-lock.json

Lines changed: 861 additions & 802 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"@biomejs/biome": "1.9.4",
1818
"@changesets/changelog-github": "^0.5.0",
1919
"@changesets/cli": "^2.27.10",
20-
"typescript": "^5.6.2"
20+
"typescript": "^5.8.2"
2121
}
2222
}

packages/azure-store/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @tus/azure-store
22

3+
## 0.1.3
4+
5+
### Patch Changes
6+
7+
- f47f371: Fix error on saving metadata when it contains non-ASCII characters
8+
39
## 0.1.2
410

511
### Patch Changes

packages/azure-store/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@tus/azure-store",
4-
"version": "0.1.2",
4+
"version": "0.1.3",
55
"description": "Azure blob storage for @tus/server",
66
"main": "dist/index.js",
77
"homepage": "https://github.com/tus/tus-node-server#readme",
@@ -26,7 +26,7 @@
2626
"devDependencies": {
2727
"@types/debug": "^4.1.12",
2828
"@types/mocha": "^10.0.6",
29-
"@types/node": "^22.10.1",
29+
"@types/node": "^22.13.7",
3030
"mocha": "^11.0.1",
3131
"should": "^13.2.3"
3232
},

packages/azure-store/src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
type KvStore,
88
MemoryKvStore,
99
TUS_RESUMABLE,
10+
Metadata,
1011
} from '@tus/utils'
1112
import {
1213
type AppendBlobClient,
@@ -78,7 +79,11 @@ export class AzureStore extends DataStore {
7879
await appendBlobClient.setMetadata(
7980
{
8081
tus_version: TUS_RESUMABLE,
81-
upload: JSON.stringify(upload),
82+
upload: JSON.stringify({
83+
...upload,
84+
// Base64 encode the metadata to avoid errors for non-ASCII characters
85+
metadata: Metadata.stringify(upload.metadata ?? {}),
86+
}),
8287
},
8388
{}
8489
)
@@ -110,6 +115,9 @@ export class AzureStore extends DataStore {
110115
throw ERRORS.FILE_NOT_FOUND
111116
}
112117
const upload = JSON.parse(propertyData.metadata.upload) as Upload
118+
// Metadata is base64 encoded to avoid errors for non-ASCII characters
119+
// so we need to decode it separately
120+
upload.metadata = Metadata.parse(JSON.stringify(upload.metadata ?? {}))
113121

114122
await this.cache.set(appendBlobClient.url, upload)
115123

packages/file-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"@types/debug": "^4.1.12",
2222
"@types/mocha": "^10.0.6",
23-
"@types/node": "^22.10.1",
23+
"@types/node": "^22.13.7",
2424
"mocha": "^11.0.1",
2525
"should": "^13.2.3"
2626
},

packages/gcs-store/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @tus/gcs-store
22

3+
## 1.4.2
4+
5+
### Patch Changes
6+
7+
- 8217f5e: Correctly pass the content type from upload.metadata to GCS.
8+
39
## 1.4.1
410

511
### Patch Changes

0 commit comments

Comments
 (0)