@scayle/storefront-core 8.14.4 → 8.15.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-api@18.2.1
10
+
11
+ ## 8.15.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Filter out orders from `user.orderSummary` that are not associated with the current shop ID.
16
+
3
17
  ## 8.14.4
4
18
 
5
19
  ### Patch Changes
@@ -232,11 +246,11 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
232
246
  This change will primarily affect users who are currently using the CommonJS format of this package. To update your code, you should replace `require` statements with `import` statements and update your build tooling if necessary.
233
247
 
234
248
  ```TypeScript
235
- const { ... } = require('@scayle/storefront-core');
249
+ const { ... } = require('@scayle/storefront-core')
236
250
 
237
251
  // will become
238
252
 
239
- import { ... } from '@scayle/storefront-core';
253
+ import { ... } from '@scayle/storefront-core'
240
254
  ```
241
255
 
242
256
  ### Patch Changes
@@ -254,11 +268,11 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
254
268
  This change will primarily affect users who are currently using the CommonJS format of this package. To update your code, you should replace `require` statements with `import` statements and update your build tooling if necessary.
255
269
 
256
270
  ```TypeScript
257
- const { ... } = require('@scayle/storefront-core');
271
+ const { ... } = require('@scayle/storefront-core')
258
272
 
259
273
  // will become
260
274
 
261
- import { ... } from '@scayle/storefront-core';
275
+ import { ... } from '@scayle/storefront-core'
262
276
  ```
263
277
 
264
278
  ## 8.4.0
@@ -36,7 +36,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
36
36
  carrier,
37
37
  basketId: context.basketKey,
38
38
  campaignKey
39
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.14.4"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
39
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.15.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
40
40
  return {
41
41
  accessToken: refreshedAccessToken,
42
42
  checkoutJwt
@@ -24,6 +24,9 @@ const fetchUser = async function fetchUser2({ accessToken }, context) {
24
24
  type: "idp"
25
25
  };
26
26
  }
27
+ user.orderSummary = user.orderSummary?.filter(
28
+ ({ shopId: shopId2 }) => shopId2 === context.shopId
29
+ );
27
30
  return user;
28
31
  };
29
32
  const refreshUser = async function refreshUser2(context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.14.4",
3
+ "version": "8.15.1",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "fishery": "^2.2.3"
64
64
  },
65
65
  "dependencies": {
66
- "@scayle/storefront-api": "18.2.0",
66
+ "@scayle/storefront-api": "18.2.1",
67
67
  "@scayle/unstorage-scayle-kv-driver": "0.1.1",
68
68
  "crypto-js": "^4.2.0",
69
69
  "hookable": "^5.5.3",
@@ -76,7 +76,7 @@
76
76
  "devDependencies": {
77
77
  "@scayle/eslint-config-storefront": "4.5.0",
78
78
  "@types/crypto-js": "4.2.2",
79
- "@types/node": "22.13.14",
79
+ "@types/node": "22.13.16",
80
80
  "@types/webpack-env": "1.18.8",
81
81
  "@vitest/coverage-v8": "2.1.9",
82
82
  "dprint": "0.49.1",