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

@uppy/utils

Package Overview
Dependencies
Maintainers
5
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.7.4 to 5.7.5

src/RateLimitedQueue.test.ts

10

CHANGELOG.md
# @uppy/utils
## 5.7.5
Released: 2024-03-27
Included in: Uppy v3.24.0
- @uppy/utils: fix `RateLimitedQueue#wrapPromiseFunction` types (Antoine du Hamel / #5007)
- @uppy/utils: fix `findAllDOMElements` type (Antoine du Hamel / #4997)
- @uppy/utils: fix `AbortablePromise` type (Antoine du Hamel / #4988)
- @uppy/utils: migrate RateLimitedQueue to TS (Merlijn Vos / #4981)
## 5.7.4

@@ -4,0 +14,0 @@

6

lib/findAllDOMElements.js
import isDOMElement from "./isDOMElement.js";
/**
* Find one or more DOM elements.
*/
export default function findAllDOMElements(element) {
function findAllDOMElements(element) {
if (typeof element === 'string') {

@@ -15,2 +14,3 @@ const elements = document.querySelectorAll(element);

return null;
}
}
export default findAllDOMElements;

@@ -270,2 +270,5 @@ 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 next = _classPrivateFieldLooseBase(this, _queuedHandlers)[_queuedHandlers].shift();
if (next == null) {
throw new Error('Invariant violation: next is null');
}
const handler = _classPrivateFieldLooseBase(this, _call)[_call](next.fn);

@@ -276,8 +279,5 @@ next.abort = handler.abort;

function _queue2(fn, options) {
if (options === void 0) {
options = {};
}
const handler = {
fn,
priority: options.priority || 0,
priority: (options == null ? void 0 : options.priority) || 0,
abort: () => {

@@ -284,0 +284,0 @@ _classPrivateFieldLooseBase(this, _dequeue)[_dequeue](handler);

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

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

@@ -25,2 +25,12 @@ /**

}
custom?: {
isSharedDrive: boolean
imageHeight: number
imageWidth: number
imageRotation: number
imageDateTime: string
videoHeight: number
videoWidth: number
videoDurationMillis: number
}
}
import isDOMElement from './isDOMElement.ts'
function findAllDOMElements<T>(
element: T,
context?: ParentNode,
): T extends Element ? [T]
: T extends Node | string ? Element[] | null
: null
/**
* Find one or more DOM elements.
*/
export default function findAllDOMElements(
element: string | Node,
): Node[] | null {
function findAllDOMElements(element: unknown): Node[] | null {
if (typeof element === 'string') {

@@ -20,1 +25,3 @@ const elements = document.querySelectorAll(element)

}
export default findAllDOMElements

@@ -45,5 +45,7 @@ import type { FileProgress } from './FileProgress'

// The user facing type for UppyFile used in uppy.addFile() and uppy.setOptions()
/*
* The user facing type for UppyFile used in uppy.addFile() and uppy.setOptions()
*/
export type MinimalRequiredUppyFile<M extends Meta, B extends Body> = Required<
Pick<UppyFile<M, B>, 'name' | 'data'>
Pick<UppyFile<M, B>, 'name'>
> &

@@ -55,2 +57,41 @@ Partial<

// that is not required.
> & { meta?: M }
> & { meta?: M; data: { size: number | null } }
/*
* We are not entirely sure what a "tag file" is.
* It is used as an intermidiate type between `CompanionFile` and `UppyFile`
* in `@uppy/provider-views` and `@uppy/url`.
* TODO: remove this in favor of UppyFile
*/
export type TagFile<M extends Meta> = {
id?: string
source: string
name: string
type: string
isRemote: boolean
preview?: string
data: {
size: number | null
}
body?: {
url?: string
fileId?: string
}
meta?: {
authorName?: string
authorUrl?: string
relativePath?: string | null
absolutePath?: string
} & M
remote: {
companionUrl: string
url: string
body: {
fileId: string
url?: string
}
providerName?: string
provider?: string
requestClientId: string
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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