@scayle/storefront-product-listing 2.3.2 → 2.5.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.
- package/CHANGELOG.md +37 -16
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/rpc/methods/categories.js +1 -1
- package/package.json +23 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @scayle/storefront-product-listing
|
|
2
2
|
|
|
3
|
+
## 2.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **[RPC]** Updated built-in RPC methods to use `GET` for safe, cacheable reads and `PUT`/`POST`/`DELETE` for mutations, enabling CDN and browser caching for public data fetches.
|
|
8
|
+
|
|
9
|
+
## 2.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Introduced support for Nuxt 4 while maintaining full backward compatibility with Nuxt 3.
|
|
14
|
+
This enables consumers to migrate to Nuxt 4 ahead of the Nuxt 3 end of support on 31 Jan 2026.
|
|
15
|
+
|
|
16
|
+
- **Version Requirements:**
|
|
17
|
+
- Nuxt 3: `v3.13.0+`
|
|
18
|
+
- Nuxt 4: `v4.2.0+`
|
|
19
|
+
|
|
20
|
+
**NOTE:** Please be aware that the SCAYLE Storefront Application itself does not yet support Nuxt 4. These package updates are a prerequisite. We recommend remaining on Nuxt 3 for your Storefront implementation until further notice.
|
|
21
|
+
|
|
22
|
+
See the [Nuxt 4 Migration Guide](https://nuxt.com/docs/4.x/getting-started/upgrade) for general upgrade details.
|
|
23
|
+
|
|
3
24
|
## 2.3.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -113,20 +134,20 @@
|
|
|
113
134
|
|
|
114
135
|
```ts
|
|
115
136
|
// Before
|
|
116
|
-
const { data } = await useRpc(
|
|
137
|
+
const { data } = await useRpc("getProduct", "my-static-product-key", {
|
|
117
138
|
productId: 123,
|
|
118
|
-
})
|
|
139
|
+
});
|
|
119
140
|
|
|
120
141
|
// After
|
|
121
|
-
const productId = ref(123)
|
|
142
|
+
const productId = ref(123);
|
|
122
143
|
|
|
123
144
|
// The key is now reactive. If `productId` changes, the key updates
|
|
124
145
|
// to 'product-456' (for example) and triggers a new fetch.
|
|
125
146
|
const { data } = await useRpc(
|
|
126
|
-
|
|
147
|
+
"getProduct",
|
|
127
148
|
() => `product-${productId.value}`,
|
|
128
|
-
{ productId }
|
|
129
|
-
)
|
|
149
|
+
{ productId }
|
|
150
|
+
);
|
|
130
151
|
```
|
|
131
152
|
|
|
132
153
|
## 2.2.0
|
|
@@ -206,14 +227,14 @@
|
|
|
206
227
|
**Before**
|
|
207
228
|
|
|
208
229
|
```ts
|
|
209
|
-
import { defaultSortingOptions } from
|
|
230
|
+
import { defaultSortingOptions } from "#storefront-product-listing";
|
|
210
231
|
const { sortLinks } = useProductListSort(useRoute(), {
|
|
211
232
|
sortingOptions: defaultSortingOptions,
|
|
212
|
-
})
|
|
233
|
+
});
|
|
213
234
|
```
|
|
214
235
|
|
|
215
236
|
```ts
|
|
216
|
-
const { sortLinks } = useProductListSort(useRoute())
|
|
237
|
+
const { sortLinks } = useProductListSort(useRoute());
|
|
217
238
|
```
|
|
218
239
|
|
|
219
240
|
(Both before approaches are equivalent.)
|
|
@@ -221,19 +242,19 @@
|
|
|
221
242
|
**After**
|
|
222
243
|
|
|
223
244
|
```ts
|
|
224
|
-
import { SORT_PRICE_ASC, SORT_PRICE_DESC } from
|
|
245
|
+
import { SORT_PRICE_ASC, SORT_PRICE_DESC } from "#storefront-product-listing";
|
|
225
246
|
const { sortLinks } = useProductListSort(useRoute(), {
|
|
226
247
|
sortingOptions: [
|
|
227
248
|
{
|
|
228
249
|
...SORT_PRICE_ASC,
|
|
229
|
-
label:
|
|
250
|
+
label: "Price Ascending",
|
|
230
251
|
},
|
|
231
252
|
{
|
|
232
253
|
...SORT_PRICE_DESC,
|
|
233
|
-
label:
|
|
254
|
+
label: "Price Descending",
|
|
234
255
|
},
|
|
235
256
|
],
|
|
236
|
-
})
|
|
257
|
+
});
|
|
237
258
|
```
|
|
238
259
|
|
|
239
260
|
- **BREAKING**: `useProductListingSeoData` now expects `isDefaultSortSelected` to be passed as the final parameter. This removes the internal dependency on `useProductListSort`. It is typed as `MaybeRefOrGetter<Boolean>` to support reactive usage.
|
|
@@ -241,12 +262,12 @@
|
|
|
241
262
|
**Before**
|
|
242
263
|
|
|
243
264
|
```ts
|
|
244
|
-
const route = useRoute()
|
|
265
|
+
const route = useRoute();
|
|
245
266
|
const { title, robots, canonicalLink, categoryBreadcrumbSchema } =
|
|
246
267
|
useProductListingSeoData(breadcrumbs, route, {
|
|
247
268
|
baseUrl: baseUrl,
|
|
248
269
|
fullPath: fullPath,
|
|
249
|
-
})
|
|
270
|
+
});
|
|
250
271
|
```
|
|
251
272
|
|
|
252
273
|
**After**
|
|
@@ -418,7 +439,7 @@
|
|
|
418
439
|
They can be used as follows:
|
|
419
440
|
|
|
420
441
|
```ts
|
|
421
|
-
import { filtersFactory } from
|
|
442
|
+
import { filtersFactory } from "@scayle/storefront-product-listing";
|
|
422
443
|
```
|
|
423
444
|
|
|
424
445
|
- Upgrade the `storefront-core` and `storefront-nuxt` packages to version 8 and update your implementation to reflect the changes in RPC composables:
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const PACKAGE_NAME = "@scayle/storefront-product-listing";
|
|
4
|
-
const PACKAGE_VERSION = "2.
|
|
4
|
+
const PACKAGE_VERSION = "2.5.0";
|
|
5
5
|
const module$1 = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: PACKAGE_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-product-listing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Collection of essential composables and utilities to work with product listing",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,11 +28,14 @@
|
|
|
28
28
|
"CHANGELOG.md",
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">= 22.0.0"
|
|
33
|
+
},
|
|
31
34
|
"imports": {
|
|
32
35
|
"#storefront-product-listing": "./dist/runtime/index.js"
|
|
33
36
|
},
|
|
34
37
|
"peerDependencies": {
|
|
35
|
-
"@nuxt/kit": ">=3.13.0",
|
|
38
|
+
"@nuxt/kit": ">=3.13.0 || >=4.2.0",
|
|
36
39
|
"@scayle/storefront-nuxt": "^8.0.0",
|
|
37
40
|
"@vueuse/core": "^12.8.2 || ^13.0.0 || ^14.0.0",
|
|
38
41
|
"fishery": "^2.2.3",
|
|
@@ -41,30 +44,30 @@
|
|
|
41
44
|
},
|
|
42
45
|
"devDependencies": {
|
|
43
46
|
"@arethetypeswrong/cli": "0.18.2",
|
|
44
|
-
"@nuxt/kit": "3.20.
|
|
47
|
+
"@nuxt/kit": "^3.20.2",
|
|
45
48
|
"@nuxt/module-builder": "1.0.2",
|
|
46
|
-
"@nuxt/schema": "3.20.
|
|
47
|
-
"@nuxt/test-utils": "
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
52
|
-
"eslint-formatter-gitlab": "7.0
|
|
53
|
-
"eslint": "
|
|
49
|
+
"@nuxt/schema": "^3.20.2",
|
|
50
|
+
"@nuxt/test-utils": "4.0.0",
|
|
51
|
+
"@scayle/eslint-config-storefront": "^4.8.0",
|
|
52
|
+
"@types/node": "22.19.17",
|
|
53
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
54
|
+
"@vueuse/core": "14.2.1",
|
|
55
|
+
"eslint-formatter-gitlab": "7.1.0",
|
|
56
|
+
"eslint": "10.2.1",
|
|
54
57
|
"fishery": "2.4.0",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
+
"h3": "1.15.11",
|
|
59
|
+
"happy-dom": "20.9.0",
|
|
60
|
+
"nuxt": "^3.20.2",
|
|
61
|
+
"publint": "0.3.18",
|
|
58
62
|
"schema-dts": "1.1.5",
|
|
59
63
|
"typescript": "5.9.3",
|
|
60
64
|
"unbuild": "3.6.1",
|
|
61
|
-
"vitest": "4.
|
|
65
|
+
"vitest": "4.1.5",
|
|
62
66
|
"vue-router": "4.6.4",
|
|
63
|
-
"vue-tsc": "3.
|
|
64
|
-
"vue": "3.5.
|
|
65
|
-
"@scayle/
|
|
66
|
-
"@scayle/vitest-config-storefront": "1.0.0"
|
|
67
|
-
"@scayle/storefront-nuxt": "8.57.2"
|
|
67
|
+
"vue-tsc": "3.2.6",
|
|
68
|
+
"vue": "3.5.32",
|
|
69
|
+
"@scayle/storefront-nuxt": "8.61.0",
|
|
70
|
+
"@scayle/vitest-config-storefront": "1.0.0"
|
|
68
71
|
},
|
|
69
72
|
"scripts": {
|
|
70
73
|
"build": "nuxt-module-build build",
|
|
@@ -74,11 +77,6 @@
|
|
|
74
77
|
"lint": "eslint .",
|
|
75
78
|
"lint:ci": "eslint . --format gitlab",
|
|
76
79
|
"lint:fix": "eslint . --fix",
|
|
77
|
-
"format": "dprint check",
|
|
78
|
-
"format:fix": "dprint fmt",
|
|
79
|
-
"test": "vitest --run",
|
|
80
|
-
"test:watch": "vitest",
|
|
81
|
-
"test:ci": "vitest --run --coverage --reporter=default --reporter=junit --outputFile=./coverage/junit.xml",
|
|
82
80
|
"typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
83
81
|
"package:lint": "publint",
|
|
84
82
|
"verify-packaging": "attw --pack . --profile esm-only"
|