Comparing version 1.1.2 to 1.2.0
@@ -8,2 +8,3 @@ 'use strict'; | ||
const envPaths = require('env-paths'); | ||
const writeFileAtomic = require('write-file-atomic'); | ||
@@ -94,3 +95,3 @@ const obj = () => Object.create(null); | ||
fs.writeFileSync(this.path, JSON.stringify(val, null, '\t')); | ||
writeFileAtomic.sync(this.path, JSON.stringify(val, null, '\t')); | ||
} | ||
@@ -97,0 +98,0 @@ // TODO: Use `Object.entries()` here at some point |
100
package.json
{ | ||
"name": "conf", | ||
"version": "1.1.2", | ||
"description": "Simple config handling for your app or module", | ||
"license": "MIT", | ||
"repository": "sindresorhus/conf", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"config", | ||
"store", | ||
"app", | ||
"storage", | ||
"conf", | ||
"configuration", | ||
"settings", | ||
"preferences", | ||
"json", | ||
"data", | ||
"persist", | ||
"persistent", | ||
"save", | ||
"load", | ||
"read", | ||
"write", | ||
"cache" | ||
], | ||
"dependencies": { | ||
"dot-prop": "^4.1.0", | ||
"env-paths": "^1.0.0", | ||
"make-dir": "^1.0.0", | ||
"pkg-up": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"clear-module": "^2.1.0", | ||
"del": "^2.2.1", | ||
"tempy": "^0.1.0", | ||
"xo": "*" | ||
} | ||
"name": "conf", | ||
"version": "1.2.0", | ||
"description": "Simple config handling for your app or module", | ||
"license": "MIT", | ||
"repository": "sindresorhus/conf", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"config", | ||
"store", | ||
"app", | ||
"storage", | ||
"conf", | ||
"configuration", | ||
"settings", | ||
"preferences", | ||
"json", | ||
"data", | ||
"persist", | ||
"persistent", | ||
"save", | ||
"load", | ||
"read", | ||
"write", | ||
"cache" | ||
], | ||
"dependencies": { | ||
"dot-prop": "^4.1.0", | ||
"env-paths": "^1.0.0", | ||
"make-dir": "^1.0.0", | ||
"pkg-up": "^2.0.0", | ||
"write-file-atomic": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"clear-module": "^2.1.0", | ||
"del": "^3.0.0", | ||
"tempy": "^0.1.0", | ||
"xo": "*" | ||
} | ||
} |
@@ -11,3 +11,3 @@ # conf [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/conf.svg?branch=master)](https://travis-ci.org/sindresorhus/conf) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/n88jwh3aju39i0p2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/conf/branch/master) | ||
``` | ||
$ npm install --save conf | ||
$ npm install conf | ||
``` | ||
@@ -36,3 +36,3 @@ | ||
Or [create a subclass](https://github.com/sindresorhus/electron-config/blob/master/index.js). | ||
Or [create a subclass](https://github.com/sindresorhus/electron-store/blob/master/index.js). | ||
@@ -91,2 +91,4 @@ | ||
It writes atomically, so if the process crashes during a write it will not corrupt the existing config. | ||
#### .set(object) | ||
@@ -141,3 +143,3 @@ | ||
- [electron-config](https://github.com/sindresorhus/electron-config) - Simple config handling for your Electron app or module | ||
- [electron-store](https://github.com/sindresorhus/electron-store) - Simple data persistence for your Electron app or module | ||
- [cache-conf](https://github.com/SamVerschueren/cache-conf) - Simple cache config handling for your app or module | ||
@@ -144,0 +146,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8483
90
147
5
+ Addedwrite-file-atomic@^2.3.0
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedwrite-file-atomic@2.4.3(transitive)