@scayle/storefront-nuxt 7.42.0 → 7.42.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,11 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.42.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Ensure useNuxtApp is only called from a composable context
8
+
3
9
  ## 7.42.0
4
10
 
5
11
  ### Minor Changes
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.7.0"
6
6
  },
7
- "version": "7.41.0"
7
+ "version": "7.42.0"
8
8
  }
@@ -13,6 +13,7 @@ function getFetch(nuxtApp, log) {
13
13
  export const useRpc = async (method, key, params, options = { autoFetch: true, lazy: false }) => {
14
14
  const currentShop = useCurrentShop();
15
15
  const log = useCoreLog("rpc");
16
+ const nuxtApp = useNuxtApp();
16
17
  const isAutoFetchEnabled = options?.autoFetch ?? true;
17
18
  log.debug(`useRpc: ${method}`);
18
19
  const data = useState(`${method}-${key}-data`);
@@ -27,7 +28,7 @@ export const useRpc = async (method, key, params, options = { autoFetch: true, l
27
28
  status.value = "pending";
28
29
  fetching.value = true;
29
30
  const apiBasePath = currentShop.value?.apiBasePath ?? "/api";
30
- const fetch2 = getFetch(useNuxtApp(), log);
31
+ const fetch2 = getFetch(nuxtApp, log);
31
32
  data.value = await fetch2(`/rpc/${method}`, {
32
33
  // @ts-ignore
33
34
  method: "POST",
@@ -6,6 +6,7 @@ export const useSearch = ({ params, key = "search" } = {}) => {
6
6
  `${key}-data`,
7
7
  () => void 0
8
8
  );
9
+ const nuxtApp = useNuxtApp();
9
10
  const searchQuery = useState(`${key}-searchQuery`, () => "");
10
11
  const pending = useState(`${key}-pending`, () => false);
11
12
  const error = useState(`${key}-error`, () => void 0);
@@ -19,7 +20,7 @@ export const useSearch = ({ params, key = "search" } = {}) => {
19
20
  }
20
21
  try {
21
22
  data.value = await rpcCall(
22
- useNuxtApp(),
23
+ nuxtApp,
23
24
  "searchProducts",
24
25
  toValue(shop)
25
26
  )({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.42.0",
4
+ "version": "7.42.1",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -69,7 +69,7 @@
69
69
  "defu": "6.1.3",
70
70
  "h3": "1.9.0",
71
71
  "jose": "4.15.4",
72
- "nitropack": "2.8.0",
72
+ "nitropack": "2.8.1",
73
73
  "ofetch": "1.3.3",
74
74
  "radash": "11.0.0",
75
75
  "uncrypto": "0.1.3",
@@ -83,7 +83,7 @@
83
83
  "@nuxt/test-utils": "3.8.1",
84
84
  "@scayle/eslint-config-storefront": "3.2.5",
85
85
  "@scayle/prettier-config-storefront": "2.0.2",
86
- "@types/node": "20.10.0",
86
+ "@types/node": "20.10.1",
87
87
  "eslint": "8.54.0",
88
88
  "eslint-formatter-gitlab": "5.1.0",
89
89
  "node-mocks-http": "1.13.0",
@@ -91,7 +91,7 @@
91
91
  "prettier": "3.0.0",
92
92
  "publint": "0.2.5",
93
93
  "vitest": "0.34.6",
94
- "vue-tsc": "1.8.22"
94
+ "vue-tsc": "1.8.24"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "nuxt": ">=3.8.1",
@@ -99,16 +99,16 @@
99
99
  "vue": ">=3.3.0"
100
100
  },
101
101
  "resolutions": {
102
- "@vue/compiler-core": "3.3.8",
103
- "@vue/shared": "3.3.8",
104
- "@vue/compiler-dom": "3.3.8",
105
- "@vue/compiler-sfc": "3.3.8",
106
- "@vue/compiler-ssr": "3.3.8",
107
- "@vue/reactivity-transform": "3.3.8",
108
- "@vue/reactivity": "3.3.8",
109
- "@vue/runtime-core": "3.3.8",
110
- "@vue/runtime-dom": "3.3.8",
111
- "@vue/server-renderer": "3.3.8"
102
+ "@vue/compiler-core": "3.3.9",
103
+ "@vue/shared": "3.3.9",
104
+ "@vue/compiler-dom": "3.3.9",
105
+ "@vue/compiler-sfc": "3.3.9",
106
+ "@vue/compiler-ssr": "3.3.9",
107
+ "@vue/reactivity-transform": "3.3.9",
108
+ "@vue/reactivity": "3.3.9",
109
+ "@vue/runtime-core": "3.3.9",
110
+ "@vue/runtime-dom": "3.3.9",
111
+ "@vue/server-renderer": "3.3.9"
112
112
  },
113
113
  "volta": {
114
114
  "node": "20.10.0"