From 78472c0bc0e8f4e00877e176c4524382379c79a3 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 10 May 2018 21:00:49 +0700 Subject: [PATCH] Require Node.js 6 --- .travis.yml | 1 - appveyor.yml | 2 +- index.js | 1 + package.json | 4 ++-- test/async.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2dfe660..02c2ae3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,5 @@ node_js: - '10' - '8' - '6' - - '4' after_success: - './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov' diff --git a/appveyor.yml b/appveyor.yml index ea27242..8ca9e69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,8 @@ environment: matrix: + - nodejs_version: '10' - nodejs_version: '8' - nodejs_version: '6' - - nodejs_version: '4' install: - ps: Install-Product node $env:nodejs_version - npm install --global npm@latest diff --git a/index.js b/index.js index 1843955..b3efebe 100644 --- a/index.js +++ b/index.js @@ -26,6 +26,7 @@ module.exports = (input, opts) => Promise.resolve().then(() => { checkPath(input); opts = Object.assign({}, defaults, opts); + // TODO: Use util.promisify when targeting Node.js 8 const mkdir = pify(opts.fs.mkdir); const stat = pify(opts.fs.stat); diff --git a/package.json b/package.json index ec907a7..6f790b1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "sindresorhus.com" }, "engines": { - "node": ">=4" + "node": ">=6" }, "scripts": { "test": "xo && nyc ava" @@ -49,6 +49,6 @@ "nyc": "^11.3.0", "path-type": "^3.0.0", "tempy": "^0.2.1", - "xo": "^0.20.0" + "xo": "*" } } diff --git a/test/async.js b/test/async.js index a0af93b..f82e0e8 100644 --- a/test/async.js +++ b/test/async.js @@ -75,7 +75,7 @@ test('handles null bytes in path', async t => { test.serial('handles invalid path characters', async t => { // We do this to please `nyc` - const platform = process.platform; + const {platform} = process; Object.defineProperty(process, 'platform', { value: 'win32' });