electron-store
Advanced tools
Comparing version 5.0.0 to 5.1.0
{ | ||
"name": "electron-store", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc", | ||
@@ -36,3 +36,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"conf": "^6.0.0", | ||
"conf": "^6.2.0", | ||
"type-fest": "^0.7.1" | ||
@@ -39,0 +39,0 @@ }, |
@@ -104,5 +104,7 @@ # electron-store [![Build Status](https://travis-ci.org/sindresorhus/electron-store.svg?branch=master)](https://travis-ci.org/sindresorhus/electron-store) | ||
**Don't use this feature until [this issue](https://github.com/sindresorhus/conf/issues/92) has been fixed.** | ||
You can use migrations to perform operations to the store whenever a version is upgraded. | ||
The `migrations` object should consist of a key-value pair of `version`: `handler`. | ||
The `migrations` object should consist of a key-value pair of `'version': handler`. The `version` can also be a [semver range](https://github.com/npm/node-semver#ranges). | ||
@@ -117,10 +119,13 @@ Example: | ||
'0.0.1': store => { | ||
store.set('debug phase', true); | ||
store.set('debugPhase', true); | ||
}, | ||
'1.0.0': store => { | ||
store.delete('debug phase'); | ||
store.set('phase', '1.0'); | ||
store.delete('debugPhase'); | ||
store.set('phase', '1.0.0'); | ||
}, | ||
'1.0.2': store => { | ||
store.set('phase', '>1.0'); | ||
store.set('phase', '1.0.2'); | ||
}, | ||
'>=2.0.0': store => { | ||
store.set('phase', '>=2.0.0'); | ||
} | ||
@@ -145,3 +150,3 @@ } | ||
Storage file location. *Don't specify this unless absolutely necessary!* | ||
Storage file location. *Don't specify this unless absolutely necessary! By default, it will pick the optimal location by adhering to system conventions. You are very likely to get this wrong and annoy users.* | ||
@@ -148,0 +153,0 @@ If a relative path, it's relative to the default cwd. For example, `{cwd: 'unicorn'}` would result in a storage file in `~/Library/Application Support/App Name/unicorn`. |
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
14901
333
Updatedconf@^6.2.0