From 792aca1cfbd8a90d3fc116b10cfbc3cb98c81eee Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 28 Nov 2024 11:36:08 +0100 Subject: [PATCH 1/2] Update tus-js-client to v4 There are no breaking changes for us. --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 9338d29..a306bda 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "into-stream": "^6.0.0", "is-stream": "^2.0.1", "p-map": "^4.0.0", - "tus-js-client": "^3.1.3" + "tus-js-client": "^4.2.3" }, "devDependencies": { "@babel/core": "^7.25.8", diff --git a/yarn.lock b/yarn.lock index d29be6a..886e793 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5373,7 +5373,7 @@ __metadata: p-retry: "npm:^4.6.2" prettier: "npm:^3.3.3" temp: "npm:^0.9.4" - tus-js-client: "npm:^3.1.3" + tus-js-client: "npm:^4.2.3" typescript: "npm:^5.6.3" vitest: "npm:^2.1.3" languageName: unknown @@ -5409,9 +5409,9 @@ __metadata: languageName: node linkType: hard -"tus-js-client@npm:^3.1.3": - version: 3.1.3 - resolution: "tus-js-client@npm:3.1.3" +"tus-js-client@npm:^4.2.3": + version: 4.2.3 + resolution: "tus-js-client@npm:4.2.3" dependencies: buffer-from: "npm:^1.1.2" combine-errors: "npm:^3.0.3" @@ -5420,7 +5420,7 @@ __metadata: lodash.throttle: "npm:^4.1.1" proper-lockfile: "npm:^4.1.2" url-parse: "npm:^1.5.7" - checksum: 526a82147292cb31404866ef16c315fab231d3f8761dc17509ececcf264d8c32a4a02a377dff0939fb50026bfd4bf62ac6518f657cda7b09033e230814cbb467 + checksum: 4cf660f58b7a778eaa8df044d6d816f4613b4e30b36476ed28f3d356ec6ed24207065afb140016a3067571be006c159c87bd2dd861af50736e84b1aee8f87f64 languageName: node linkType: hard From ed47c8206002b73207a1fda7fb4d8be65b909c78 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 28 Nov 2024 11:41:20 +0100 Subject: [PATCH 2/2] Fix TypeScript issue --- src/tus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tus.ts b/src/tus.ts index 98eea8d..485af62 100644 --- a/src/tus.ts +++ b/src/tus.ts @@ -1,6 +1,6 @@ import debug from 'debug' import { basename } from 'path' -import { Upload, UploadOptions } from 'tus-js-client' +import { OnSuccessPayload, Upload, UploadOptions } from 'tus-js-client' import { stat } from 'fs/promises' import pMap from 'p-map' import type { Readable } from 'stream' @@ -88,7 +88,7 @@ export async function sendTusRequest({ const filename = path ? basename(path) : label - await new Promise((resolve, reject) => { + await new Promise((resolve, reject) => { const tusOptions: UploadOptions = { endpoint: assembly.tus_url, metadata: {