Socket
Socket
Sign inDemoInstall

@uppy/compressor

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/compressor - npm Package Compare versions

Comparing version 1.0.0-beta.2 to 1.0.0-beta.3

7

CHANGELOG.md
# @uppy/compressor
## 1.0.0-beta.3
Released: 2022-08-16
Included in: Uppy v3.0.0-beta.5
- @uppy/compressor: Fix Compressor being broken when no name is in the compressed blob (Artur Paikin / #3947)
## 0.3.1

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

21

lib/index.js

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

} = compressedBlob;
const {
extension
} = getFileNameAndExtension(name);
this.uppy.setFileState(file.id, {
name,
extension,
type,
size,
const extension = name && getFileNameAndExtension(name).extension;
this.uppy.setFileState(file.id, { ...(name && {
name
}),
...(extension && {
extension
}),
...(type && {
type
}),
...(size && {
size
}),
data: compressedBlob

@@ -74,0 +79,0 @@ });

{
"name": "@uppy/compressor",
"description": "Uppy plugin that compresses images before upload, saving up to 60% in size",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"license": "MIT",

@@ -27,3 +27,3 @@ "main": "lib/index.js",

"@transloadit/prettier-bytes": "^0.0.9",
"@uppy/utils": "^5.0.0-beta",
"@uppy/utils": "^5.0.0-beta.1",
"compressorjs": "^1.1.1",

@@ -34,8 +34,7 @@ "preact": "^10.5.13",

"peerDependencies": {
"@uppy/core": "^3.0.0-beta.2"
"@uppy/core": "^3.0.0-beta.4"
},
"publishConfig": {
"access": "public"
},
"stableVersion": "0.3.0"
}
}

@@ -55,8 +55,8 @@ import { BasePlugin } from '@uppy/core'

const { name, type, size } = compressedBlob
const { extension } = getFileNameAndExtension(name)
const extension = name && getFileNameAndExtension(name).extension
this.uppy.setFileState(file.id, {
name,
extension,
type,
size,
...(name && { name }),
...(extension && { extension }),
...(type && { type }),
...(size && { size }),
data: compressedBlob,

@@ -63,0 +63,0 @@ })

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