@scayle/storefront-product-detail 1.5.4 → 1.5.6
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 +35 -0
- package/README.md +0 -11
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/composables/useAllShopProductsForId.d.ts +2 -2
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @scayle/storefront-product-detail
|
|
2
2
|
|
|
3
|
+
## 1.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Enhanced data fetching composables to support reactive keys, aligning with [Nuxt 3.17 data fetching improvements](https://nuxt.com/blog/v3-17#data-fetching-improvements).
|
|
8
|
+
|
|
9
|
+
You can now pass a `ref`, `computed`, or getter function as the `key` parameter to `useRpc` and derived composables (like `useProducts`, `useBrand` etc.). When the reactive key changes, the data will automatically re-fetch.
|
|
10
|
+
|
|
11
|
+
- **Before:** Keys were static strings.
|
|
12
|
+
- **After:** Keys can be reactive, enabling dynamic caching and automatic updates.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
// Before
|
|
16
|
+
const { data } = await useRpc('getProduct', 'my-static-product-key', {
|
|
17
|
+
productId: 123,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
// After
|
|
21
|
+
const productId = ref(123)
|
|
22
|
+
|
|
23
|
+
// The key is now reactive. If `productId` changes, the key updates
|
|
24
|
+
// to 'product-456' (for example) and triggers a new fetch.
|
|
25
|
+
const { data } = await useRpc(
|
|
26
|
+
'getProduct',
|
|
27
|
+
() => `product-${productId.value}`,
|
|
28
|
+
{ productId },
|
|
29
|
+
)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 1.5.5
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Cleaned up README.md and added CONTRIBUTING.md. No functional changes.
|
|
37
|
+
|
|
3
38
|
## 1.5.4
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -44,8 +44,6 @@ export default defineNuxtConfig({
|
|
|
44
44
|
})
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
## Module Configuration
|
|
48
|
-
|
|
49
47
|
## License
|
|
50
48
|
|
|
51
49
|
Licensed under the [MIT License](https://opensource.org/license/mit/)
|
|
@@ -61,12 +59,3 @@ Learn more about [SCAYLE’s architecture](https://scayle.dev/en/core-documentat
|
|
|
61
59
|
|
|
62
60
|
- [LinkedIn](https://www.linkedin.com/company/scaylecommerce/)
|
|
63
61
|
- [Jobs](https://careers.smartrecruiters.com/ABOUTYOUGmbH/scayle)
|
|
64
|
-
|
|
65
|
-
<!-- Badges -->
|
|
66
|
-
|
|
67
|
-
[npm-version-src]: https://img.shields.io/npm/v/@scayle/storefront-product-detail/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
68
|
-
[npm-version-href]: https://npmjs.com/package/@scayle/storefront-product-detail
|
|
69
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/@scayle/storefront-product-detail.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
70
|
-
[npm-downloads-href]: https://npmjs.com/package/@scayle/storefront-product-detail
|
|
71
|
-
[license-src]: https://img.shields.io/npm/l/@scayle/storefront-product-detail.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
72
|
-
[license-href]: https://npmjs.com/package/@scayle/storefront-product-detail
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const PACKAGE_NAME = "@scayle/storefront-product-detail";
|
|
4
|
-
const PACKAGE_VERSION = "1.5.
|
|
5
|
-
const module = defineNuxtModule({
|
|
4
|
+
const PACKAGE_VERSION = "1.5.6";
|
|
5
|
+
const module$1 = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: PACKAGE_NAME,
|
|
8
8
|
configKey: "product-detail",
|
|
@@ -37,4 +37,4 @@ const module = defineNuxtModule({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
export { module as default };
|
|
40
|
+
export { module$1 as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { KeysOf, NormalizedRpcResponse, UseRpcOptions, UseRpcReturn } from '@scayle/storefront-nuxt/composables';
|
|
1
|
+
import type { KeysOf, NormalizedRpcResponse, UseRpcOptions, UseRpcReturn, UseRpcCacheKey } from '@scayle/storefront-nuxt/composables';
|
|
2
2
|
import type { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import type { RpcMethodParameters } from '@scayle/storefront-nuxt';
|
|
4
4
|
export declare function useAllShopProductsForId<DataT = NormalizedRpcResponse<'getAllShopProductsForId'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getAllShopProductsForId'>>;
|
|
6
6
|
options: UseRpcOptions<'getAllShopProductsForId', DataT, PickKeys, DefaultT>;
|
|
7
|
-
}>, key?:
|
|
7
|
+
}>, key?: UseRpcCacheKey): UseRpcReturn<'getAllShopProductsForId', DataT, PickKeys, DefaultT>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-product-detail",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "Collection of essential composables and utilities to work with product detail",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,29 +37,29 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@arethetypeswrong/cli": "0.18.2",
|
|
40
|
-
"@nuxt/kit": "3.
|
|
40
|
+
"@nuxt/kit": "3.20.0",
|
|
41
41
|
"@nuxt/module-builder": "1.0.2",
|
|
42
|
-
"@nuxt/schema": "3.
|
|
43
|
-
"@nuxt/test-utils": "3.
|
|
44
|
-
"@types/node": "22.
|
|
45
|
-
"@vitest/coverage-v8": "
|
|
42
|
+
"@nuxt/schema": "3.20.0",
|
|
43
|
+
"@nuxt/test-utils": "3.20.1",
|
|
44
|
+
"@types/node": "22.19.1",
|
|
45
|
+
"@vitest/coverage-v8": "4.0.14",
|
|
46
46
|
"@vueuse/core": "13.9.0",
|
|
47
47
|
"dprint": "0.50.2",
|
|
48
48
|
"eslint-formatter-gitlab": "6.0.1",
|
|
49
|
-
"eslint": "9.
|
|
50
|
-
"happy-dom": "20.0.
|
|
51
|
-
"nuxt": "3.
|
|
52
|
-
"publint": "0.3.
|
|
49
|
+
"eslint": "9.39.1",
|
|
50
|
+
"happy-dom": "20.0.10",
|
|
51
|
+
"nuxt": "3.20.0",
|
|
52
|
+
"publint": "0.3.15",
|
|
53
53
|
"schema-dts": "1.1.5",
|
|
54
54
|
"typescript": "5.9.3",
|
|
55
55
|
"unbuild": "3.6.1",
|
|
56
|
-
"vitest": "
|
|
56
|
+
"vitest": "4.0.14",
|
|
57
57
|
"vue-router": "4.6.3",
|
|
58
|
-
"vue-tsc": "3.1.
|
|
59
|
-
"vue": "3.5.
|
|
60
|
-
"@scayle/eslint-config-storefront": "4.7.
|
|
61
|
-
"@scayle/
|
|
62
|
-
"@scayle/storefront
|
|
58
|
+
"vue-tsc": "3.1.5",
|
|
59
|
+
"vue": "3.5.25",
|
|
60
|
+
"@scayle/eslint-config-storefront": "4.7.14",
|
|
61
|
+
"@scayle/storefront-nuxt": "8.53.3",
|
|
62
|
+
"@scayle/vitest-config-storefront": "1.0.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "nuxt-module-build build",
|