@factorypure/client-helpers 1.0.22 → 1.0.24

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/dist/index.d.ts CHANGED
@@ -311,7 +311,7 @@ export type ScrapeFiltersType = {
311
311
  skip_vendors: string[];
312
312
  vendor_search_exclusions: string[];
313
313
  search_exclusions: string[];
314
- result_ignore_keys: ResultIgnoreType[];
314
+ result_ignore_keys: ResultIgnoreType[] | null;
315
315
  brand_name_alternates: string[];
316
316
  dayWindow: number | null;
317
317
  };
package/dist/index.js CHANGED
@@ -600,7 +600,8 @@ export const calculateHideReasons = (result, variant, variantScrapeOptions) => {
600
600
  };
601
601
  export const calculateHideOverrideReasons = (result, variant) => {
602
602
  const hide_override_reasons = [];
603
- const skuRegex = new RegExp(`\\b${variant.sku}\\b`, 'gi');
603
+ // Match SKU as a whole word or inside parentheses/brackets
604
+ const skuRegex = new RegExp(`(?:\\b|[\\(\\[\\{])${variant.sku}(?:\\b|[\\)\\]\\}])`, 'gi');
604
605
  if (skuRegex.test(result.title)) {
605
606
  hide_override_reasons.push('SKU Match');
606
607
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",