New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/xhr-upload

Package Overview
Dependencies
Maintainers
6
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/xhr-upload - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

7

CHANGELOG.md
# @uppy/xhr-upload
## 3.1.1
Released: 2023-04-04
Included in: Uppy v3.7.0
- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/tus,@uppy/xhr-upload: make sure that we reset serverToken when an upload fails (Mikael Finstad / #4376)
## 3.1.0

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

13

lib/index.js

@@ -19,3 +19,3 @@ function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }

const packageJson = {
"version": "3.1.0"
"version": "3.1.1"
};

@@ -378,2 +378,4 @@ import locale from './locale.js';

// NOTE! Keep this duplicated code in sync with other plugins
// TODO we should probably abstract this into a common function
async uploadRemote(file) {

@@ -385,3 +387,3 @@ // TODO: we could rewrite this to use server-sent events instead of creating WebSockets.

if (file.serverToken) {
return this.connectToServerSocket(file);
return await this.connectToServerSocket(file);
}

@@ -394,4 +396,7 @@

});
return this.connectToServerSocket(this.uppy.getFile(file.id));
return await this.connectToServerSocket(this.uppy.getFile(file.id));
} catch (err) {
this.uppy.setFileState(file.id, {
serverToken: undefined
});
this.uppy.emit('upload-error', file, err);

@@ -402,3 +407,3 @@ throw err;

connectToServerSocket(file) {
async connectToServerSocket(file) {
return new Promise((resolve, reject) => {

@@ -405,0 +410,0 @@ const opts = this.getOptions(file);

{
"name": "@uppy/xhr-upload",
"description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",

@@ -28,4 +28,4 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/companion-client": "^3.1.1",
"@uppy/utils": "^5.1.2",
"@uppy/companion-client": "^3.1.2",
"@uppy/utils": "^5.2.0",
"nanoid": "^4.0.0"

@@ -38,4 +38,4 @@ },

"peerDependencies": {
"@uppy/core": "^3.0.6"
"@uppy/core": "^3.1.2"
}
}

@@ -376,2 +376,4 @@ import BasePlugin from '@uppy/core/lib/BasePlugin.js'

// NOTE! Keep this duplicated code in sync with other plugins
// TODO we should probably abstract this into a common function
async uploadRemote (file) {

@@ -382,3 +384,3 @@ // TODO: we could rewrite this to use server-sent events instead of creating WebSockets.

if (file.serverToken) {
return this.connectToServerSocket(file)
return await this.connectToServerSocket(file)
}

@@ -390,4 +392,5 @@ const serverToken = await this.#queueRequestSocketToken(file)

this.uppy.setFileState(file.id, { serverToken })
return this.connectToServerSocket(this.uppy.getFile(file.id))
return await this.connectToServerSocket(this.uppy.getFile(file.id))
} catch (err) {
this.uppy.setFileState(file.id, { serverToken: undefined })
this.uppy.emit('upload-error', file, err)

@@ -398,3 +401,3 @@ throw err

connectToServerSocket (file) {
async connectToServerSocket (file) {
return new Promise((resolve, reject) => {

@@ -401,0 +404,0 @@ const opts = this.getOptions(file)

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