@colrealpro/react-luau-doctor 0.17.4 → 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.4",
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",
@@ -9031,7 +9031,8 @@ on:
9031
9031
  branches: [main]
9032
9032
 
9033
9033
  permissions:
9034
- contents: read
9034
+ # GitHub currently requires Contents: write for the resolveReviewThread GraphQL mutation.
9035
+ contents: ${settings.reviewComments ? "write" : "read"}
9035
9036
  pull-requests: write
9036
9037
  issues: write
9037
9038
  statuses: write
@@ -9585,7 +9586,7 @@ async function listReviewThreads(repo, pullNumber) {
9585
9586
  nodes {
9586
9587
  id
9587
9588
  isResolved
9588
- viewerCanResolve
9589
+ isOutdated
9589
9590
  path
9590
9591
  comments(first: 1) {
9591
9592
  nodes {
@@ -9643,6 +9644,11 @@ async function manageReviewComments(repo, pullNumber, currentReport, newDiagnost
9643
9644
  const fingerprint = diagnosticReviewFingerprint(directory, diagnostic);
9644
9645
  activeCounts.set(fingerprint, (activeCounts.get(fingerprint) ?? 0) + 1);
9645
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
+ }
9646
9652
  const resolvedThreadIds = [];
9647
9653
  for (const thread of threads) {
9648
9654
  if (thread.isResolved)
@@ -9650,14 +9656,20 @@ async function manageReviewComments(repo, pullNumber, currentReport, newDiagnost
9650
9656
  const fingerprint = doctorThreadFingerprint(thread);
9651
9657
  if (!fingerprint)
9652
9658
  continue;
9653
- if (!takeCount(activeCounts, fingerprint) && thread.viewerCanResolve) {
9659
+ if (thread.isOutdated && (newCounts.get(fingerprint) ?? 0) > 0) {
9654
9660
  resolvedThreadIds.push(thread.id);
9661
+ continue;
9662
+ }
9663
+ if (takeCount(activeCounts, fingerprint)) {
9664
+ takeCount(newCounts, fingerprint);
9665
+ continue;
9655
9666
  }
9667
+ resolvedThreadIds.push(thread.id);
9656
9668
  }
9657
9669
  const lineMap = changedLineMap(directory, newBase);
9658
9670
  const comments = newDiagnostics.filter((diagnostic) => touchesChangedLine(diagnostic, lineMap.get(diagnostic.file) ?? [])).filter((diagnostic) => {
9659
9671
  const fingerprint = diagnosticReviewFingerprint(directory, diagnostic);
9660
- return takeCount(activeCounts, fingerprint);
9672
+ return takeCount(newCounts, fingerprint);
9661
9673
  }).slice(0, MAX_REVIEW_COMMENTS).map((diagnostic) => ({
9662
9674
  path: repoRelativeDiagnosticPath(directory, diagnostic.file),
9663
9675
  line: diagnostic.location.line,
@@ -11578,5 +11590,5 @@ ${os2.release()}
11578
11590
  }
11579
11591
  main();
11580
11592
 
11581
- //# debugId=294DBE679F1E562E64756E2164756E21
11593
+ //# debugId=1572E28BBDF3756064756E2164756E21
11582
11594
  //# sourceMappingURL=cli.js.map