@scayle/storefront-core 8.58.0 → 8.59.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 +25 -0
- package/dist/helpers/productHelpers.d.ts +1 -0
- package/dist/helpers/productHelpers.mjs +2 -1
- package/dist/rpc/methods/checkout/checkout.mjs +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/sapi/recommendations.d.ts +1 -0
- package/dist/types/sapi/recommendations.mjs +0 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.59.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed import compatibility issue with the `slugify` package in `productHelpers.ts` to support both ESM and CommonJS module formats.
|
|
8
|
+
|
|
9
|
+
The import was changed from a default import to a namespace import with a fallback, ensuring the `baseSlugify` function works correctly across different module systems and build configurations.
|
|
10
|
+
|
|
11
|
+
**Dependencies**
|
|
12
|
+
|
|
13
|
+
- Updated dependency to @scayle/storefront-api@18.21.0
|
|
14
|
+
- Updated dependency to @scayle/unstorage-scayle-kv-driver@2.0.10
|
|
15
|
+
|
|
16
|
+
## 8.59.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- Added type exports for similar products functionality by re-exporting `SimilarProductsEndpointParameters` and `SimilarProductsEndpointResponseData` from `@scayle/storefront-api`. These types enable type-safe usage of similar products endpoints throughout the storefront core.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
**Dependencies**
|
|
25
|
+
|
|
26
|
+
- Updated dependency to @scayle/storefront-api@18.21.0
|
|
27
|
+
|
|
3
28
|
## 8.58.0
|
|
4
29
|
|
|
5
30
|
## 8.57.3
|
|
@@ -31,6 +31,7 @@ export declare const getOriginalPrice: (price: VariantPrice) => number;
|
|
|
31
31
|
* Calculates the total applied reductions from a price object.
|
|
32
32
|
*
|
|
33
33
|
* @param price The price object containing applied reductions.
|
|
34
|
+
* @param price.appliedReductions Array of applied reductions with absolute and relative amounts.
|
|
34
35
|
*
|
|
35
36
|
* @returns The total applied reductions.
|
|
36
37
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { getFirstAttributeValue } from "@scayle/storefront-api";
|
|
2
|
-
import
|
|
2
|
+
import * as slugifyPackage from "slugify";
|
|
3
3
|
import { ProductImageType } from "../constants/product.mjs";
|
|
4
4
|
import { getAttributeValue, getAttributeValueTuples } from "./attributeHelpers.mjs";
|
|
5
5
|
import { getImageFromList } from "./imageHelpers.mjs";
|
|
6
6
|
import { flattenDeep } from "./arrayHelpers.mjs";
|
|
7
|
+
const baseSlugify = slugifyPackage.default || slugifyPackage;
|
|
7
8
|
export const slugify = (url) => {
|
|
8
9
|
return baseSlugify(url ?? "", {
|
|
9
10
|
lower: true,
|
|
@@ -40,7 +40,7 @@ export const getCheckoutToken = defineRpcHandler(async (jwtPayload = {}, context
|
|
|
40
40
|
...customData,
|
|
41
41
|
...orderCustomData
|
|
42
42
|
}
|
|
43
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.
|
|
43
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.59.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
44
44
|
return {
|
|
45
45
|
accessToken: refreshedAccessToken,
|
|
46
46
|
checkoutJwt
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SimilarProductsEndpointParameters, SimilarProductsEndpointResponseData, } from '@scayle/storefront-api';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.59.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"ufo": "^1.5.4",
|
|
49
49
|
"uncrypto": "^0.1.3",
|
|
50
50
|
"utility-types": "^3.11.0",
|
|
51
|
-
"@scayle/storefront-api": "18.
|
|
51
|
+
"@scayle/storefront-api": "18.21.0",
|
|
52
52
|
"@scayle/unstorage-scayle-kv-driver": "2.0.10"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/crypto-js": "4.2.2",
|
|
56
|
-
"@types/node": "22.19.
|
|
56
|
+
"@types/node": "22.19.7",
|
|
57
57
|
"@types/webpack-env": "1.18.8",
|
|
58
|
-
"@vitest/coverage-v8": "4.0.
|
|
58
|
+
"@vitest/coverage-v8": "4.0.17",
|
|
59
59
|
"dprint": "0.51.1",
|
|
60
60
|
"eslint-formatter-gitlab": "7.0.1",
|
|
61
61
|
"eslint": "9.39.2",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"rimraf": "6.1.2",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
66
|
"unbuild": "3.6.1",
|
|
67
|
-
"unstorage": "1.17.
|
|
68
|
-
"vitest": "4.0.
|
|
69
|
-
"@scayle/eslint-config-storefront": "4.7.
|
|
67
|
+
"unstorage": "1.17.4",
|
|
68
|
+
"vitest": "4.0.17",
|
|
69
|
+
"@scayle/eslint-config-storefront": "4.7.22",
|
|
70
70
|
"@scayle/vitest-config-storefront": "1.0.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|