flat-cache 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache.js +1 -1
- package/changelog.md +5 -0
- package/del.js +1 -1
- package/package.json +3 -4
- package/utils.js +4 -4
package/cache.js
CHANGED
package/changelog.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
# flat-cache - Changelog
|
|
3
|
+
## v2.0.1
|
|
4
|
+
- **Refactoring**
|
|
5
|
+
- upgrade node modules to latest versions - [6402ed3]( https://github.com/royriojas/flat-cache/commit/6402ed3 ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 21:47:05
|
|
6
|
+
|
|
7
|
+
|
|
3
8
|
## v2.0.0
|
|
4
9
|
- **Bug Fixes**
|
|
5
10
|
- upgrade package.json lock file - [8d21c7b]( https://github.com/royriojas/flat-cache/commit/8d21c7b ), [Roy Riojas](https://github.com/Roy Riojas), 08/01/2019 20:03:13
|
package/del.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flat-cache",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A stupidly simple key/value storage using files to persist some data",
|
|
5
5
|
"repository": "royriojas/flat-cache",
|
|
6
6
|
"license": "MIT",
|
|
@@ -81,8 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"flatted": "^2.0.0",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"write": "^0.2.1"
|
|
84
|
+
"rimraf": "2.6.3",
|
|
85
|
+
"write": "1.0.3"
|
|
87
86
|
}
|
|
88
87
|
}
|
package/utils.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
var fs = require( '
|
|
1
|
+
var fs = require( 'fs' );
|
|
2
2
|
var write = require( 'write' );
|
|
3
3
|
var flatted = require( 'flatted' );
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
|
-
|
|
7
6
|
tryParse: function ( filePath, defaultValue ) {
|
|
8
7
|
var result;
|
|
9
8
|
try {
|
|
@@ -22,7 +21,9 @@ module.exports = {
|
|
|
22
21
|
* @returns {*} parse result
|
|
23
22
|
*/
|
|
24
23
|
readJSON: function ( filePath ) {
|
|
25
|
-
return flatted.parse( fs.readFileSync( filePath
|
|
24
|
+
return flatted.parse( fs.readFileSync( filePath, {
|
|
25
|
+
encoding: 'utf8'
|
|
26
|
+
} ) );
|
|
26
27
|
},
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -35,5 +36,4 @@ module.exports = {
|
|
|
35
36
|
writeJSON: function ( filePath, data ) {
|
|
36
37
|
write.sync( filePath, flatted.stringify( data ) );
|
|
37
38
|
}
|
|
38
|
-
|
|
39
39
|
};
|