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 0.2.4 to 0.2.5

7

CHANGELOG.md
# @uppy/compressor
## 0.2.5
Released: 2022-04-27
Included in: Uppy v2.9.4
- @uppy/compressor: Set meta on file compression (Camilo Forero / #3644)
## 0.2.4

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

14

lib/index.js

@@ -66,3 +66,5 @@ "use strict";

const {
name
name,
type,
size
} = compressedBlob;

@@ -75,6 +77,10 @@ const {

extension,
type: compressedBlob.type,
data: compressedBlob,
size: compressedBlob.size
type,
size,
data: compressedBlob
});
this.uppy.setFileMeta(file.id, {
name,
type
});
} catch (err) {

@@ -81,0 +87,0 @@ this.uppy.log(`[Image Compressor] Failed to compress ${file.id}:`, 'warning');

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

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

"@transloadit/prettier-bytes": "^0.0.9",
"@uppy/utils": "^4.0.6",
"@uppy/utils": "^4.0.7",
"compressorjs": "^1.1.1",

@@ -34,3 +34,3 @@ "preact": "^10.5.13",

"peerDependencies": {
"@uppy/core": "^2.1.7"
"@uppy/core": "^2.1.9"
},

@@ -37,0 +37,0 @@ "publishConfig": {

@@ -53,3 +53,3 @@ import { BasePlugin } from '@uppy/core'

totalCompressedSize += compressedSavingsSize
const { name } = compressedBlob
const { name, type, size } = compressedBlob
const { extension } = getFileNameAndExtension(name)

@@ -59,6 +59,7 @@ this.uppy.setFileState(file.id, {

extension,
type: compressedBlob.type,
type,
size,
data: compressedBlob,
size: compressedBlob.size,
})
this.uppy.setFileMeta(file.id, { name, type })
} catch (err) {

@@ -65,0 +66,0 @@ this.uppy.log(`[Image Compressor] Failed to compress ${file.id}:`, 'warning')

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