@checkstack/notification-backstage-backend 0.1.21 → 0.1.22

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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @checkstack/notification-backstage-backend
2
2
 
3
+ ## 0.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
8
+
9
+ **New utility**
10
+
11
+ - `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
12
+
13
+ **ESLint rules**
14
+
15
+ - `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
16
+ - `no-console` in frontend packages — forces `toast` over silent `console.error`
17
+ - `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
18
+ - Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
19
+
20
+ **Refactoring**
21
+
22
+ - Replace 141 `instanceof Error` boilerplate patterns across the codebase
23
+ - Replace swallowed `console.error` with user-visible `toast.error()` feedback
24
+ - Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
25
+ - Consolidate 3 identical callback handlers into `handleDialogClose`
26
+ - Fix conditional React hook call in `FormField.tsx`
27
+ - Fix unstable useMemo deps in `Dashboard.tsx`
28
+ - Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
29
+ - Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
30
+ - Delete obvious comments in `encryption.ts` and Teams `provider.ts`
31
+
32
+ - Updated dependencies [d1a2796]
33
+ - @checkstack/common@0.6.5
34
+ - @checkstack/backend-api@0.11.1
35
+ - @checkstack/notification-backend@0.1.21
36
+
3
37
  ## 0.1.21
4
38
 
5
39
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/notification-backstage-backend",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -13,13 +13,13 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/backend-api": "0.10.0",
17
- "@checkstack/notification-backend": "0.1.18",
16
+ "@checkstack/backend-api": "0.11.0",
17
+ "@checkstack/notification-backend": "0.1.20",
18
18
  "@checkstack/common": "0.6.4",
19
19
  "zod": "^4.2.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@checkstack/tsconfig": "0.0.4",
22
+ "@checkstack/tsconfig": "0.0.5",
23
23
  "typescript": "^5.9.3"
24
24
  }
25
25
  }
package/src/index.ts CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  import { notificationStrategyExtensionPoint } from "@checkstack/notification-backend";
9
9
  import { z } from "zod";
10
10
  import { pluginMetadata } from "./plugin-metadata";
11
+ import { extractErrorMessage } from "@checkstack/common";
11
12
 
12
13
  // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13
14
  // Admin Configuration Schema
@@ -259,11 +260,11 @@ const backstageStrategy: NotificationStrategy<
259
260
  };
260
261
  } catch (error) {
261
262
  logger?.error?.("Failed to send notification to Backstage", {
262
- error: error instanceof Error ? error.message : String(error),
263
+ error: extractErrorMessage(error),
263
264
  });
264
265
  return {
265
266
  success: false,
266
- error: error instanceof Error ? error.message : String(error),
267
+ error: extractErrorMessage(error),
267
268
  };
268
269
  }
269
270
  },