From 0818b8b87dc96d7d17986f589ca564f68adf4b10 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 28 Mar 2024 15:44:19 -0400 Subject: [PATCH 1/5] fix: add patch for tus on parallel uploads to ensure it sends the meta --- patches/tus-js-client+3.1.3.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 patches/tus-js-client+3.1.3.patch diff --git a/patches/tus-js-client+3.1.3.patch b/patches/tus-js-client+3.1.3.patch new file mode 100644 index 0000000..44ca22d --- /dev/null +++ b/patches/tus-js-client+3.1.3.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/tus-js-client/lib.esm/upload.js b/node_modules/tus-js-client/lib.esm/upload.js +index 02fde5b..f9e3972 100644 +--- a/node_modules/tus-js-client/lib.esm/upload.js ++++ b/node_modules/tus-js-client/lib.esm/upload.js +@@ -272,7 +272,6 @@ var BaseUpload = /*#__PURE__*/function () { + parallelUploads: 1, + // Reset this option as we are not doing a parallel upload. + parallelUploadBoundaries: null, +- metadata: {}, + // Add the header to indicate the this is a partial upload. + headers: _objectSpread(_objectSpread({}, _this3.options.headers), {}, { + 'Upload-Concat': 'partial' From 2a7fa753292cb86f985c5adeb7bcf117b91729dd Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 28 Mar 2024 16:19:39 -0400 Subject: [PATCH 2/5] fix: update tus patch to patch lib.es5 as well --- patches/tus-js-client+3.1.3.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/patches/tus-js-client+3.1.3.patch b/patches/tus-js-client+3.1.3.patch index 44ca22d..0772b94 100644 --- a/patches/tus-js-client+3.1.3.patch +++ b/patches/tus-js-client+3.1.3.patch @@ -1,3 +1,15 @@ +diff --git a/node_modules/tus-js-client/lib.es5/upload.js b/node_modules/tus-js-client/lib.es5/upload.js +index fe647f2..a2fbf56 100644 +--- a/node_modules/tus-js-client/lib.es5/upload.js ++++ b/node_modules/tus-js-client/lib.es5/upload.js +@@ -724,7 +724,6 @@ var BaseUpload = /*#__PURE__*/function () { + parallelUploads: 1, + // Reset this option as we are not doing a parallel upload. + parallelUploadBoundaries: null, +- metadata: {}, + // Add the header to indicate the this is a partial upload. + headers: _objectSpread(_objectSpread({}, _this3.options.headers), {}, { + 'Upload-Concat': 'partial' diff --git a/node_modules/tus-js-client/lib.esm/upload.js b/node_modules/tus-js-client/lib.esm/upload.js index 02fde5b..f9e3972 100644 --- a/node_modules/tus-js-client/lib.esm/upload.js From 3e2ec0a93a10c4324f7e74ab74772a24d5b2234e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 28 Mar 2024 16:31:28 -0400 Subject: [PATCH 3/5] fix: update tus patch to patch lib as well --- patches/tus-js-client+3.1.3.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/patches/tus-js-client+3.1.3.patch b/patches/tus-js-client+3.1.3.patch index 0772b94..cab94c5 100644 --- a/patches/tus-js-client+3.1.3.patch +++ b/patches/tus-js-client+3.1.3.patch @@ -22,3 +22,15 @@ index 02fde5b..f9e3972 100644 // Add the header to indicate the this is a partial upload. headers: _objectSpread(_objectSpread({}, _this3.options.headers), {}, { 'Upload-Concat': 'partial' +diff --git a/node_modules/tus-js-client/lib/upload.js b/node_modules/tus-js-client/lib/upload.js +index 61289da..0cdb559 100644 +--- a/node_modules/tus-js-client/lib/upload.js ++++ b/node_modules/tus-js-client/lib/upload.js +@@ -322,7 +322,6 @@ class BaseUpload { + parallelUploads: 1, + // Reset this option as we are not doing a parallel upload. + parallelUploadBoundaries: null, +- metadata: {}, + // Add the header to indicate the this is a partial upload. + headers: { + ...this.options.headers, From 34de535f7567c68fd827c31b296efd4eb318703a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 28 Mar 2024 16:56:21 -0400 Subject: [PATCH 4/5] dep: update deps and patches --- package.json | 3 ++- .../{@uppy+tus+3.5.3.patch => @uppy+tus+3.5.4.patch} | 0 ...-client+3.1.3.patch => tus-js-client+4.1.0.patch} | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) rename patches/{@uppy+tus+3.5.3.patch => @uppy+tus+3.5.4.patch} (100%) rename patches/{tus-js-client+3.1.3.patch => tus-js-client+4.1.0.patch} (86%) diff --git a/package.json b/package.json index 4005858..cd061e4 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@tanstack/react-query": "^5.28.6", "@tanstack/react-table": "^8.13.2", "@uppy/core": "^3.9.3", - "@uppy/tus": "^3.5.3", + "@uppy/tus": "^3.5.4", "@uppy/utils": "^5.7.4", "@visx/visx": "^3.10.2", "class-variance-authority": "^0.7.0", @@ -52,6 +52,7 @@ "react-dom": "^18.2.0", "tailwind-merge": "^2.2.1", "tailwindcss-animate": "^1.0.7", + "tus-js-client": "^4.1.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/patches/@uppy+tus+3.5.3.patch b/patches/@uppy+tus+3.5.4.patch similarity index 100% rename from patches/@uppy+tus+3.5.3.patch rename to patches/@uppy+tus+3.5.4.patch diff --git a/patches/tus-js-client+3.1.3.patch b/patches/tus-js-client+4.1.0.patch similarity index 86% rename from patches/tus-js-client+3.1.3.patch rename to patches/tus-js-client+4.1.0.patch index cab94c5..ec6e63b 100644 --- a/patches/tus-js-client+3.1.3.patch +++ b/patches/tus-js-client+4.1.0.patch @@ -1,8 +1,8 @@ diff --git a/node_modules/tus-js-client/lib.es5/upload.js b/node_modules/tus-js-client/lib.es5/upload.js -index fe647f2..a2fbf56 100644 +index fc3734c..e4ea6cb 100644 --- a/node_modules/tus-js-client/lib.es5/upload.js +++ b/node_modules/tus-js-client/lib.es5/upload.js -@@ -724,7 +724,6 @@ var BaseUpload = /*#__PURE__*/function () { +@@ -731,7 +731,6 @@ var BaseUpload = /*#__PURE__*/function () { parallelUploads: 1, // Reset this option as we are not doing a parallel upload. parallelUploadBoundaries: null, @@ -11,10 +11,10 @@ index fe647f2..a2fbf56 100644 headers: _objectSpread(_objectSpread({}, _this3.options.headers), {}, { 'Upload-Concat': 'partial' diff --git a/node_modules/tus-js-client/lib.esm/upload.js b/node_modules/tus-js-client/lib.esm/upload.js -index 02fde5b..f9e3972 100644 +index 99cc7ff..f8f832d 100644 --- a/node_modules/tus-js-client/lib.esm/upload.js +++ b/node_modules/tus-js-client/lib.esm/upload.js -@@ -272,7 +272,6 @@ var BaseUpload = /*#__PURE__*/function () { +@@ -279,7 +279,6 @@ var BaseUpload = /*#__PURE__*/function () { parallelUploads: 1, // Reset this option as we are not doing a parallel upload. parallelUploadBoundaries: null, @@ -23,10 +23,10 @@ index 02fde5b..f9e3972 100644 headers: _objectSpread(_objectSpread({}, _this3.options.headers), {}, { 'Upload-Concat': 'partial' diff --git a/node_modules/tus-js-client/lib/upload.js b/node_modules/tus-js-client/lib/upload.js -index 61289da..0cdb559 100644 +index e564de3..10fba60 100644 --- a/node_modules/tus-js-client/lib/upload.js +++ b/node_modules/tus-js-client/lib/upload.js -@@ -322,7 +322,6 @@ class BaseUpload { +@@ -332,7 +332,6 @@ class BaseUpload { parallelUploads: 1, // Reset this option as we are not doing a parallel upload. parallelUploadBoundaries: null, From 558cb3a54e13133fc3927c135916f22cc6eb44c9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 28 Mar 2024 17:18:19 -0400 Subject: [PATCH 5/5] dep: force override tus-js-client version --- package.json | 161 ++++++++++++++++++++++++++------------------------- 1 file changed, 82 insertions(+), 79 deletions(-) diff --git a/package.json b/package.json index cd061e4..1b0b409 100644 --- a/package.json +++ b/package.json @@ -1,81 +1,84 @@ { - "name": "lume-portal-dashboard", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "build": "remix vite:build", - "dev": "remix vite:dev", - "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", - "preview": "vite preview", - "typecheck": "tsc", - "patch-package": "patch-package", - "postinstall": "patch-package" - }, - "dependencies": { - "@conform-to/react": "^1.0.2", - "@conform-to/zod": "^1.0.2", - "@fontsource-variable/manrope": "^5.0.19", - "@lumeweb/portal-sdk": "0.0.0-20240328040103", - "@radix-ui/react-accordion": "^1.1.2", - "@radix-ui/react-avatar": "^1.0.4", - "@radix-ui/react-checkbox": "^1.0.4", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/react-label": "^2.0.2", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-progress": "^1.0.3", - "@radix-ui/react-select": "^2.0.0", - "@radix-ui/react-slot": "^1.0.2", - "@radix-ui/react-tabs": "^1.0.4", - "@radix-ui/react-toast": "^1.1.5", - "@radix-ui/react-tooltip": "^1.0.7", - "@refinedev/cli": "^2.16.1", - "@refinedev/core": "https://gitpkg.now.sh/LumeWeb/refine/packages/core?remix", - "@refinedev/devtools-internal": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-internal?remix", - "@refinedev/devtools-shared": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-shared?remix", - "@refinedev/react-table": "https://gitpkg.now.sh/LumeWeb/refine/packages/react-table?remix", - "@refinedev/remix-router": "https://gitpkg.now.sh/LumeWeb/refine/packages/remix?remix", - "@remix-run/node": "^2.8.0", - "@remix-run/react": "^2.8.0", - "@tanstack/react-query": "^5.28.6", - "@tanstack/react-table": "^8.13.2", - "@uppy/core": "^3.9.3", - "@uppy/tus": "^3.5.4", - "@uppy/utils": "^5.7.4", - "@visx/visx": "^3.10.2", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.0", - "date-fns": "^3.6.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "tailwind-merge": "^2.2.1", - "tailwindcss-animate": "^1.0.7", - "tus-js-client": "^4.1.0", - "zod": "^3.22.4" - }, - "devDependencies": { - "@remix-run/dev": "^2.8.0", - "@types/react": "^18.2.20", - "@types/react-dom": "^18.2.7", - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", - "autoprefixer": "^10.4.18", - "eslint": "^8.38.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "tailwindcss": "^3.4.1", - "typescript": "^5.1.6", - "vite": "^5.1.0", - "vite-plugin-node-polyfills": "^0.21.0", - "vite-tsconfig-paths": "^4.2.1" - }, - "engines": { - "node": ">=18.0.0" - }, - "packageManager": "npm" + "name": "lume-portal-dashboard", + "private": true, + "sideEffects": false, + "type": "module", + "scripts": { + "build": "remix vite:build", + "dev": "remix vite:dev", + "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", + "preview": "vite preview", + "typecheck": "tsc", + "patch-package": "patch-package", + "postinstall": "patch-package" + }, + "dependencies": { + "@conform-to/react": "^1.0.2", + "@conform-to/zod": "^1.0.2", + "@fontsource-variable/manrope": "^5.0.19", + "@lumeweb/portal-sdk": "0.0.0-20240328040103", + "@radix-ui/react-accordion": "^1.1.2", + "@radix-ui/react-avatar": "^1.0.4", + "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-dropdown-menu": "^2.0.6", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-progress": "^1.0.3", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tabs": "^1.0.4", + "@radix-ui/react-toast": "^1.1.5", + "@radix-ui/react-tooltip": "^1.0.7", + "@refinedev/cli": "^2.16.1", + "@refinedev/core": "https://gitpkg.now.sh/LumeWeb/refine/packages/core?remix", + "@refinedev/devtools-internal": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-internal?remix", + "@refinedev/devtools-shared": "https://gitpkg.now.sh/LumeWeb/refine/packages/devtools-shared?remix", + "@refinedev/react-table": "https://gitpkg.now.sh/LumeWeb/refine/packages/react-table?remix", + "@refinedev/remix-router": "https://gitpkg.now.sh/LumeWeb/refine/packages/remix?remix", + "@remix-run/node": "^2.8.0", + "@remix-run/react": "^2.8.0", + "@tanstack/react-query": "^5.28.6", + "@tanstack/react-table": "^8.13.2", + "@uppy/core": "^3.9.3", + "@uppy/tus": "^3.5.4", + "@uppy/utils": "^5.7.4", + "@visx/visx": "^3.10.2", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.0", + "date-fns": "^3.6.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "tailwind-merge": "^2.2.1", + "tailwindcss-animate": "^1.0.7", + "tus-js-client": "^4.1.0", + "zod": "^3.22.4" + }, + "devDependencies": { + "@remix-run/dev": "^2.8.0", + "@types/react": "^18.2.20", + "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", + "autoprefixer": "^10.4.18", + "eslint": "^8.38.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "tailwindcss": "^3.4.1", + "typescript": "^5.1.6", + "vite": "^5.1.0", + "vite-plugin-node-polyfills": "^0.21.0", + "vite-tsconfig-paths": "^4.2.1" + }, + "engines": { + "node": ">=18.0.0" + }, + "overrides": { + "tus-js-client": "^4.1.0" + }, + "packageManager": "npm" }