@uppy/tus
Advanced tools
Comparing version 3.5.4 to 4.0.0-beta.1
# @uppy/tus | ||
## 4.0.0-beta.1 | ||
Released: 2024-03-28 | ||
Included in: Uppy v4.0.0-beta.1 | ||
- @uppy/aws-s3-multipart,@uppy/tus,@uppy/utils,@uppy/xhr-upload: Make `allowedMetaFields` consistent (Merlijn Vos / #5011) | ||
## 3.5.1 | ||
@@ -4,0 +11,0 @@ |
@@ -14,2 +14,3 @@ 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 { filterNonFailedFiles, filterFilesToEmitUploadStarted } from '@uppy/utils/lib/fileFilters'; | ||
import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields'; | ||
import getFingerprint from "./getFingerprint.js"; | ||
@@ -20,3 +21,3 @@ | ||
const packageJson = { | ||
"version": "3.5.4" | ||
"version": "4.0.0-beta.1" | ||
}; | ||
@@ -49,3 +50,4 @@ /** | ||
retryDelays: tusDefaultOptions.retryDelays, | ||
withCredentials: false | ||
withCredentials: false, | ||
allowedMetaFields: true | ||
}; | ||
@@ -404,5 +406,3 @@ var _retryDelayIterator = /*#__PURE__*/_classPrivateFieldLooseKey("retryDelayIterator"); | ||
const meta = {}; | ||
const allowedMetaFields = Array.isArray(opts.allowedMetaFields) ? opts.allowedMetaFields | ||
// Send along all fields by default. | ||
: Object.keys(file.meta); | ||
const allowedMetaFields = getAllowedMetaFields(opts.allowedMetaFields, file.meta); | ||
allowedMetaFields.forEach(item => { | ||
@@ -409,0 +409,0 @@ // tus type definition for metadata only accepts `Record<string, string>` |
{ | ||
"name": "@uppy/tus", | ||
"description": "Resumable uploads for Uppy using Tus.io", | ||
"version": "3.5.4", | ||
"version": "4.0.0-beta.1", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"types": "types/index.d.ts", | ||
"type": "module", | ||
@@ -26,4 +25,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@uppy/companion-client": "^3.8.0", | ||
"@uppy/utils": "^5.7.5", | ||
"@uppy/companion-client": "^4.0.0-beta.1", | ||
"@uppy/utils": "^6.0.0-beta.1", | ||
"tus-js-client": "^3.1.3" | ||
@@ -35,4 +34,5 @@ }, | ||
"peerDependencies": { | ||
"@uppy/core": "^3.10.0" | ||
} | ||
"@uppy/core": "^4.0.0-beta.1" | ||
}, | ||
"stableVersion": "3.5.4" | ||
} |
@@ -20,2 +20,3 @@ import BasePlugin, { | ||
import type { RequestClient } from '@uppy/companion-client' | ||
import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' | ||
import getFingerprint from './getFingerprint.ts' | ||
@@ -60,3 +61,3 @@ | ||
withCredentials?: boolean | ||
allowedMetaFields?: string[] | ||
allowedMetaFields?: boolean | string[] | ||
rateLimitedQueue?: RateLimitedQueue | ||
@@ -97,2 +98,3 @@ } | ||
withCredentials: false, | ||
allowedMetaFields: true, | ||
} satisfies Partial<TusOpts<any, any>> | ||
@@ -433,7 +435,6 @@ | ||
const meta: Record<string, string> = {} | ||
const allowedMetaFields = | ||
Array.isArray(opts.allowedMetaFields) ? | ||
opts.allowedMetaFields | ||
// Send along all fields by default. | ||
: Object.keys(file.meta) | ||
const allowedMetaFields = getAllowedMetaFields( | ||
opts.allowedMetaFields, | ||
file.meta, | ||
) | ||
allowedMetaFields.forEach((item) => { | ||
@@ -440,0 +441,0 @@ // tus type definition for metadata only accepts `Record<string, string>` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103364
15
1244
1
+ Added@uppy/companion-client@4.1.0(transitive)
+ Added@uppy/core@4.2.0(transitive)
+ Added@uppy/store-default@4.1.0(transitive)
+ Added@uppy/utils@6.0.2(transitive)
+ Addednanoid@5.0.7(transitive)
- Removed@uppy/companion-client@3.8.2(transitive)
- Removed@uppy/core@3.13.1(transitive)
- Removed@uppy/store-default@3.2.2(transitive)
- Removed@uppy/utils@5.9.0(transitive)
- Removednanoid@4.0.2(transitive)
Updated@uppy/utils@^6.0.0-beta.1