Socket
Socket
Sign inDemoInstall

@uppy/compressor

Package Overview
Dependencies
14
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.3.2

7

CHANGELOG.md
# @uppy/compressor
## 0.3.2
Released: 2022-08-08
Included in: Uppy v2.13.3
- @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

@@ -71,10 +71,15 @@ "use strict";

} = 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

@@ -81,0 +86,0 @@ });

{
"name": "@uppy/compressor",
"description": "Uppy plugin that compresses images before upload, saving up to 60% in size",
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",

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

"@transloadit/prettier-bytes": "^0.0.9",
"@uppy/utils": "^4.1.0",
"@uppy/utils": "^4.1.1",
"compressorjs": "^1.1.1",

@@ -30,0 +30,0 @@ "preact": "^10.5.13",

@@ -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

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