@scayle/storefront-core 8.59.1 → 8.59.2
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,45 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.59.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Deprecated the `slugify` and `getProductPath` functions in `productHelpers.ts` due to compatibility issues with Nuxt 4.
|
|
8
|
+
|
|
9
|
+
To maintain compatibility with Nuxt 4, these functions have been deprecated. Developers should migrate to using `useRouteHelpers().slugify()` instead. Additionally, the `slugify` package must be added as a direct dependency in your Storefront Application.
|
|
10
|
+
|
|
11
|
+
**Migration:**
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import baseSlugify from 'slugify'
|
|
15
|
+
|
|
16
|
+
const slugify = (url: string | undefined): string => {
|
|
17
|
+
return baseSlugify(url ?? '', {
|
|
18
|
+
lower: true,
|
|
19
|
+
remove: /[*+~.()'"!:@/#?]/g,
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const localePath = useLocalePath()
|
|
24
|
+
|
|
25
|
+
const getProductDetailRoute = (
|
|
26
|
+
id: number,
|
|
27
|
+
name?: string,
|
|
28
|
+
locale?: Locale,
|
|
29
|
+
): string => {
|
|
30
|
+
return localePath(
|
|
31
|
+
{
|
|
32
|
+
name: 'p-productName-id',
|
|
33
|
+
params: {
|
|
34
|
+
productName: slugify(name),
|
|
35
|
+
id: `${id}`,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
locale,
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
3
43
|
## 8.59.1
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
|
@@ -4,6 +4,8 @@ interface Route {
|
|
|
4
4
|
path?: string;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
+
* @deprecated This function will be removed in the next major version. This function has known compatibility issues with Nuxt 4. Please use `slugify()` from the `slugify` package directly in your Storefront Application.
|
|
8
|
+
*
|
|
7
9
|
* Generates a slug from a given URL string.
|
|
8
10
|
*
|
|
9
11
|
* @param url The URL string to slugify.
|
|
@@ -164,6 +166,8 @@ export declare const isVariantInStock: (variants: Variant[], size: Value, sizeAt
|
|
|
164
166
|
*/
|
|
165
167
|
export declare const getAttribute: (product: Product, key: string) => string | undefined;
|
|
166
168
|
/**
|
|
169
|
+
* @deprecated Will be removed in the next major version. Please use `useRouteHelpers().getProductDetailRoute()` instead.
|
|
170
|
+
*
|
|
167
171
|
* Generates the product path based on product name and id
|
|
168
172
|
*
|
|
169
173
|
* @param product The product object
|
|
@@ -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.
|
|
43
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.59.2"}`).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.
|
|
3
|
+
"version": "8.59.2",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"eslint-formatter-gitlab": "7.0.1",
|
|
61
61
|
"eslint": "9.39.2",
|
|
62
62
|
"fishery": "2.4.0",
|
|
63
|
-
"publint": "0.3.
|
|
63
|
+
"publint": "0.3.17",
|
|
64
64
|
"rimraf": "6.1.2",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
66
|
"unbuild": "3.6.1",
|