@colrealpro/react-luau-doctor 0.17.5 → 0.17.6

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/cli.js CHANGED
@@ -11,7 +11,7 @@ var package_default = {
11
11
  publishConfig: {
12
12
  access: "public"
13
13
  },
14
- version: "0.17.5",
14
+ version: "0.17.6",
15
15
  description: "Static analysis for React-Luau hooks, effects, rendering, and performance.",
16
16
  license: "MIT",
17
17
  type: "module",
@@ -9586,7 +9586,7 @@ async function listReviewThreads(repo, pullNumber) {
9586
9586
  nodes {
9587
9587
  id
9588
9588
  isResolved
9589
- viewerCanResolve
9589
+ isOutdated
9590
9590
  path
9591
9591
  comments(first: 1) {
9592
9592
  nodes {
@@ -9644,6 +9644,11 @@ async function manageReviewComments(repo, pullNumber, currentReport, newDiagnost
9644
9644
  const fingerprint = diagnosticReviewFingerprint(directory, diagnostic);
9645
9645
  activeCounts.set(fingerprint, (activeCounts.get(fingerprint) ?? 0) + 1);
9646
9646
  }
9647
+ const newCounts = new Map;
9648
+ for (const diagnostic of newDiagnostics) {
9649
+ const fingerprint = diagnosticReviewFingerprint(directory, diagnostic);
9650
+ newCounts.set(fingerprint, (newCounts.get(fingerprint) ?? 0) + 1);
9651
+ }
9647
9652
  const resolvedThreadIds = [];
9648
9653
  for (const thread of threads) {
9649
9654
  if (thread.isResolved)
@@ -9651,14 +9656,20 @@ async function manageReviewComments(repo, pullNumber, currentReport, newDiagnost
9651
9656
  const fingerprint = doctorThreadFingerprint(thread);
9652
9657
  if (!fingerprint)
9653
9658
  continue;
9654
- if (!takeCount(activeCounts, fingerprint) && thread.viewerCanResolve) {
9659
+ if (thread.isOutdated && (newCounts.get(fingerprint) ?? 0) > 0) {
9655
9660
  resolvedThreadIds.push(thread.id);
9661
+ continue;
9662
+ }
9663
+ if (takeCount(activeCounts, fingerprint)) {
9664
+ takeCount(newCounts, fingerprint);
9665
+ continue;
9656
9666
  }
9667
+ resolvedThreadIds.push(thread.id);
9657
9668
  }
9658
9669
  const lineMap = changedLineMap(directory, newBase);
9659
9670
  const comments = newDiagnostics.filter((diagnostic) => touchesChangedLine(diagnostic, lineMap.get(diagnostic.file) ?? [])).filter((diagnostic) => {
9660
9671
  const fingerprint = diagnosticReviewFingerprint(directory, diagnostic);
9661
- return takeCount(activeCounts, fingerprint);
9672
+ return takeCount(newCounts, fingerprint);
9662
9673
  }).slice(0, MAX_REVIEW_COMMENTS).map((diagnostic) => ({
9663
9674
  path: repoRelativeDiagnosticPath(directory, diagnostic.file),
9664
9675
  line: diagnostic.location.line,
@@ -11579,5 +11590,5 @@ ${os2.release()}
11579
11590
  }
11580
11591
  main();
11581
11592
 
11582
- //# debugId=E46F5C7492ED507564756E2164756E21
11593
+ //# debugId=1572E28BBDF3756064756E2164756E21
11583
11594
  //# sourceMappingURL=cli.js.map