@scayle/storefront-nuxt 7.85.13 → 7.85.15

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,21 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.85.15
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-core@7.65.7
10
+
11
+ ## 7.85.14
12
+
13
+ ### Patch Changes
14
+
15
+ **Dependencies**
16
+
17
+ - Updated dependency to @scayle/storefront-core@7.65.6
18
+
3
19
  ## 7.85.13
4
20
 
5
21
  ### Patch Changes
@@ -119,28 +135,28 @@ For example:
119
135
  ```ts
120
136
  useBrand({
121
137
  params: { brandId: 1 },
122
- }).data satisfies Ref<Brand>
138
+ }).data satisfies Ref<Brand>;
123
139
 
124
140
  useBrand({
125
141
  params: { brandId: 1 },
126
142
  options: {
127
- pick: ['id', 'isActive'],
143
+ pick: ["id", "isActive"],
128
144
  },
129
- }).data satisfies Ref<Brand>
145
+ }).data satisfies Ref<Brand>;
130
146
 
131
147
  useBrand({
132
148
  params: { brandId: 1 },
133
149
  options: {
134
150
  transform: (brand) => brand.slug,
135
151
  },
136
- }).data satisfies Ref<Brand>
152
+ }).data satisfies Ref<Brand>;
137
153
 
138
154
  useBrand({
139
155
  params: { brandId: 1 },
140
156
  options: {
141
- default: () => 'Brand not found',
157
+ default: () => "Brand not found",
142
158
  },
143
- }).data satisfies Ref<Brand>
159
+ }).data satisfies Ref<Brand>;
144
160
  ```
145
161
 
146
162
  **In 7.85.0**
