Skip to content

Commit

Permalink
Upgrade dependancies (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie authored and edi9999 committed Jul 23, 2018
1 parent 8fd0424 commit 7f81512
Show file tree
Hide file tree
Showing 7 changed files with 2,487 additions and 1,541 deletions.
2,439 changes: 1,364 additions & 1,075 deletions browser/lib/jimp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion browser/lib/jimp.min.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const Resize2 = require('./resize2.js');

const isDef = v => typeof v !== 'undefined' && v !== null;

BigNumber.set({
ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
});

// logging methods

let chars = 0;
Expand Down Expand Up @@ -456,7 +460,7 @@ function getMIMEFromBuffer(buffer, path) {
if (path) {
// If a path is supplied, and fileType yields no results, then retry with MIME
// Path can be either a file path or a url
return MIME.lookup(path);
return MIME.getType(path);
}

return null;
Expand Down Expand Up @@ -1094,7 +1098,7 @@ Jimp.prototype.getMIME = function() {
Jimp.prototype.getExtension = function() {
const mime = this.getMIME();

return MIME.extension(mime);
return MIME.getExtension(mime);
};

/**
Expand Down Expand Up @@ -4198,7 +4202,7 @@ Jimp.prototype.write = function(path, cb) {
}

const that = this;
const mime = MIME.lookup(path);
const mime = MIME.getType(path);
const pathObj = Path.parse(path);

if (pathObj.dir) {
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
"author": "Oliver Moran <oliver.moran@gmail.com>",
"license": "MIT",
"dependencies": {
"bignumber.js": "^2.1.0",
"bmp-js": "0.0.3",
"bignumber.js": "^7.2.1",
"bmp-js": "0.1.0",
"buffer": "^5.0.2",
"es6-promise": "^3.0.2",
"es6-promise": "^4.2.4",
"exif-parser": "^0.1.9",
"file-type": "^3.1.0",
"file-type": "^8.1.0",
"jpeg-js": "^0.3.4",
"load-bmfont": "^1.2.3",
"mime": "^1.3.4",
"mime": "^2.3.1",
"mkdirp": "0.5.1",
"omggif": "^1.0.9",
"phin": "^2.9.0",
"pixelmatch": "^4.0.0",
"pngjs": "^3.0.0",
"raw-body": "^2.3.2",
"tinycolor2": "^1.1.2",
"utif": "^1.1.2"
"utif": "^2.0.0"
},
"devDependencies": {
"babel": "6.23.0",
Expand All @@ -63,22 +63,22 @@
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"browserify": "^14.3.0",
"envify": "^3.4.0",
"browserify": "^16.2.2",
"envify": "^4.1.0",
"express": "^4.13.4",
"husky": "^1.0.0-rc.13",
"istanbul": "^0.4.5",
"karma": "^1.4.0",
"karma": "^2.0.4",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-generic-preprocessor": "^1.1.0",
"karma-mocha": "^1.3.0",
"karma-mocha-own-reporter": "^1.1.2",
"lint-staged": "^7.2.0",
"mocha": "^3.2.0",
"mocha": "^5.2.0",
"prettier": "^1.13.7",
"should": "^11.1.2",
"uglify-js": "^2.7.5",
"should": "^13.2.1",
"uglify-js": "^3.4.5",
"xo": "^0.21.1"
},
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions test/filetypes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ describe('FileType', () => {
it('load BMP', done => {
new Jimp(imagesDir + '/windows95.bmp', function(err) {
if (err) done(err);
this.getPixelColor(10, 10).should.be.equal(0xf7f7efff);
this.getPixelColor(150, 80).should.be.equal(0xd6ad73ff);
this.getPixelColor(190, 200).should.be.equal(0x00c3f7ff);
this.getPixelColor(10, 10).should.be.equal(0xf7f7ef);
this.getPixelColor(150, 80).should.be.equal(0xd6ad73);
this.getPixelColor(190, 200).should.be.equal(0xc3f7);
done();
});
});
Expand Down
8 changes: 2 additions & 6 deletions tools/browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,8 @@ function bundleSimple(files, config, callback) {

function minify(code) {
console.error('Compressing...');
let ast = UglifyJS.parse(code);
ast.figure_out_scope();
// eslint-disable-next-line new-cap
const compressor = UglifyJS.Compressor({ warnings: false });
ast = ast.transform(compressor);
return ast.print_to_string();

return UglifyJS.minify(code, { warnings: false });
}

if (!module.parent) {
Expand Down

0 comments on commit 7f81512

Please sign in to comment.