@searchspring/snap-client 0.39.2 → 0.40.0

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.
@@ -41,7 +41,7 @@ var NetworkCache = /** @class */ (function () {
41
41
  try {
42
42
  if (this.memoryCache[key]) {
43
43
  if (Date.now() < this.memoryCache[key].expires) {
44
- return this.memoryCache[key].value;
44
+ return (0, deepmerge_1.default)({}, this.memoryCache[key].value);
45
45
  }
46
46
  }
47
47
  var stored = sessionStorage.getItem(CACHE_STORAGE_KEY);
@@ -233,6 +233,7 @@ transformSearchResponse.merchandising = function (response) {
233
233
  redirect: (merchandising === null || merchandising === void 0 ? void 0 : merchandising.redirect) || '',
234
234
  content: merchandising.content || {},
235
235
  campaigns: (merchandising === null || merchandising === void 0 ? void 0 : merchandising.triggeredCampaigns) || [],
236
+ personalized: merchandising === null || merchandising === void 0 ? void 0 : merchandising.personalized,
236
237
  };
237
238
  return {
238
239
  merchandising: transformedMerchandising,
@@ -22,7 +22,7 @@ export class NetworkCache {
22
22
  try {
23
23
  if (this.memoryCache[key]) {
24
24
  if (Date.now() < this.memoryCache[key].expires) {
25
- return this.memoryCache[key].value;
25
+ return deepmerge({}, this.memoryCache[key].value);
26
26
  }
27
27
  }
28
28
  const stored = sessionStorage.getItem(CACHE_STORAGE_KEY);
@@ -234,6 +234,7 @@ transformSearchResponse.merchandising = (response) => {
234
234
  redirect: merchandising?.redirect || '',
235
235
  content: merchandising.content || {},
236
236
  campaigns: merchandising?.triggeredCampaigns || [],
237
+ personalized: merchandising?.personalized,
237
238
  };
238
239
  return {
239
240
  merchandising: transformedMerchandising,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchspring/snap-client",
3
- "version": "0.39.2",
3
+ "version": "0.40.0",
4
4
  "description": "Snap Client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -20,12 +20,12 @@
20
20
  "test:watch": "jest --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@searchspring/snap-toolbox": "^0.39.2",
23
+ "@searchspring/snap-toolbox": "^0.40.0",
24
24
  "deepmerge": "4.2.2"
25
25
  },
26
26
  "sideEffects": false,
27
27
  "files": [
28
28
  "dist/**/*"
29
29
  ],
30
- "gitHead": "2ca3741bc997a3d6a8f4dd5332c2c5e5731f0b01"
30
+ "gitHead": "ab543649e56e547374715ad0f018db29d72a0d8e"
31
31
  }