@uppy/xhr-upload
Advanced tools
Comparing version 4.0.0-beta.5 to 4.0.0-beta.6
# @uppy/xhr-upload | ||
## 4.0.0-beta.6 | ||
Released: 2024-06-04 | ||
Included in: Uppy v4.0.0-beta.10 | ||
- @uppy/aws-s3,@uppy/tus,@uppy/utils,@uppy/xhr-upload: remove `uploader` from `upload-progress` event (Mikael Finstad / #5200) | ||
## 4.0.0-beta.5 | ||
@@ -4,0 +11,0 @@ |
@@ -1,4 +0,4 @@ | ||
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; } | ||
function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
var id = 0; | ||
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; } | ||
function _classPrivateFieldLooseKey(e) { return "__private_" + id++ + "_" + e; } | ||
import BasePlugin from '@uppy/core/lib/BasePlugin.js'; | ||
@@ -21,3 +21,3 @@ import EventManager from '@uppy/core/lib/EventManager.js'; | ||
const packageJson = { | ||
"version": "4.0.0-beta.5" | ||
"version": "4.0.0-beta.6" | ||
}; | ||
@@ -179,6 +179,5 @@ import locale from "./locale.js"; | ||
for (const file of files) { | ||
var _file$progress$upload; | ||
this.uppy.emit('upload-progress', file, { | ||
// TODO: do not send `uploader` in next major | ||
// @ts-expect-error we can't type this and we should remove it | ||
uploader: this, | ||
uploadStarted: (_file$progress$upload = file.progress.uploadStarted) != null ? _file$progress$upload : 0, | ||
bytesUploaded: event.loaded / event.total * file.size, | ||
@@ -332,9 +331,4 @@ bytesTotal: file.size | ||
events.onFileRemove(file.id, () => controller.abort()); | ||
events.onCancelAll(file.id, _ref => { | ||
let { | ||
reason | ||
} = _ref; | ||
if (reason === 'user') { | ||
controller.abort(); | ||
} | ||
events.onCancelAll(file.id, () => { | ||
controller.abort(); | ||
}); | ||
@@ -341,0 +335,0 @@ try { |
{ | ||
"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": "4.0.0-beta.5", | ||
"version": "4.0.0-beta.6", | ||
"license": "MIT", | ||
@@ -27,4 +27,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/companion-client": "^4.0.0-beta.6", | ||
"@uppy/utils": "^6.0.0-beta.7" | ||
"@uppy/companion-client": "^4.0.0-beta.7", | ||
"@uppy/utils": "^6.0.0-beta.8" | ||
}, | ||
@@ -36,5 +36,5 @@ "devDependencies": { | ||
"peerDependencies": { | ||
"@uppy/core": "^4.0.0-beta.8" | ||
"@uppy/core": "^4.0.0-beta.9" | ||
}, | ||
"stableVersion": "3.6.4" | ||
} |
@@ -200,5 +200,3 @@ import BasePlugin from '@uppy/core/lib/BasePlugin.js' | ||
this.uppy.emit('upload-progress', file, { | ||
// TODO: do not send `uploader` in next major | ||
// @ts-expect-error we can't type this and we should remove it | ||
uploader: this, | ||
uploadStarted: file.progress.uploadStarted ?? 0, | ||
bytesUploaded: (event.loaded / event.total) * file.size!, | ||
@@ -351,6 +349,4 @@ bytesTotal: file.size, | ||
events.onFileRemove(file.id, () => controller.abort()) | ||
events.onCancelAll(file.id, ({ reason }) => { | ||
if (reason === 'user') { | ||
controller.abort() | ||
} | ||
events.onCancelAll(file.id, () => { | ||
controller.abort() | ||
}) | ||
@@ -357,0 +353,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
82250
1024