@scayle/storefront-core 8.59.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 CHANGED
@@ -1,5 +1,18 @@
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
+
3
16
  ## 8.59.0
4
17
 
5
18
  ### Minor Changes
@@ -1,9 +1,10 @@
1
1
  import { getFirstAttributeValue } from "@scayle/storefront-api";
2
- import baseSlugify from "slugify";
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.59.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.59.0",
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",
@@ -66,8 +66,8 @@
66
66
  "unbuild": "3.6.1",
67
67
  "unstorage": "1.17.4",
68
68
  "vitest": "4.0.17",
69
- "@scayle/vitest-config-storefront": "1.0.0",
70
- "@scayle/eslint-config-storefront": "4.7.21"
69
+ "@scayle/eslint-config-storefront": "4.7.22",
70
+ "@scayle/vitest-config-storefront": "1.0.0"
71
71
  },
72
72
  "scripts": {
73
73
  "clean": "rimraf ./dist",