Skip to content

Commit

Permalink
@uppy/companion: upgrade deps (#5119)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored May 15, 2024
1 parent 53cb32f commit 928eff7
Show file tree
Hide file tree
Showing 3 changed files with 1,800 additions and 3,841 deletions.
6 changes: 3 additions & 3 deletions packages/@uppy/companion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"express-session": "1.17.3",
"got": "^13.0.0",
"grant": "5.4.22",
"helmet": "^4.6.0",
"helmet": "^7.1.0",
"ioredis": "^5.3.2",
"ipaddr.js": "^2.0.1",
"jsonwebtoken": "9.0.2",
Expand All @@ -61,11 +61,11 @@
"ms": "2.1.3",
"node-schedule": "2.1.1",
"prom-client": "14.0.1",
"serialize-error": "^2.1.0",
"serialize-error": "^11.0.0",
"serialize-javascript": "^6.0.0",
"tus-js-client": "^3.1.3",
"validator": "^13.0.0",
"ws": "8.16.0"
"ws": "8.17.0"
},
"devDependencies": {
"@types/compression": "1.7.0",
Expand Down
8 changes: 2 additions & 6 deletions packages/@uppy/companion/src/server/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const pipeline = promisify(pipelineCb)
const { createReadStream, createWriteStream, ReadStream } = fs
const { stat, unlink } = fs.promises

/** @type {any} */
// @ts-ignore - typescript resolves this this to a hoisted version of
// serialize-error that ships with a declaration file, we are using a version
// here that does not have a declaration file
const serializeError = require('serialize-error') // eslint-disable-line import/order
const emitter = require('./emitter')
const { jsonStringify, hasMatch } = require('./helpers/utils')
const logger = require('./logger')
Expand Down Expand Up @@ -517,10 +512,11 @@ class Uploader {
*
* @param {Error} err
*/
#emitError(err) {
async #emitError(err) {
// delete stack to avoid sending server info to client
// todo remove also extraData from serializedErr in next major,
// see PR discussion https://github.com/transloadit/uppy/pull/3832
const { serializeError } = await import('serialize-error')
const { stack, ...serializedErr } = serializeError(err)
const dataToEmit = {
action: 'error',
Expand Down
Loading

0 comments on commit 928eff7

Please sign in to comment.