Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Node.js 10 #26

Merged
merged 1 commit into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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