Skip to content

Commit 064e92d

Browse files
authored
Require Node.js 10 (#32)
1 parent 4616c03 commit 064e92d

4 files changed

Lines changed: 13 additions & 14 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ node_js:
88
- '14'
99
- '12'
1010
- '10'
11-
- '8'
1211
after_success:
1312
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
const fs = require('fs');
33
const path = require('path');
44
const {promisify} = require('util');
5-
const semver = require('semver');
5+
const semverGte = require('semver/functions/gte');
66

7-
const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0');
7+
const useNativeRecursiveOption = semverGte(process.version, '10.12.0');
88

99
// https://github.com/nodejs/node/issues/8987
1010
// https://github.com/libuv/libuv/pull/1088
@@ -90,7 +90,7 @@ const makeDir = async (input, options) => {
9090
if (!stats.isDirectory()) {
9191
throw new Error('The path is not a directory');
9292
}
93-
} catch (_) {
93+
} catch {
9494
throw error;
9595
}
9696

@@ -143,7 +143,7 @@ module.exports.sync = (input, options) => {
143143
if (!options.fs.statSync(pth).isDirectory()) {
144144
throw new Error('The path is not a directory');
145145
}
146-
} catch (_) {
146+
} catch {
147147
throw error;
148148
}
149149
}

index.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as gfs from 'graceful-fs';
88
expectType<Promise<string>>(makeDir('path/to/somewhere'));
99

1010
expectType<Promise<string>>(
11-
makeDir('path/to/somewhere', {mode: parseInt('777', 8)})
11+
makeDir('path/to/somewhere', {mode: 0o777})
1212
);
1313
expectType<Promise<string>>(makeDir('path/to/somewhere', {fs}));
1414
expectType<Promise<string>>(makeDir('path/to/somewhere', {fs: gfs}));
@@ -17,7 +17,7 @@ expectType<Promise<string>>(makeDir('path/to/somewhere', {fs: gfs}));
1717
expectType<string>(makeDirSync('path/to/somewhere'));
1818

1919
expectType<string>(
20-
makeDirSync('path/to/somewhere', {mode: parseInt('777', 8)})
20+
makeDirSync('path/to/somewhere', {mode: 0o777})
2121
);
2222
expectType<string>(makeDirSync('path/to/somewhere', {fs}));
2323
expectType<string>(makeDirSync('path/to/somewhere', {fs: gfs}));

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"url": "https://sindresorhus.com"
1212
},
1313
"engines": {
14-
"node": ">=8"
14+
"node": ">=10"
1515
},
1616
"scripts": {
1717
"test": "xo && nyc ava && tsd"
@@ -42,18 +42,18 @@
4242
"file-system"
4343
],
4444
"dependencies": {
45-
"semver": "^6.0.0"
45+
"semver": "^7.3.2"
4646
},
4747
"devDependencies": {
4848
"@types/graceful-fs": "^4.1.3",
49-
"@types/node": "^13.7.1",
50-
"ava": "^1.4.0",
49+
"@types/node": "^14.14.6",
50+
"ava": "^2.4.0",
5151
"codecov": "^3.2.0",
5252
"graceful-fs": "^4.1.15",
5353
"nyc": "^15.0.0",
5454
"path-type": "^4.0.0",
55-
"tempy": "^0.2.1",
56-
"tsd": "^0.11.0",
57-
"xo": "^0.25.4"
55+
"tempy": "^1.0.0",
56+
"tsd": "^0.13.1",
57+
"xo": "^0.34.2"
5858
}
5959
}

0 commit comments

Comments
 (0)