@scayle/storefront-nuxt 8.56.0 → 8.57.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,39 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 8.57.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependency `@vueuse/core@13.9.0` to `@vueuse/core@catalog:`
8
+
9
+ **Dependencies**
10
+
11
+ **@scayle/storefront-core v8.57.1**
12
+
13
+ - No changes in this release.
14
+
15
+ ## 8.57.0
16
+
17
+ ### Patch Changes
18
+
19
+ **Dependencies**
20
+
21
+ - Updated dependency to @scayle/unstorage-compression-driver@1.2.4
22
+
23
+ **@scayle/storefront-core v8.57.0**
24
+
25
+ - Minor
26
+
27
+ - **\[Navigation\]** Exported Navigation V2 API types to provide TypeScript support for the new navigation endpoints.
28
+
29
+ The following types are now available from `@scayle/storefront-core`:
30
+
31
+ - `GetNavigationV2Parameters` - Parameters for fetching navigation trees via the V2 API
32
+ - `NavigationV2AllEndpointResponseData` - Response type for fetching all navigation trees
33
+ - `NavigationV2ByReferenceEndpointResponseData` - Response type for fetching a navigation tree by reference key
34
+
35
+ These types enable full TypeScript support when working with the Navigation V2 API, which uses reference keys instead of numeric IDs for more flexible navigation management.
36
+
3
37
  ## 8.56.0
4
38
 
5
39
  ### Minor Changes
@@ -13,7 +47,7 @@
13
47
  - **Type Augmentation Example:**
14
48
 
15
49
  ```ts
16
- // templates/nuxt/types/session.ts
50
+ // types/session.ts
17
51
  import '@scayle/storefront-nuxt'
18
52
 
19
53
  declare module '@scayle/storefront-nuxt' {
@@ -26,27 +60,37 @@
26
60
  - **Setting Custom Session Data Example:**
27
61
 
28
62
  ```ts
29
- // templates/nuxt/server/plugins/session-plugin.ts
63
+ // server/plugins/session-plugin.ts
30
64
  import { hasSession } from '@scayle/storefront-nuxt'
31
65
  import { defineNitroPlugin } from '#imports'
32
66
 
33
67
  export default defineNitroPlugin((nitroApp) => {
34
68
  nitroApp.hooks.hook('storefront:afterLogin', async (_data, context) => {
69
+ // Check if we actually have a RpcContext with proper session data
35
70
  if (!hasSession(context)) {
36
71
  return
37
72
  }
38
73
 
74
+ // Should you have set custom session data already in another hook,
75
+ // it might be necessary to get existing data first.
39
76
  const sessionCustomData = context.sessionCustomData
40
77
 
41
- if (!sessionCustomData) {
42
- return
43
- }
44
-
78
+ // The update functions overrides the customData object on a session.
79
+ // Should you have set custom session data already in another hooks,
80
+ // you need to pass it in addition to your new custom session data.
45
81
  context.updateSessionCustomData({
46
82
  ...sessionCustomData,
47
83
  yourCustomDataKey: 'Your Session CustomData Value',
48
84
  })
49
85
 
86
+ // Before accessing your session custom data, you might want to use an
87
+ // explicit early return conditional.
88
+ if (!sessionCustomData) {
89
+ return
90
+ }
91
+
92
+ // Your custom session data can also be accessedd directly via
93
+ // nullish coalescing depending on your needs.
50
94
  console.log(context.sessionCustomData?.yourCustomDataKey)
51
95
  })
52
96
  })
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "8.56.0",
3
+ "version": "8.57.1",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -54,7 +54,7 @@ export default {
54
54
  }`;
55
55
  }
56
56
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
57
- const PACKAGE_VERSION = "8.56.0";
57
+ const PACKAGE_VERSION = "8.57.1";
58
58
  const logger = createConsola({
59
59
  fancy: true,
60
60
  formatOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "8.56.0",
4
+ "version": "8.57.1",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -75,7 +75,7 @@
75
75
  "@opentelemetry/api": "^1.9.0",
76
76
  "@scayle/h3-session": "0.6.2",
77
77
  "@vercel/nft": "1.1.1",
78
- "@vueuse/core": "13.9.0",
78
+ "@vueuse/core": "14.1.0",
79
79
  "consola": "^3.2.3",
80
80
  "core-js": "^3.37.1",
81
81
  "defu": "^6.1.4",
@@ -90,36 +90,36 @@
90
90
  "utility-types": "^3.11.0",
91
91
  "vue-router": "^4.4.0",
92
92
  "zod": "^4.0.0",
93
- "@scayle/storefront-core": "8.56.0",
93
+ "@scayle/storefront-core": "8.57.1",
94
94
  "@scayle/unstorage-compression-driver": "1.2.4"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@arethetypeswrong/cli": "0.18.2",
98
98
  "@eslint/eslintrc": "3.3.3",
99
- "@nuxt/eslint": "1.11.0",
100
- "@nuxt/eslint-config": "1.11.0",
99
+ "@nuxt/eslint": "1.12.1",
100
+ "@nuxt/eslint-config": "1.12.1",
101
101
  "@nuxt/kit": "3.20.0",
102
102
  "@nuxt/module-builder": "1.0.2",
103
103
  "@nuxt/schema": "3.20.0",
104
- "@nuxt/test-utils": "3.20.1",
105
- "@types/node": "22.19.1",
106
- "@vitest/coverage-v8": "4.0.15",
104
+ "@nuxt/test-utils": "3.21.0",
105
+ "@types/node": "22.19.3",
106
+ "@vitest/coverage-v8": "4.0.16",
107
107
  "dprint": "0.50.2",
108
- "eslint-formatter-gitlab": "7.0.0",
109
- "eslint": "9.39.1",
110
- "fishery": "2.3.1",
108
+ "eslint-formatter-gitlab": "7.0.1",
109
+ "eslint": "9.39.2",
110
+ "fishery": "2.4.0",
111
111
  "h3": "1.15.4",
112
112
  "nitro-test-utils": "0.10.1",
113
113
  "nitropack": "2.12.8",
114
114
  "node-mocks-http": "1.17.2",
115
115
  "nuxt": "3.20.0",
116
- "publint": "0.3.15",
116
+ "publint": "0.3.16",
117
117
  "typescript": "5.9.3",
118
118
  "unbuild": "3.6.1",
119
- "vitest": "4.0.15",
120
- "vue-tsc": "3.1.5",
119
+ "vitest": "4.0.16",
120
+ "vue-tsc": "3.1.8",
121
121
  "happy-dom": "20.0.11",
122
- "@scayle/eslint-config-storefront": "4.7.16",
122
+ "@scayle/eslint-config-storefront": "4.7.17",
123
123
  "@scayle/eslint-plugin-vue-composable": "0.2.2",
124
124
  "@scayle/vitest-config-storefront": "1.0.0",
125
125
  "@scayle/unstorage-scayle-kv-driver": "2.0.9"