Skip to content

Commit

Permalink
Require Node.js 10 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch committed May 24, 2020
1 parent 552a3ab commit fd32870
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ os:
- windows
language: node_js
node_js:
- '14'
- '12'
- '10'
- '8'
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"repository": "imagemin/imagemin-optipng",
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -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"
}
}
12 changes: 6 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
@@ -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'));
Expand All @@ -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 => {
Expand Down

0 comments on commit fd32870

Please sign in to comment.