lancer-shared 1.2.196 → 1.2.197

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.
@@ -13623,8 +13623,7 @@ class SearchQueryBuilder {
13623
13623
  remainingQuery = remainingQuery.replace(notPattern, '').trim();
13624
13624
  }
13625
13625
  }
13626
- // 5. Process grouped expressions - Clean up connectors first
13627
- remainingQuery = this.cleanupConnectors(remainingQuery);
13626
+ // 5. Process grouped expressions - DON'T clean up connectors first!
13628
13627
  // Extract OR groups (anyWords) - PROCESS FIRST
13629
13628
  const orGroupPattern = /\(([^)]+(?:\s+OR\s+[^)]+)+)\)/g;
13630
13629
  const orMatches = [...remainingQuery.matchAll(orGroupPattern)];
@@ -13641,6 +13640,8 @@ class SearchQueryBuilder {
13641
13640
  result.allWords = andTerms.join(' ');
13642
13641
  remainingQuery = remainingQuery.replace(andMatches[0][0], '').trim();
13643
13642
  }
13643
+ // NOW clean up connectors after group processing
13644
+ remainingQuery = this.cleanupConnectors(remainingQuery);
13644
13645
  // 6. Extract standalone quoted phrases (exactPhrase) - ONLY after all groups processed
13645
13646
  const standaloneQuotePattern = /(?:^|\s)("([^"]+)")(?=\s|$)/g;
13646
13647
  const quoteMatches = [...remainingQuery.matchAll(standaloneQuotePattern)];
@@ -13702,7 +13703,7 @@ class SearchQueryBuilder {
13702
13703
  static extractTermsFromANDGroup(content) {
13703
13704
  return content
13704
13705
  .split(/\s+AND\s+/)
13705
- .map((term) => term.trim())
13706
+ .map((term) => term.trim().replace(/^\(+|\)+$/g, '')) // Remove leading/trailing parentheses
13706
13707
  .filter(Boolean);
13707
13708
  }
13708
13709
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lancer-shared",
3
- "version": "1.2.196",
3
+ "version": "1.2.197",
4
4
  "description": "This package contains shared stuff.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "dist/bundle.cjs.js",