From 4fa531f736181094ea38961e4174696fe647f4ab Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 18 Feb 2021 14:10:44 +0700 Subject: [PATCH] Require Node.js 10 and upgrade Mocha Closes #203 Fixes #202 --- package.json | 19 ++++++++++--------- test/test.js | 2 +- test/utils.js | 4 ++-- utils.js | 2 ++ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 229832e..faf9ecc 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,14 @@ "description": "Run Mocha tests", "license": "MIT", "repository": "sindresorhus/gulp-mocha", + "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, "engines": { - "node": ">=8" + "node": ">=10" }, "scripts": { "test": "xo && ava" @@ -35,18 +36,18 @@ ], "dependencies": { "dargs": "^7.0.0", - "execa": "^2.0.4", - "mocha": "^6.2.0", + "execa": "^5.0.0", + "mocha": "^8.3.0", "plugin-error": "^1.0.1", - "supports-color": "^7.0.0", - "through2": "^3.0.1" + "supports-color": "^8.1.1", + "through2": "^4.0.2" }, "devDependencies": { "ava": "^2.3.0", "gulp": "^4.0.2", - "p-event": "^4.1.0", - "vinyl": "^2.1.0", - "xo": "^0.24.0" + "p-event": "^4.2.0", + "vinyl": "^2.2.1", + "xo": "^0.37.1" }, "peerDependencies": { "gulp": ">=4" diff --git a/test/test.js b/test/test.js index 9e879af..d9a3e42 100644 --- a/test/test.js +++ b/test/test.js @@ -3,7 +3,7 @@ import path from 'path'; import test from 'ava'; import Vinyl from 'vinyl'; import pEvent from 'p-event'; -import mocha from '..'; +import mocha from '../index.js'; function fixture(name) { const fileName = path.join(__dirname, 'fixtures', name); diff --git a/test/utils.js b/test/utils.js index 34f5be8..002678b 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,9 +1,9 @@ import test from 'ava'; -import m from '../utils'; +import utils from '../utils.js'; test('convertObjectToList produces a comma separated string of k=v', t => { t.is( - m.convertObjectToList({key1: 'value1', key2: 'value2', key99: 'value99'}), + utils.convertObjectToList({key1: 'value1', key2: 'value2', key99: 'value99'}), 'key1=value1,key2=value2,key99=value99' ); }); diff --git a/utils.js b/utils.js index 693f93d..afd1ce3 100644 --- a/utils.js +++ b/utils.js @@ -2,6 +2,8 @@ function convertObjectToList(object) { return Object.entries(object) + // TODO: Stop using `.reduce` + // eslint-disable-next-line unicorn/no-array-reduce .reduce((result, current) => result.concat(`${current[0]}=${current[1]}`), []) .join(','); }