@@ -148,28 +164,28 @@ useBrand({
148
164
  ```ts
149
165
  useBrand({
150
166
  params: { brandId: 1 },
151
- }).data satisfies Ref<Brand | null>
167
+ }).data satisfies Ref<Brand | null>;
152
168
 
153
169
  useBrand({
154
170
  params: { brandId: 1 },
155
171
  options: {
156
- pick: ['id', 'isActive'],
172
+ pick: ["id", "isActive"],
157
173
  },
158
- }).data satisfies Ref<Pick<Brand, 'id' | 'isActive'> | null>
174
+ }).data satisfies Ref<Pick<Brand, "id" | "isActive"> | null>;
159
175
 
160
176
  useBrand({
161
177
  params: { brandId: 1 },
162
178
  options: {
163
179
  transform: (brand) => brand.slug,
164
180
  },
165
- }).data satisfies Ref<string | null>
181
+ }).data satisfies Ref<string | null>;
166
182
 
167
183
  useBrand({
168
184
  params: { brandId: 1 },
169
185
  options: {
170
- default: () => 'Brand not found',
186
+ default: () => "Brand not found",
171
187
  },
172
- }).data satisfies Ref<Brand | string>
188
+ }).data satisfies Ref<Brand | string>;
173
189
  ```
174
190
 
175
191
  For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.com/docs/api/composables/use-async-data)
@@ -203,8 +219,7 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
203
219
 
204
220
  ### Patch Changes
205
221
 
206
- -
207
- - Updated dependencies
222
+ - - Updated dependencies
208
223
  - @scayle/storefront-core@7.64.0
209
224
 
210
225
  ## 7.84.2
@@ -329,27 +344,27 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
329
344
  Hooks can be registered by adding a nitro plugin inside ´server/plugins/´:
330
345
 
331
346
  ```ts
332
- import { defineNitroPlugin } from '#imports'
347
+ import { defineNitroPlugin } from "#imports";
333
348
 
334
349
  export default defineNitroPlugin((nitroApp) => {
335
- nitroApp.hooks.hook('storefront:rpc:before', (rpcName, rpcContext) => {
336
- rpcContext.log.debug(`Before: ${rpcName}`)
337
- })
350
+ nitroApp.hooks.hook("storefront:rpc:before", (rpcName, rpcContext) => {
351
+ rpcContext.log.debug(`Before: ${rpcName}`);
352
+ });
338
353
 
339
354
  nitroApp.hooks.hook(
340
- 'storefront:rpc:after',
355
+ "storefront:rpc:after",
341
356
  (rpcName, rpcContext, result) => {
342
- rpcContext.log.debug(`After: ${rpcName} returned ${result}`)
343
- },
344
- )
357
+ rpcContext.log.debug(`After: ${rpcName} returned ${result}`);
358
+ }
359
+ );
345
360
 
346
361
  nitroApp.hooks.hook(
347
- 'storefront:rpc:error',
362
+ "storefront:rpc:error",
348
363
  (rpcName, rpcContext, error) => {
349
- rpcContext.log.error(`ERROR: ${rpcName} did throw ${error}`)
350
- },
351
- )
352
- })
364
+ rpcContext.log.error(`ERROR: ${rpcName} did throw ${error}`);
365
+ }
366
+ );
367
+ });
353
368
  ```
354
369
 
355
370
  Added [`callHook`](https://github.com/unjs/hookable?tab=readme-ov-file#async-callhook-name-args), `callHookParallel` and [`callHookWith`](https://github.com/unjs/hookable?tab=readme-ov-file#callhookwith-name-callerfn) to `RpcContext` to allow triggering hooks within RPCs
@@ -617,20 +632,20 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
617
632
  - It is now also possible to extend the RPCContext using the `storefront:context:created` nitro runtime hook.
618
633
 
619
634
  ```ts
620
- import { defineNitroPlugin } from 'nitropack/runtime/plugin'
635
+ import { defineNitroPlugin } from "nitropack/runtime/plugin";
621
636
  // Augment RpxContext type
622
- declare module '@scayle/storefront-nuxt' {
637
+ declare module "@scayle/storefront-nuxt" {
623
638
  interface AdditionalRpcContext {
624
- myNewProp: string
639
+ myNewProp: string;
625
640
  }
626
641
  }
627
642
 
628
643
  // Set new value on rpcContext
629
644
  export default defineNitroPlugin((nitroApp) => {
630
- nitroApp.hooks.hook('storefront:context:created', (rpcContext) => {
631
- rpcContext.myNewProp = 'My campaign key'
632
- })
633
- })
645
+ nitroApp.hooks.hook("storefront:context:created", (rpcContext) => {
646
+ rpcContext.myNewProp = "My campaign key";
647
+ });
648
+ });
634
649
  ```
635
650
 
636
651
  ### Patch Changes
@@ -833,8 +848,8 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
833
848
 
834
849
  ```ts
835
850
  const { data: externalIDPRedirects } = await useIDP({
836
- queryParams: { redirectTo: '/account' },
837
- })
851
+ queryParams: { redirectTo: "/account" },
852
+ });
838
853
  ```
839
854
 
840
855
  Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
@@ -1253,16 +1268,16 @@ There is an `unwrap` function exported by this package (>=7.55.0) that can be us
1253
1268
  Before:
1254
1269
 
1255
1270
  ```typescript
1256
- toCurrency(100, { currency: 'EUR' })
1257
- formatPrice(100, { currencyFractionDigits: 2 })
1271
+ toCurrency(100, { currency: "EUR" });
1272
+ formatPrice(100, { currencyFractionDigits: 2 });
1258
1273
  ```
1259
1274
 
1260
1275
  After:
1261
1276
 
1262
1277
  ```typescript
1263
- const { formatCurrency } = useFormatHelpers()
1264
- formatCurrency(100, { currency: 'EUR' })
1265
- formatCurrency(100, { style: 'decimal', currencyFractionDigits: 2 })
1278
+ const { formatCurrency } = useFormatHelpers();
1279
+ formatCurrency(100, { currency: "EUR" });
1280
+ formatCurrency(100, { style: "decimal", currencyFractionDigits: 2 });
1266
1281
  ```
1267
1282
 
1268
1283
  ## 7.44.1
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "7.85.13",
3
+ "version": "7.85.15",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -48,7 +48,7 @@ export default {
48
48
  }`;
49
49
  }
50
50
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
51
- const PACKAGE_VERSION = "7.85.13";
51
+ const PACKAGE_VERSION = "7.85.15";
52
52
  const logger = createConsola({
53
53
  fancy: true,
54
54
  formatOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.85.13",
4
+ "version": "7.85.15",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -54,14 +54,14 @@
54
54
  "typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
55
55
  "package:lint": "publint",
56
56
  "test": "vitest run",
57
- "test:ci": "vitest run",
57
+ "test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit --outputFile=./junit.xml",
58
58
  "test:watch": "vitest watch"
59
59
  },
60
60
  "dependencies": {
61
61
  "@nuxt/kit": "^3.12.2",
62
62
  "@opentelemetry/api": "^1.9.0",
63
63
  "@scayle/h3-session": "^0.4.1",
64
- "@scayle/storefront-core": "7.65.5",
64
+ "@scayle/storefront-core": "7.65.7",
65
65
  "@scayle/unstorage-compression-driver": "^0.1.4",
66
66
  "@vueuse/core": "11.1.0",
67
67
  "consola": "^3.2.3",
@@ -85,7 +85,7 @@
85
85
  "@nuxt/test-utils": "3.14.3",
86
86
  "@scayle/eslint-config-storefront": "4.3.2",
87
87
  "@scayle/eslint-plugin-vue-composable": "0.2.1",
88
- "@types/node": "20.16.11",
88
+ "@types/node": "20.16.12",
89
89
  "dprint": "0.47.2",
90
90
  "eslint": "9.12.0",
91
91
  "eslint-formatter-gitlab": "5.1.0",