Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/companion-client

Package Overview
Dependencies
Maintainers
5
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/companion-client - npm Package Compare versions

Comparing version 3.7.3 to 3.7.4

7

CHANGELOG.md
# @uppy/companion-client
## 3.7.4
Released: 2024-02-28
Included in: Uppy v3.23.0
- @uppy/companion-client,@uppy/utils,@uppy/xhr-upload: improvements for #4922 (Mikael Finstad / #4960)
## 3.7.3

@@ -4,0 +11,0 @@

9

lib/RequestClient.js

@@ -16,3 +16,3 @@ let _Symbol$for;

const packageJson = {
"version": "3.7.3"
"version": "3.7.4"
};

@@ -399,3 +399,8 @@ // Remove the trailing slash so we can always safely append /xyz.

var _payload$response, _payload$response$sta, _payload$response2, _socketAbortControlle2;
// payload.response exists for xhr-upload but not for tus/transloadit
// payload.response is sent from companion for xhr-upload (aka uploadMultipart in companion) and
// s3 multipart (aka uploadS3Multipart)
// but not for tus/transloadit (aka uploadTus)
// responseText is a string which may or may not be in JSON format
// this means that an upload destination of xhr or s3 multipart MUST respond with valid JSON
// to companion, or the JSON.parse will crash
const text = (_payload$response = payload.response) == null ? void 0 : _payload$response.responseText;

@@ -402,0 +407,0 @@ this.uppy.emit('upload-success', this.uppy.getFile(file.id), {

{
"name": "@uppy/companion-client",
"description": "Client library for communication with Companion. Intended for use in Uppy plugins.",
"version": "3.7.3",
"version": "3.7.4",
"license": "MIT",

@@ -25,3 +25,3 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/utils": "^5.7.3",
"@uppy/utils": "^5.7.4",
"namespace-emitter": "^2.0.1",

@@ -34,4 +34,4 @@ "p-retry": "^6.1.0"

"peerDependencies": {
"@uppy/core": "^3.9.2"
"@uppy/core": "^3.9.3"
}
}

@@ -482,3 +482,8 @@ import UserFacingApiError from '@uppy/utils/lib/UserFacingApiError'

case 'success': {
// payload.response exists for xhr-upload but not for tus/transloadit
// payload.response is sent from companion for xhr-upload (aka uploadMultipart in companion) and
// s3 multipart (aka uploadS3Multipart)
// but not for tus/transloadit (aka uploadTus)
// responseText is a string which may or may not be in JSON format
// this means that an upload destination of xhr or s3 multipart MUST respond with valid JSON
// to companion, or the JSON.parse will crash
const text = payload.response?.responseText

@@ -492,3 +497,4 @@

status: payload.response?.status ?? 200,
body: text ? JSON.parse(text) : undefined,
body:
text ? (JSON.parse(text) as B) : undefined,
},

@@ -495,0 +501,0 @@ )

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc