@uppy/compressor
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@uppy/compressor", | ||
"description": "Uppy plugin that compresses images before upload, saving up to 60% in size", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "^0.0.9", | ||
"@uppy/utils": "^5.5.0", | ||
"@uppy/utils": "^5.5.1", | ||
"compressorjs": "^1.1.1", | ||
@@ -34,3 +34,3 @@ "preact": "^10.5.13", | ||
"peerDependencies": { | ||
"@uppy/core": "^3.5.0" | ||
"@uppy/core": "^3.5.1" | ||
}, | ||
@@ -41,4 +41,4 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@jest/globals": "^29.0.0" | ||
"vitest": "^0.34.5" | ||
} | ||
} |
@@ -1,5 +0,6 @@ | ||
import { describe, expect, it } from '@jest/globals' | ||
import { describe, expect, it } from 'vitest' | ||
import Core from '@uppy/core' | ||
import getFileNameAndExtension from '@uppy/utils/lib/getFileNameAndExtension' | ||
import fs from 'node:fs' | ||
import path from 'node:path' | ||
import CompressorPlugin from './index.js' | ||
@@ -17,3 +18,4 @@ | ||
const sampleImage = fs.readFileSync(new URL('../../../../e2e/cypress/fixtures/images/image.jpg', import.meta.url)) | ||
// eslint-disable-next-line no-restricted-globals | ||
const sampleImage = fs.readFileSync(path.join(__dirname, '../../../../e2e/cypress/fixtures/images/image.jpg')) | ||
@@ -20,0 +22,0 @@ const file1 = { source: 'jest', name: 'image-1.jpeg', type: 'image/jpeg', data: new File([sampleImage], 'image-1.jpeg', { type: 'image/jpeg' }) } |
28256
331
Updated@uppy/utils@^5.5.1