Skip to content

Commit

Permalink
Require Node.js 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 11, 2019
1 parent 6138851 commit b05129a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ class Configstore {
this.path = options.configPath || path.join(configDirectory, pathPrefix);

if (defaults) {
this.all = Object.assign({}, defaults, this.all);
this.all = {
...defaults,
...this.all
};
}
}

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

writeFileAtomic.sync(this.path, JSON.stringify(value, null, '\t'), writeFileOptions);
writeFileAtomic.sync(this.path, JSON.stringify(value, undefined, '\t'), writeFileOptions);
} catch (error) {
// Improve the message of permission errors
if (error.code === 'EACCES') {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -32,15 +32,15 @@
"save"
],
"dependencies": {
"dot-prop": "^4.1.0",
"dot-prop": "^5.1.0",
"graceful-fs": "^4.1.2",
"make-dir": "^2.1.0",
"unique-string": "^1.0.0",
"write-file-atomic": "^2.0.0",
"xdg-basedir": "^3.0.0"
"make-dir": "^3.0.0",
"unique-string": "^2.0.0",
"write-file-atomic": "^3.0.0",
"xdg-basedir": "^4.0.0"
},
"devDependencies": {
"ava": "^1.3.1",
"ava": "^2.1.0",
"xo": "^0.24.0"
}
}
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Default config.

#### options

Type: `object`

##### globalConfigPath

Type: `boolean`<br>
Expand Down

0 comments on commit b05129a

Please sign in to comment.