Skip to content

Commit

Permalink
Require Node.js 10
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 3, 2020
1 parent 41b0c10 commit e28b8d9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ os:
- windows
language: node_js
node_js:
- '14'
- '12'
- '10'
- '8'
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"main": "dist/source",
"engines": {
"node": ">=8.3.0"
"node": ">=10"
},
"scripts": {
"test": "xo && tsc --noEmit && nyc ava",
"prepare": "npm run build",
"build": "del dist && tsc",
"prepublishOnly": "npm run build"
"test": "xo && npm run build && nyc ava",
"build": "del-cli dist && tsc",
"prepare": "npm run build"
},
"files": [
"dist/source/index.js",
"dist/source/index.d.ts"
"dist/source"
],
"keywords": [
"config",
Expand All @@ -43,39 +42,40 @@
"cache"
],
"dependencies": {
"ajv": "^6.12.0",
"ajv": "^6.12.2",
"debounce-fn": "^4.0.0",
"dot-prop": "^5.2.0",
"env-paths": "^2.2.0",
"json-schema-typed": "^7.0.3",
"make-dir": "^3.0.2",
"make-dir": "^3.1.0",
"onetime": "^5.1.0",
"pkg-up": "^3.1.0",
"semver": "^7.1.3",
"semver": "^7.3.2",
"write-file-atomic": "^3.0.3"
},
"devDependencies": {
"@ava/typescript": "^1.1.1",
"@sindresorhus/tsconfig": "^0.7.0",
"@types/node": "^12.12.12",
"@types/semver": "^7.1.0",
"@types/write-file-atomic": "^3.0.0",
"@types/node": "^14.0.14",
"@types/semver": "^7.3.1",
"@types/write-file-atomic": "^3.0.1",
"ava": "^3.9.0",
"clear-module": "^4.1.0",
"clear-module": "^4.1.1",
"del": "^5.1.0",
"del-cli": "^3.0.0",
"del-cli": "^3.0.1",
"delay": "^4.3.0",
"nyc": "^15.1.0",
"p-event": "^4.2.0",
"tempy": "^0.4.0",
"tempy": "^0.5.0",
"tsd": "^0.12.1",
"typescript": "3.9.5",
"typescript": "3.9.6",
"xo": "^0.32.0"
},
"types": "dist/source",
"ava": {
"files": [
"test/index.ts"
"test/*",
"!test/index.test-d.ts"
],
"timeout": "1m",
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# conf [![Build Status](https://travis-ci.com/sindresorhus/conf.svg?branch=master)](https://travis-ci.com/sindresorhus/conf)
# conf [![Build Status](https://travis-ci.com/sindresorhus/conf.svg?branch=master)](https://travis-ci.com/github/sindresorhus/conf)

> Simple config handling for your app or module
Expand Down
2 changes: 1 addition & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs = require('fs');
import path = require('path');
import crypto = require('crypto');
import assert = require('assert');
import EventEmitter = require('events');
import {EventEmitter} from 'events';
import dotProp = require('dot-prop');
import makeDir = require('make-dir');
import pkgUp = require('pkg-up');
Expand Down
15 changes: 3 additions & 12 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,9 @@ test('.delete() - without dot notation', t => {
t.deepEqual(configWithoutDotNotation.get('foo.bar.zoo'), {awesome: 'redpanda'});
});

test('`watch` option watches for config file changes by another process', async t => {
if (process.platform === 'darwin' && process.version.split('.')[0] === 'v8') {
t.plan(0);
return;
}
const test2 = process.platform === 'darwin' ? test.failing : test;

test2('`watch` option watches for config file changes by another process', async t => {
const cwd = tempy.directory();
const conf1 = new Conf({cwd, watch: true});
const conf2 = new Conf({cwd});
Expand All @@ -800,13 +797,7 @@ test('`watch` option watches for config file changes by another process', async
await pEvent(_events, 'change');
});

test('`watch` option watches for config file changes by file write', async t => {
// TODO: Remove this when targeting Node.js 10.
if (process.platform === 'darwin' && process.version.split('.')[0] === 'v8') {
t.plan(0);
return;
}

test2('`watch` option watches for config file changes by file write', async t => {
const cwd = tempy.directory();
const conf = new Conf({cwd, watch: true});
conf.set('foo', '🐴');
Expand Down
7 changes: 3 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"es2018"
]
},
"files": [
"source/index.ts",
"source/types.ts",
"test/index.ts"
"include": [
"source",
"test"
]
}

0 comments on commit e28b8d9

Please sign in to comment.