@o3r/store-sync 10.2.0-prerelease.24 → 10.2.0-prerelease.26

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/README.md CHANGED
@@ -9,6 +9,9 @@ This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/ot
9
9
 
10
10
  ## Description
11
11
 
12
+ [![Stable Version](https://img.shields.io/npm/v/@o3r/store-sync)](https://www.npmjs.com/package/@o3r/store-sync)
13
+ [![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/store-sync?color=green)](https://www.npmjs.com/package/@o3r/store-sync)
14
+
12
15
  This module is exposing an NgRx store synchronization solution (synchronous and asynchronous) via the class `StorageSync`.
13
16
 
14
17
  To facilitate the synchronization, the `StorageSync` class is based on a fork of [ngrx-store-localstorage](https://github.com/btroncone/ngrx-store-localstorage) that is also exposed and includes the following changes on top of the original version:
@@ -22,16 +25,19 @@ To facilitate the synchronization, the `StorageSync` class is based on a fork of
22
25
  - Split code in several files
23
26
  - Migrate tests to Jest
24
27
  - Removal of deprecated `deepmerge` dependency.
25
- - Support of a `smartSync` setup to improve performances
28
+ - Support of a `smartSync` setup to improve performances
26
29
 
27
30
  ### Configuration
31
+
28
32
  #### Smart sync
29
- The original ngrx-store-localstorage synchronize all of your states everytime a state is updated which can lead to a lot
33
+
34
+ The original ngrx-store-localstorage synchronize all of your states everytime a state is updated which can lead to a lot
30
35
  of accesses to the local and session storage and cause performance issue.
31
36
 
32
37
  To avoid this pitfall, by default the @o3r/store-sync only synchronizes a state if its value changed and no longer matches
33
- the storage.
38
+ the storage.
34
39
  This behaviour can be disabled as follows:
40
+
35
41
  ```typescript
36
42
  const storage = new StorageSync({keys: [...myStorekeys]}, {disableSmartSync: true});
37
43
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/store-sync",
3
- "version": "10.2.0-prerelease.24",
3
+ "version": "10.2.0-prerelease.26",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,14 +13,14 @@
13
13
  "otter-module"
14
14
  ],
15
15
  "peerDependencies": {
16
- "@ama-sdk/core": "^10.2.0-prerelease.24",
16
+ "@ama-sdk/core": "^10.2.0-prerelease.26",
17
17
  "@angular-devkit/core": "~17.2.0",
18
18
  "@angular-devkit/schematics": "~17.2.0",
19
19
  "@ngrx/entity": "~17.1.0",
20
20
  "@ngrx/store": "~17.1.0",
21
- "@o3r/core": "^10.2.0-prerelease.24",
22
- "@o3r/logger": "^10.2.0-prerelease.24",
23
- "@o3r/schematics": "^10.2.0-prerelease.24",
21
+ "@o3r/core": "^10.2.0-prerelease.26",
22
+ "@o3r/logger": "^10.2.0-prerelease.26",
23
+ "@o3r/schematics": "^10.2.0-prerelease.26",
24
24
  "fast-deep-equal": "^3.1.3",
25
25
  "rxjs": "^7.8.1"
26
26
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+D;AAE/D,kCAAkC;AAClC,2EAA8E;AAE9E,MAAM,wBAAwB,GAAG;IAC/B,iBAAiB;CAClB,CAAC;AAGF,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;;8CAE+B,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,mFAAmF;QACnF,MAAM,EACJ,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,8BAA8B,EAC9B,kBAAkB,EAClB,mCAAmC,EACpC,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QAEpC,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,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