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

@uppy/core

Package Overview
Dependencies
Maintainers
5
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/core - npm Package Compare versions

Comparing version 1.16.1 to 1.16.2

35

lib/index.js

@@ -41,2 +41,4 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var findIndex = require('@uppy/utils/lib/findIndex');
var supportsUploadProgress = require('./supportsUploadProgress');

@@ -1453,2 +1455,4 @@

_proto.removePlugin = function removePlugin(instance) {
var _extends4;
this.log("Removing plugin " + instance.id);

@@ -1461,5 +1465,10 @@ this.emit('plugin-remove', instance);

var list = this.plugins[instance.type].slice();
var index = list.indexOf(instance);
var list = this.plugins[instance.type].slice(); // list.indexOf failed here, because Vue3 converted the plugin instance
// to a Proxy object, which failed the strict comparison test:
// obj !== objProxy
var index = findIndex(list, function (item) {
return item.id === instance.id;
});
if (index !== -1) {

@@ -1470,4 +1479,6 @@ list.splice(index, 1);

var updatedState = this.getState();
delete updatedState.plugins[instance.id];
var state = this.getState();
var updatedState = {
plugins: _extends({}, state.plugins, (_extends4 = {}, _extends4[instance.id] = undefined, _extends4))
};
this.setState(updatedState);

@@ -1602,3 +1613,3 @@ }

_proto._createUpload = function _createUpload(fileIDs, opts) {
var _extends4;
var _extends5;

@@ -1628,7 +1639,7 @@ if (opts === void 0) {

allowNewUpload: this.opts.allowMultipleUploads !== false,
currentUploads: _extends({}, currentUploads, (_extends4 = {}, _extends4[uploadID] = {
currentUploads: _extends({}, currentUploads, (_extends5 = {}, _extends5[uploadID] = {
fileIDs: fileIDs,
step: 0,
result: {}
}, _extends4))
}, _extends5))
});

@@ -1653,3 +1664,3 @@ return uploadID;

_proto.addResultData = function addResultData(uploadID, data) {
var _extends5;
var _extends6;

@@ -1668,3 +1679,3 @@ if (!this._getUpload(uploadID)) {

this.setState({
currentUploads: _extends({}, currentUploads, (_extends5 = {}, _extends5[uploadID] = currentUpload, _extends5))
currentUploads: _extends({}, currentUploads, (_extends6 = {}, _extends6[uploadID] = currentUpload, _extends6))
});

@@ -1708,3 +1719,3 @@ }

lastStep = lastStep.then(function () {
var _extends6;
var _extends7;

@@ -1725,3 +1736,3 @@ var _this9$getState = _this9.getState(),

_this9.setState({
currentUploads: _extends({}, currentUploads, (_extends6 = {}, _extends6[uploadID] = updatedUpload, _extends6))
currentUploads: _extends({}, currentUploads, (_extends7 = {}, _extends7[uploadID] = updatedUpload, _extends7))
}); // TODO give this the `updatedUpload` object as its only parameter maybe?

@@ -1886,3 +1897,3 @@ // Otherwise when more metadata may be added to the upload this would keep getting more parameters

Uppy.VERSION = "1.16.1";
Uppy.VERSION = "1.16.2";

@@ -1889,0 +1900,0 @@ module.exports = function (opts) {

{
"name": "@uppy/core",
"description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:",
"version": "1.16.1",
"version": "1.16.2",
"license": "MIT",

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

"@uppy/store-default": "^1.2.5",
"@uppy/utils": "^3.4.1",
"@uppy/utils": "^3.4.2",
"cuid": "^2.1.1",

@@ -33,3 +33,3 @@ "lodash.throttle": "^4.1.1",

},
"gitHead": "2eabc3309983165b3f275c7b6f21fc0e899d11ba"
"gitHead": "4bf107236340dc98f8584f15a06e13ffa9fc31f4"
}

@@ -11,6 +11,6 @@ const Translator = require('@uppy/utils/lib/Translator')

const generateFileID = require('@uppy/utils/lib/generateFileID')
const findIndex = require('@uppy/utils/lib/findIndex')
const supportsUploadProgress = require('./supportsUploadProgress')
const { justErrorsLogger, debugLogger } = require('./loggers')
const Plugin = require('./Plugin') // Exported from here.
class RestrictionError extends Error {

@@ -1325,3 +1325,6 @@ constructor (...args) {

const list = this.plugins[instance.type].slice()
const index = list.indexOf(instance)
// list.indexOf failed here, because Vue3 converted the plugin instance
// to a Proxy object, which failed the strict comparison test:
// obj !== objProxy
const index = findIndex(list, item => item.id === instance.id)
if (index !== -1) {

@@ -1332,4 +1335,9 @@ list.splice(index, 1)

const updatedState = this.getState()
delete updatedState.plugins[instance.id]
const state = this.getState()
const updatedState = {
plugins: {
...state.plugins,
[instance.id]: undefined
}
}
this.setState(updatedState)

@@ -1336,0 +1344,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