flat-cache 6.1.13 → 6.1.17

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/dist/index.cjs CHANGED
@@ -248,10 +248,11 @@ var FlatCache = class extends import_hookified.Hookified {
248
248
  return result;
249
249
  }
250
250
  /**
251
- * Returns an array with all the items in the cache { key, value, ttl }
251
+ * Returns an array with all the items in the cache { key, value, expires }
252
252
  * @method items
253
253
  * @returns {Array}
254
254
  */
255
+ // biome-ignore lint/suspicious/noExplicitAny: cache items can store any value
255
256
  get items() {
256
257
  return [...this._cache.items];
257
258
  }
package/dist/index.d.cts CHANGED
@@ -110,15 +110,15 @@ declare class FlatCache extends Hookified {
110
110
  */
111
111
  all(): Record<string, any>;
112
112
  /**
113
- * Returns an array with all the items in the cache { key, value, ttl }
113
+ * Returns an array with all the items in the cache { key, value, expires }
114
114
  * @method items
115
115
  * @returns {Array}
116
116
  */
117
- get items(): {
117
+ get items(): Array<{
118
118
  key: string;
119
119
  value: any;
120
120
  expires?: number;
121
- }[];
121
+ }>;
122
122
  /**
123
123
  * Returns the path to the file where the cache is persisted
124
124
  * @method cacheFilePath
package/dist/index.d.ts CHANGED
@@ -110,15 +110,15 @@ declare class FlatCache extends Hookified {
110
110
  */
111
111
  all(): Record<string, any>;
112
112
  /**
113
- * Returns an array with all the items in the cache { key, value, ttl }
113
+ * Returns an array with all the items in the cache { key, value, expires }
114
114
  * @method items
115
115
  * @returns {Array}
116
116
  */
117
- get items(): {
117
+ get items(): Array<{
118
118
  key: string;
119
119
  value: any;
120
120
  expires?: number;
121
- }[];
121
+ }>;
122
122
  /**
123
123
  * Returns the path to the file where the cache is persisted
124
124
  * @method cacheFilePath
package/dist/index.js CHANGED
@@ -208,10 +208,11 @@ var FlatCache = class extends Hookified {
208
208
  return result;
209
209
  }
210
210
  /**
211
- * Returns an array with all the items in the cache { key, value, ttl }
211
+ * Returns an array with all the items in the cache { key, value, expires }
212
212
  * @method items
213
213
  * @returns {Array}
214
214
  */
215
+ // biome-ignore lint/suspicious/noExplicitAny: cache items can store any value
215
216
  get items() {
216
217
  return [...this._cache.items];
217
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flat-cache",
3
- "version": "6.1.13",
3
+ "version": "6.1.17",
4
4
  "description": "A simple key/value storage using files to persist the data",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -52,9 +52,9 @@
52
52
  "file-system-cache"
53
53
  ],
54
54
  "devDependencies": {
55
- "@biomejs/biome": "^2.2.0",
56
- "@faker-js/faker": "^9.9.0",
57
- "@types/node": "^24.3.0",
55
+ "@biomejs/biome": "^2.2.4",
56
+ "@faker-js/faker": "^10.0.0",
57
+ "@types/node": "^24.5.0",
58
58
  "@vitest/coverage-v8": "^3.2.4",
59
59
  "rimraf": "^6.0.1",
60
60
  "tsup": "^8.5.0",
@@ -63,8 +63,8 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "flatted": "^3.3.3",
66
- "hookified": "^1.11.0",
67
- "cacheable": "^1.10.4"
66
+ "hookified": "^1.12.0",
67
+ "cacheable": "^2.0.3"
68
68
  },
69
69
  "files": [
70
70
  "dist",
@@ -73,8 +73,9 @@
73
73
  "scripts": {
74
74
  "build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
75
75
  "prepublish": "pnpm build",
76
- "test": "biome check --write && vitest run --coverage",
77
- "test:ci": "biome check && vitest run --coverage",
76
+ "lint": "biome check --write --error-on-warnings",
77
+ "test": "pnpm lint && vitest run --coverage",
78
+ "test:ci": "biome check --error-on-warnings && vitest run --coverage",
78
79
  "clean": "rimraf ./dist ./coverage ./node_modules"
79
80
  }
80
81
  }