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

@uppy/utils

Package Overview
Dependencies
Maintainers
8
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 4.1.2 to 4.1.3

7

CHANGELOG.md
# @uppy/utils
## 4.1.3
Released: 2022-08-30
Included in: Uppy v2.13.5
- @uppy/utils: fix `relativePath` when drag&dropping a folder (Antoine du Hamel / #4043)
## 4.1.2

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

11

lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js
"use strict";
const getRelativePath = require("./getRelativePath.js");
const getFilesAndDirectoriesFromDirectory = require("./getFilesAndDirectoriesFromDirectory.js");

@@ -16,2 +14,3 @@ /**

kind: entry.isFile ? 'file' : entry.isDirectory ? 'directory' : undefined,
name: entry.name,

@@ -36,3 +35,3 @@ getFile() {

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

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

if (file !== null) {
file.relativePath = getRelativePath(entry);
file.relativePath = relativePath ? `${relativePath}/${entry.name}` : null;
yield file;

@@ -49,3 +48,3 @@ }

for await (const handle of entry.values()) {
yield* createPromiseToAddFileOrParseDirectory(handle);
yield* createPromiseToAddFileOrParseDirectory(handle, `${relativePath}/${entry.name}`);
}

@@ -75,3 +74,3 @@ }

try {
yield* createPromiseToAddFileOrParseDirectory(entry, logDropError);
yield* createPromiseToAddFileOrParseDirectory(entry, '');
} catch (err) {

@@ -78,0 +77,0 @@ if (lastResortFile) {

{
"name": "@uppy/utils",
"description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.",
"version": "4.1.2",
"version": "4.1.3",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -1,2 +0,1 @@

import getRelativePath from './getRelativePath.js'
import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.js'

@@ -12,2 +11,3 @@

kind: entry.isFile ? 'file' : entry.isDirectory ? 'directory' : undefined,
name: entry.name,
getFile () {

@@ -29,3 +29,3 @@ return new Promise((resolve, reject) => entry.file(resolve, reject))

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

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

if (file !== null) {
file.relativePath = getRelativePath(entry)
file.relativePath = relativePath ? `${relativePath}/${entry.name}` : null
yield file

@@ -41,3 +41,3 @@ }

for await (const handle of entry.values()) {
yield* createPromiseToAddFileOrParseDirectory(handle)
yield* createPromiseToAddFileOrParseDirectory(handle, `${relativePath}/${entry.name}`)
}

@@ -60,3 +60,3 @@ }

try {
yield* createPromiseToAddFileOrParseDirectory(entry, logDropError)
yield* createPromiseToAddFileOrParseDirectory(entry, '')
} catch (err) {

@@ -63,0 +63,0 @@ if (lastResortFile) {

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