diff --git a/.travis.yml b/.travis.yml index 985b15c..a18175d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,6 @@ os: - windows language: node_js node_js: + - '14' - '12' - '10' - - '8' diff --git a/package.json b/package.json index 1180a90..ccdf5a4 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "repository": "imagemin/imagemin-optipng", "engines": { - "node": ">=8" + "node": ">=10" }, "scripts": { "test": "xo && ava" @@ -25,10 +25,10 @@ "dependencies": { "exec-buffer": "^3.0.0", "is-png": "^2.0.0", - "optipng-bin": "^6.0.0" + "optipng-bin": "^7.0.0" }, "devDependencies": { - "ava": "^2.4.0", - "xo": "^0.25.3" + "ava": "^3.8.0", + "xo": "^0.30.0" } } diff --git a/test.js b/test.js index 7009a2f..4a53ce7 100644 --- a/test.js +++ b/test.js @@ -1,8 +1,8 @@ -import fs from 'fs'; -import path from 'path'; -import isPng from 'is-png'; -import test from 'ava'; -import optipng from '.'; +const fs = require('fs'); +const path = require('path'); +const isPng = require('is-png'); +const test = require('ava'); +const optipng = require('.'); const fixture = fs.readFileSync(path.join(__dirname, 'fixture.png')); const fixtureBroken = fs.readFileSync(path.join(__dirname, 'fixture_broken.png')); @@ -14,7 +14,7 @@ test('optimize a PNG', async t => { }); test('throw on empty input', async t => { - await t.throwsAsync(optipng()(), /Expected a buffer/); + await t.throwsAsync(optipng()(), {message: /Expected a buffer/}); }); test('bitDepthReduction option', async t => {