@acodeninja/persist 3.0.0-next.23 → 3.0.0-next.24

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/Connection.js +2 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acodeninja/persist",
3
- "version": "3.0.0-next.23",
3
+ "version": "3.0.0-next.24",
4
4
  "description": "A JSON based data modelling and persistence module with alternate storage mechanisms.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/Connection.js CHANGED
@@ -17,12 +17,6 @@ export default class Connection {
17
17
  */
18
18
  #storage;
19
19
 
20
- /**
21
- * @private
22
- * @property {CacheEngine|undefined}
23
- */
24
- #cache;
25
-
26
20
  /**
27
21
  * @private
28
22
  * @property {Record<String, Model.constructor>}
@@ -32,12 +26,10 @@ export default class Connection {
32
26
  /**
33
27
  * Create a new connection
34
28
  * @param {StorageEngine} storage
35
- * @param {CacheEngine|undefined} cache
36
29
  * @param {Array<Model.constructor>} models
37
30
  */
38
- constructor(storage, cache, models) {
31
+ constructor(storage, models) {
39
32
  this.#storage = storage;
40
- this.#cache = cache;
41
33
  this.#models = Object.fromEntries((models ?? []).map(model => [model.name, model]));
42
34
 
43
35
  if (!this.#storage) throw new MissingArgumentsConnectionError('No storage engine provided');
@@ -420,7 +412,7 @@ export default class Connection {
420
412
 
421
413
  const engine = CreateTransactionalStorageEngine(operations, this.#storage);
422
414
 
423
- const transaction = new this.constructor(engine, this.#cache, Object.values(this.#models));
415
+ const transaction = new this.constructor(engine, Object.values(this.#models));
424
416
 
425
417
  transaction.commit = async () => {
426
418
  try {