@factorypure/client-helpers 1.0.23 → 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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
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.23",
3
+ "version": "1.0.24",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",