Skip to content

Commit 9e71451

Browse files
committed
Merge branch 'main' into node-version
* main: [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
2 parents 063ccf6 + ba571db commit 9e71451

File tree

16 files changed

+944
-817
lines changed

16 files changed

+944
-817
lines changed

.changeset/thin-keys-whisper.md

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

package-lock.json

Lines changed: 851 additions & 796 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@tus/server": "^1.10.0",
2828
"@types/debug": "^4.1.12",
2929
"@types/mocha": "^10.0.6",
30-
"@types/node": "^22.10.1",
30+
"@types/node": "^22.13.7",
3131
"mocha": "^11.0.1",
3232
"should": "^13.2.3"
3333
},

packages/s3-store/CHANGELOG.md

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

3+
## 1.9.1
4+
5+
### Patch Changes
6+
7+
- 274a0d1: Bump @aws-sdk/client-s3 from 3.717.0 to 3.758.0
8+
- 81eb03a: Add missing documentation for `maxMultipartParts` option added in #712
9+
- c8e78bd: Fix unhandled promise rejection when uploading a part fails, in which case we returned too early, leaving other parts running in the background.
10+
311
## 1.9.0
412

513
### Minor Changes

packages/s3-store/package.json

Lines changed: 4 additions & 3 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/s3-store",
4-
"version": "1.9.0",
4+
"version": "1.9.1",
55
"description": "AWS S3 store for @tus/server",
66
"main": "dist/index.js",
77
"homepage": "https://github.com/tus/tus-node-server#readme",
@@ -16,10 +16,11 @@
1616
],
1717
"scripts": {
1818
"build": "tsc --build",
19+
"pretest": "tsc --build",
1920
"test": "mocha --timeout 40000 --exit --extension ts --require ts-node/register"
2021
},
2122
"dependencies": {
22-
"@aws-sdk/client-s3": "^3.717.0",
23+
"@aws-sdk/client-s3": "^3.758.0",
2324
"@shopify/semaphore": "^3.1.0",
2425
"@tus/utils": "^0.5.1",
2526
"debug": "^4.3.4",
@@ -29,7 +30,7 @@
2930
"@types/debug": "^4.1.12",
3031
"@types/mocha": "^10.0.6",
3132
"@types/multistream": "^4.1.3",
32-
"@types/node": "^22.10.1",
33+
"@types/node": "^22.13.7",
3334
"mocha": "^11.0.1",
3435
"should": "^13.2.3"
3536
},

0 commit comments

Comments
 (0)