From 59fb73921f87735f3f6ff5f9dcb7296bc95a1b52 Mon Sep 17 00:00:00 2001 From: Shogo Sensui Date: Tue, 2 Jun 2020 12:11:32 +0900 Subject: [PATCH] Require Node.js 10 (#6) --- .travis.yml | 4 ++-- package.json | 10 +++++----- test/test.js | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ae9d62..9d7745e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: + - '14' + - '12' - '10' - - '8' - - '6' diff --git a/package.json b/package.json index 05725d1..daa9d8f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "pngout": "cli.js" }, "engines": { - "node": ">=6" + "node": ">=10" }, "scripts": { "postinstall": "node lib/install.js", @@ -56,10 +56,10 @@ "logalot": "^2.0.0" }, "devDependencies": { - "ava": "*", + "ava": "^3.8.0", "compare-size": "^3.0.0", - "execa": "^1.0.0", - "tempy": "^0.2.1", - "xo": "*" + "execa": "^4.0.0", + "tempy": "^0.5.0", + "xo": "^0.30.0" } } diff --git a/test/test.js b/test/test.js index d58214d..78d2486 100644 --- a/test/test.js +++ b/test/test.js @@ -7,9 +7,9 @@ const compareSize = require('compare-size'); const pngout = require('..'); test('minify a PNG', async t => { - const tmp = tempy.directory(); + const temporary = tempy.directory(); const src = path.join(__dirname, 'fixtures/test.png'); - const dest = path.join(tmp, 'test.png'); + const dest = path.join(temporary, 'test.png'); const args = [ src, dest, @@ -19,7 +19,7 @@ test('minify a PNG', async t => { ]; await execa(pngout, args); - const res = await compareSize(src, dest); + const result = await compareSize(src, dest); - t.true(res[dest] < res[src]); + t.true(result[dest] < result[src]); });