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

@uppy/utils

Package Overview
Dependencies
Maintainers
7
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/utils - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

8

CHANGELOG.md
# @uppy/utils
## 5.1.2
Released: 2023-01-26
Included in: Uppy v3.4.0
- @uppy/utils: better fallbacks for the drag & drop API (Antoine du Hamel / #4260)
- @uppy/utils: Fix getSpeed type (referenced `bytesTotal` instead of `uploadStarted`) (Pascal Wengerter / #4263)
## 5.1.1

@@ -4,0 +12,0 @@

16

lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js

@@ -31,3 +31,7 @@ import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.js';

async function* createPromiseToAddFileOrParseDirectory(entry, relativePath) {
async function* createPromiseToAddFileOrParseDirectory(entry, relativePath, lastResortFile) {
if (lastResortFile === void 0) {
lastResortFile = undefined;
}
// For each dropped item, - make sure it's a file/directory, and start deepening in!

@@ -40,3 +44,3 @@ if (entry.kind === 'file') {

yield file;
}
} else if (lastResortFile != null) yield lastResortFile;
} else if (entry.kind === 'directory') {

@@ -46,3 +50,3 @@ for await (const handle of entry.values()) {

}
}
} else if (lastResortFile != null) yield lastResortFile;
}

@@ -70,5 +74,5 @@

try {
yield* createPromiseToAddFileOrParseDirectory(entry, '');
yield* createPromiseToAddFileOrParseDirectory(entry, '', lastResortFile);
} catch (err) {
if (lastResortFile) {
if (lastResortFile != null) {
yield lastResortFile;

@@ -79,4 +83,4 @@ } else {

}
}
} else if (lastResortFile != null) yield lastResortFile;
}
}
{
"name": "@uppy/utils",
"description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.",
"version": "5.1.1",
"version": "5.1.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "types": "types/index.d.ts",

@@ -28,3 +28,3 @@ import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.js'

async function* createPromiseToAddFileOrParseDirectory (entry, relativePath) {
async function* createPromiseToAddFileOrParseDirectory (entry, relativePath, lastResortFile = undefined) {
// For each dropped item, - make sure it's a file/directory, and start deepening in!

@@ -36,3 +36,3 @@ if (entry.kind === 'file') {

yield file
}
} else if (lastResortFile != null) yield lastResortFile
} else if (entry.kind === 'directory') {

@@ -42,3 +42,3 @@ for await (const handle of entry.values()) {

}
}
} else if (lastResortFile != null) yield lastResortFile
}

@@ -59,5 +59,5 @@

try {
yield* createPromiseToAddFileOrParseDirectory(entry, '')
yield* createPromiseToAddFileOrParseDirectory(entry, '', lastResortFile)
} catch (err) {
if (lastResortFile) {
if (lastResortFile != null) {
yield lastResortFile

@@ -68,4 +68,4 @@ } else {

}
}
} else if (lastResortFile != null) yield lastResortFile
}
}

@@ -192,4 +192,4 @@ declare module '@uppy/utils/lib/Translator' {

function getSpeed (progress: {
bytesTotal: number
bytesUploaded: number
uploadStarted: number
}): number

@@ -196,0 +196,0 @@ export default getSpeed

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