deflake 1.2.1 → 1.2.2

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/cli.js +8 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -800,9 +800,12 @@ async function analyzeFailures(artifacts, fullLog, client) {
800
800
  const key = `${locId}|${fixCode.trim()}`;
801
801
 
802
802
  if (!groups[key]) {
803
- groups[key] = { ...res, count: 0 };
803
+ groups[key] = { ...res, count: 0, locations: [] };
804
804
  }
805
805
  groups[key].count++;
806
+ if (res.location) {
807
+ groups[key].locations.push(res.location);
808
+ }
806
809
  }
807
810
 
808
811
  const finalGroups = Object.values(groups);
@@ -811,9 +814,11 @@ async function analyzeFailures(artifacts, fullLog, client) {
811
814
  console.log(`${C.GRAY}ℹ️ Suggested for ${group.count} similar failures:${C.RESET}`);
812
815
  }
813
816
 
814
- // APPLY FIX (Only once per deduplicated group)
817
+ // APPLY FIX (To all instances in the group)
815
818
  if (argv.fix) {
816
- await applySelfHealing(group);
819
+ for (const loc of group.locations) {
820
+ await applySelfHealing({ ...group, location: loc });
821
+ }
817
822
  }
818
823
 
819
824
  printDetailedFix(group.fix, group.location, group.source_code, argv.fix);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deflake",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "AI-powered self-healing tool for Playwright, Cypress, and WebdriverIO tests.",
5
5
  "main": "client.js",
6
6
  "bin": {