technical-debt-radar 1.6.2 → 1.6.3

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 +17 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16219,7 +16219,23 @@ var require_reliability_detector = __commonJS({
16219
16219
  detectUnboundedParallelCalls(sourceFile, file.path, fns, policy, violations);
16220
16220
  project.removeSourceFile(sourceFile);
16221
16221
  }
16222
- return applyExceptions(violations, policy);
16222
+ return applyExceptions(deduplicateOverlapping(violations), policy);
16223
+ }
16224
+ function deduplicateOverlapping(violations) {
16225
+ const hasMissingTryCatch = /* @__PURE__ */ new Set();
16226
+ for (const v of violations) {
16227
+ if (v.ruleId === shared_1.RELIABILITY_RULES.MISSING_TRY_CATCH) {
16228
+ hasMissingTryCatch.add(`${v.file}:${v.function ?? ""}`);
16229
+ }
16230
+ }
16231
+ return violations.filter((v) => {
16232
+ if (v.ruleId === shared_1.RELIABILITY_RULES.UNHANDLED_PROMISE_REJECTION) {
16233
+ const key = `${v.file}:${v.function ?? ""}`;
16234
+ if (hasMissingTryCatch.has(key))
16235
+ return false;
16236
+ }
16237
+ return true;
16238
+ });
16223
16239
  }
16224
16240
  function collectFunctions(sourceFile, filePath) {
16225
16241
  const scopes = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "technical-debt-radar",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Stop Node.js production crashes before merge. 47 detection patterns across 5 categories.",
5
5
  "bin": {
6
6
  "radar": "dist/index.js",