@uppy/companion-client
Advanced tools
Comparing version 3.7.3 to 3.7.4
# @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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168826
2347
1
Updated@uppy/utils@^5.7.4