Skip to content

Commit b05129a

Browse files
committed
Require Node.js 8
1 parent 6138851 commit b05129a

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ class Configstore {
2222
this.path = options.configPath || path.join(configDirectory, pathPrefix);
2323

2424
if (defaults) {
25-
this.all = Object.assign({}, defaults, this.all);
25+
this.all = {
26+
...defaults,
27+
...this.all
28+
};
2629
}
2730
}
2831

@@ -55,7 +58,7 @@ class Configstore {
5558
// Make sure the folder exists as it could have been deleted in the meantime
5659
makeDir.sync(path.dirname(this.path), makeDirOptions);
5760

58-
writeFileAtomic.sync(this.path, JSON.stringify(value, null, '\t'), writeFileOptions);
61+
writeFileAtomic.sync(this.path, JSON.stringify(value, undefined, '\t'), writeFileOptions);
5962
} catch (error) {
6063
// Improve the message of permission errors
6164
if (error.code === 'EACCES') {

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "sindresorhus.com"
1111
},
1212
"engines": {
13-
"node": ">=6"
13+
"node": ">=8"
1414
},
1515
"scripts": {
1616
"test": "xo && ava"
@@ -32,15 +32,15 @@
3232
"save"
3333
],
3434
"dependencies": {
35-
"dot-prop": "^4.1.0",
35+
"dot-prop": "^5.1.0",
3636
"graceful-fs": "^4.1.2",
37-
"make-dir": "^2.1.0",
38-
"unique-string": "^1.0.0",
39-
"write-file-atomic": "^2.0.0",
40-
"xdg-basedir": "^3.0.0"
37+
"make-dir": "^3.0.0",
38+
"unique-string": "^2.0.0",
39+
"write-file-atomic": "^3.0.0",
40+
"xdg-basedir": "^4.0.0"
4141
},
4242
"devDependencies": {
43-
"ava": "^1.3.1",
43+
"ava": "^2.1.0",
4444
"xo": "^0.24.0"
4545
}
4646
}

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Default config.
6363

6464
#### options
6565

66+
Type: `object`
67+
6668
##### globalConfigPath
6769

6870
Type: `boolean`<br>

0 commit comments

Comments
 (0)