Socket
Socket
Sign inDemoInstall

@uppy/tus

Package Overview
Dependencies
35
Maintainers
6
Versions
111
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.2 to 3.4.0

13

lib/index.js

@@ -6,3 +6,2 @@ function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }

import * as tus from 'tus-js-client';
import { Provider, RequestClient } from '@uppy/companion-client';
import EventManager from '@uppy/utils/lib/EventManager';

@@ -16,3 +15,3 @@ import NetworkError from '@uppy/utils/lib/NetworkError';

const packageJson = {
"version": "3.3.2"
"version": "3.4.0"
};

@@ -141,3 +140,2 @@ /** @typedef {import('..').TusOptions} TusOptions */

const defaultOptions = {
useFastRemoteRetry: true,
limit: 20,

@@ -533,7 +531,3 @@ retryDelays: tusDefaultOptions.retryDelays,

if (file.isRemote) {
// INFO: the url plugin needs to use RequestClient,
// while others use Provider
const Client = file.remote.providerOptions.provider ? Provider : RequestClient;
const getQueue = () => this.requests;
const client = new Client(this.uppy, file.remote.providerOptions, getQueue);
const controller = new AbortController();

@@ -544,4 +538,5 @@ const removedHandler = removedFile => {

this.uppy.on('file-removed', removedHandler);
const uploadPromise = client.uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {
signal: controller.signal
const uploadPromise = file.remote.requestClient.uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {
signal: controller.signal,
getQueue
});

@@ -548,0 +543,0 @@ this.requests.wrapSyncFunction(() => {

{
"name": "@uppy/tus",
"description": "Resumable uploads for Uppy using Tus.io",
"version": "3.3.2",
"version": "3.4.0",
"license": "MIT",

@@ -26,4 +26,4 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/companion-client": "^3.5.0",
"@uppy/utils": "^5.5.2",
"@uppy/companion-client": "^3.6.0",
"@uppy/utils": "^5.6.0",
"tus-js-client": "^3.0.0"

@@ -35,4 +35,4 @@ },

"peerDependencies": {
"@uppy/core": "^3.6.0"
"@uppy/core": "^3.7.0"
}
}
import BasePlugin from '@uppy/core/lib/BasePlugin.js'
import * as tus from 'tus-js-client'
import { Provider, RequestClient } from '@uppy/companion-client'
import EventManager from '@uppy/utils/lib/EventManager'

@@ -70,3 +69,2 @@ import NetworkError from '@uppy/utils/lib/NetworkError'

const defaultOptions = {
useFastRemoteRetry: true,
limit: 20,

@@ -487,7 +485,3 @@ retryDelays: tusDefaultOptions.retryDelays,

if (file.isRemote) {
// INFO: the url plugin needs to use RequestClient,
// while others use Provider
const Client = file.remote.providerOptions.provider ? Provider : RequestClient
const getQueue = () => this.requests
const client = new Client(this.uppy, file.remote.providerOptions, getQueue)
const controller = new AbortController()

@@ -500,6 +494,6 @@

const uploadPromise = client.uploadRemoteFile(
const uploadPromise = file.remote.requestClient.uploadRemoteFile(
file,
this.#getCompanionClientArgs(file),
{ signal: controller.signal },
{ signal: controller.signal, getQueue },
)

@@ -506,0 +500,0 @@

@@ -30,3 +30,2 @@ import type { PluginOptions, BasePlugin, UppyFile } from '@uppy/core'

limit?: number
useFastRemoteRetry?: boolean
withCredentials?: boolean

@@ -33,0 +32,0 @@ onShouldRetry?: (

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc