flat-cache 1.3.1 → 1.3.2

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.
Files changed (3) hide show
  1. package/changelog.md +10 -0
  2. package/package.json +4 -4
  3. package/utils.js +5 -5
package/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
 
2
2
  # flat-cache - Changelog
3
+ ## v1.3.2
4
+ - **Refactoring**
5
+ - remove yarn.lock file - [704c6c4]( https://github.com/royriojas/flat-cache/commit/704c6c4 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:41:08
6
+
7
+
8
+ - **undefined**
9
+ - replace circular-json with flatted ([#23](https://github.com/royriojas/flat-cache/issues/23))" - [db12d74]( https://github.com/royriojas/flat-cache/commit/db12d74 ), [Roy Riojas](https://github.com/Roy Riojas), 07/11/2018 18:40:39
10
+
11
+ This reverts commit 00f689277a75e85fef28e6a048fad227afc525e6.
12
+
3
13
  ## v1.3.1
4
14
  - **Refactoring**
5
15
  - upgrade deps to remove some security warnings - [f405719]( https://github.com/royriojas/flat-cache/commit/f405719 ), [Roy Riojas](https://github.com/Roy Riojas), 06/11/2018 15:07:31
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flat-cache",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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",
@@ -23,9 +23,9 @@
23
23
  "npm run verify --silent"
24
24
  ],
25
25
  "scripts": {
26
- "beautify": "esbeautifier cache.js test/specs/**/*.js",
26
+ "beautify": "esbeautifier 'cache.js' 'test/specs/**/*.js'",
27
27
  "beautify-check": "npm run beautify -- -k",
28
- "eslint": "eslinter cache.js utils.js specs/**/*.js",
28
+ "eslint": "eslinter 'cache.js' 'utils.js' 'specs/**/*.js'",
29
29
  "eslint-fix": "npm run eslint -- --fix",
30
30
  "autofix": "npm run beautify && npm run eslint-fix",
31
31
  "check": "npm run beautify-check && npm run eslint",
@@ -79,8 +79,8 @@
79
79
  "watch-run": "^1.2.2"
80
80
  },
81
81
  "dependencies": {
82
+ "circular-json": "^0.3.1",
82
83
  "del": "^3.0.0",
83
- "flatted": "^2.0.0",
84
84
  "graceful-fs": "^4.1.2",
85
85
  "write": "^0.2.1"
86
86
  }
package/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var fs = require( 'graceful-fs' );
2
2
  var write = require( 'write' );
3
- var flatted = require( 'flatted' );
3
+ var circularJson = require( 'circular-json' );
4
4
 
5
5
  module.exports = {
6
6
 
@@ -15,25 +15,25 @@ module.exports = {
15
15
  },
16
16
 
17
17
  /**
18
- * Read json file synchronously using flatted
18
+ * Read json file synchronously using circular-json
19
19
  *
20
20
  * @method readJSON
21
21
  * @param {String} filePath Json filepath
22
22
  * @returns {*} parse result
23
23
  */
24
24
  readJSON: function ( filePath ) {
25
- return flatted.parse( fs.readFileSync( filePath ).toString() );
25
+ return circularJson.parse( fs.readFileSync( filePath ).toString() );
26
26
  },
27
27
 
28
28
  /**
29
- * Write json file synchronously using flatted
29
+ * Write json file synchronously using circular-json
30
30
  *
31
31
  * @method writeJSON
32
32
  * @param {String} filePath Json filepath
33
33
  * @param {*} data Object to serialize
34
34
  */
35
35
  writeJSON: function (filePath, data ) {
36
- write.sync( filePath, flatted.stringify( data ) );
36
+ write.sync( filePath, circularJson.stringify( data ) );
37
37
  }
38
38
 
39
39
  };