@scayle/storefront-product-listing 1.6.2 → 1.6.3

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-product-listing
2
2
 
3
+ ## 1.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Validate the `id` parameter passed to `getAllShopCategoriesForId` before calling Storefront API. This ensures that we will not send a useless request to Storefront API when we know the `id` is invalid.
8
+
3
9
  ## 1.6.2
4
10
 
5
11
  ### Patch Changes
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-product-listing",
3
3
  "configKey": "product-listing",
4
- "version": "1.6.2",
4
+ "version": "1.6.3",
5
5
  "compatibility": {
6
6
  "bridge": false,
7
7
  "nuxt": ">=3.13"
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 = "1.6.2";
4
+ const PACKAGE_VERSION = "1.6.3";
5
5
  const module = defineNuxtModule({
6
6
  meta: {
7
7
  name: PACKAGE_NAME,
@@ -1,4 +1,16 @@
1
+ import {
2
+ ErrorResponse,
3
+ HttpStatusCode,
4
+ HttpStatusMessage
5
+ } from "@scayle/storefront-nuxt";
1
6
  export const getAllShopCategoriesForId = async function getAllShopCategoriesForId2({ id, properties }, context) {
7
+ if (typeof id !== "number" || isNaN(id)) {
8
+ return new ErrorResponse(
9
+ HttpStatusCode.BAD_REQUEST,
10
+ HttpStatusMessage.BAD_REQUEST,
11
+ "Invalid category id"
12
+ );
13
+ }
2
14
  const { runtimeConfiguration, sapiClient, log, cached } = context;
3
15
  const fetchAllCategories = async () => {
4
16
  const categories = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-product-listing",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Collection of essential composables and utilities to work with product listing",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "scripts": {
35
35
  "build": "nuxt-module-build build",
36
- "dev": "nuxi dev playground",
37
- "dev:build": "nuxi build playground",
38
- "prep": "nuxt-module-build prepare && nuxi prepare playground",
36
+ "dev": "nuxt dev playground",
37
+ "dev:build": "nuxt build playground",
38
+ "prep": "nuxt-module-build prepare && nuxt prepare playground",
39
39
  "lint": "eslint .",
40
40
  "lint:ci": "eslint . --format gitlab",
41
41
  "lint:fix": "eslint . --fix",
@@ -59,30 +59,31 @@
59
59
  "vue": "^3.5.13"
60
60
  },
61
61
  "devDependencies": {
62
- "@arethetypeswrong/cli": "0.18.1",
62
+ "@arethetypeswrong/cli": "0.18.2",
63
63
  "@nuxt/kit": "3.16.2",
64
64
  "@nuxt/module-builder": "1.0.1",
65
65
  "@nuxt/schema": "3.16.2",
66
66
  "@nuxt/test-utils": "3.18.0",
67
- "@scayle/eslint-config-storefront": "4.5.2",
68
- "@scayle/storefront-api": "18.7.0",
69
- "@scayle/storefront-nuxt": "8.27.0",
70
- "@types/node": "22.15.21",
67
+ "@scayle/eslint-config-storefront": "4.5.5",
68
+ "@scayle/storefront-api": "18.8.0",
69
+ "@scayle/storefront-nuxt": "8.28.7",
70
+ "@types/node": "22.15.31",
71
+ "@vitest/coverage-v8": "3.2.3",
71
72
  "@vue/test-utils": "2.4.6",
72
- "@vueuse/core": "13.2.0",
73
+ "@vueuse/core": "13.3.0",
73
74
  "dprint": "0.50.0",
74
- "eslint-formatter-gitlab": "6.0.0",
75
- "eslint": "9.27.0",
75
+ "eslint-formatter-gitlab": "6.0.1",
76
+ "eslint": "9.28.0",
76
77
  "fishery": "2.3.1",
77
- "happy-dom": "17.4.7",
78
+ "happy-dom": "18.0.1",
78
79
  "nuxt": "3.16.2",
79
80
  "publint": "0.2.12",
80
81
  "schema-dts": "1.1.5",
81
82
  "typescript": "5.8.3",
82
83
  "unbuild": "3.5.0",
83
- "vitest": "3.1.4",
84
+ "vitest": "3.2.3",
84
85
  "vue-router": "4.5.1",
85
86
  "vue-tsc": "2.2.10",
86
- "vue": "3.5.14"
87
+ "vue": "3.5.16"
87
88
  }
88
89
  }