From 7a0ba6fed622d76a3c39c7f03de541a7edb5b8dd Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Tue, 13 Feb 2018 11:12:58 -0500 Subject: [PATCH] Replace `blueimp-canvas-to-blob` with `blob-util` --- js/modules/types/attachment.js | 3 +-- package.json | 1 - preload.js | 2 +- yarn.lock | 4 ---- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/js/modules/types/attachment.js b/js/modules/types/attachment.js index f32a21e308..5f9d3c1d18 100644 --- a/js/modules/types/attachment.js +++ b/js/modules/types/attachment.js @@ -1,8 +1,7 @@ /* eslint-env browser */ -const dataURLToBlob = require('blueimp-canvas-to-blob'); const MIME = require('./mime'); -const { arrayBufferToBlob, blobToArrayBuffer } = require('blob-util'); +const { arrayBufferToBlob, blobToArrayBuffer, dataURLToBlob } = require('blob-util'); const { autoOrientImage } = require('../auto_orient_image'); // Increment this everytime we change how attachments are processed. This allows us to diff --git a/package.json b/package.json index 46a696be43..2664a79e61 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ }, "dependencies": { "blob-util": "^1.3.0", - "blueimp-canvas-to-blob": "^3.14.0", "blueimp-load-image": "^2.18.0", "bunyan": "^1.8.12", "config": "^1.28.1", diff --git a/preload.js b/preload.js index 0060ebd59a..dfee366dbd 100644 --- a/preload.js +++ b/preload.js @@ -60,7 +60,7 @@ window.nodeSetImmediate(function() {}); }, 1000); - window.dataURLToBlob = require('blueimp-canvas-to-blob'); + window.dataURLToBlob = require('blob-util').dataURLToBlob; window.loadImage = require('blueimp-load-image'); window.ProxyAgent = require('proxy-agent'); window.EmojiConvertor = require('emoji-js'); diff --git a/yarn.lock b/yarn.lock index b4d5e145e2..0018cb2b87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -468,10 +468,6 @@ bluebird@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" -blueimp-canvas-to-blob@^3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/blueimp-canvas-to-blob/-/blueimp-canvas-to-blob-3.14.0.tgz#ea075ffbfb1436607b0c75e951fb1ceb3ca0288e" - blueimp-load-image@^2.18.0: version "2.18.0" resolved "https://registry.yarnpkg.com/blueimp-load-image/-/blueimp-load-image-2.18.0.tgz#03b93687eb382a7136cfbcbd4f0e936b6763fc0e"