@checkstack/maintenance-frontend 0.4.19 → 0.4.21

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,54 @@
1
1
  # @checkstack/maintenance-frontend
2
2
 
3
+ ## 0.4.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [26d8bae]
8
+ - @checkstack/ui@1.3.0
9
+ - @checkstack/auth-frontend@0.5.19
10
+ - @checkstack/dashboard-frontend@0.3.27
11
+
12
+ ## 0.4.20
13
+
14
+ ### Patch Changes
15
+
16
+ - d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
17
+
18
+ **New utility**
19
+
20
+ - `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
21
+
22
+ **ESLint rules**
23
+
24
+ - `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
25
+ - `no-console` in frontend packages — forces `toast` over silent `console.error`
26
+ - `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
27
+ - Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
28
+
29
+ **Refactoring**
30
+
31
+ - Replace 141 `instanceof Error` boilerplate patterns across the codebase
32
+ - Replace swallowed `console.error` with user-visible `toast.error()` feedback
33
+ - Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
34
+ - Consolidate 3 identical callback handlers into `handleDialogClose`
35
+ - Fix conditional React hook call in `FormField.tsx`
36
+ - Fix unstable useMemo deps in `Dashboard.tsx`
37
+ - Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
38
+ - Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
39
+ - Delete obvious comments in `encryption.ts` and Teams `provider.ts`
40
+
41
+ - Updated dependencies [d1a2796]
42
+ - Updated dependencies [3c34b07]
43
+ - @checkstack/common@0.6.5
44
+ - @checkstack/ui@1.2.1
45
+ - @checkstack/auth-frontend@0.5.18
46
+ - @checkstack/dashboard-frontend@0.3.26
47
+ - @checkstack/frontend-api@0.3.9
48
+ - @checkstack/catalog-common@1.3.1
49
+ - @checkstack/maintenance-common@0.4.9
50
+ - @checkstack/signal-frontend@0.0.15
51
+
3
52
  ## 0.4.19
4
53
 
5
54
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/maintenance-frontend",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "checkstack": {
@@ -12,14 +12,14 @@
12
12
  "lint:code": "eslint . --max-warnings 0"
13
13
  },
14
14
  "dependencies": {
15
- "@checkstack/auth-frontend": "0.5.17",
16
- "@checkstack/catalog-common": "1.2.11",
17
- "@checkstack/common": "0.6.4",
18
- "@checkstack/dashboard-frontend": "0.3.23",
19
- "@checkstack/frontend-api": "0.3.8",
20
- "@checkstack/maintenance-common": "0.4.8",
21
- "@checkstack/signal-frontend": "0.0.14",
22
- "@checkstack/ui": "1.2.0",
15
+ "@checkstack/auth-frontend": "0.5.18",
16
+ "@checkstack/catalog-common": "1.3.1",
17
+ "@checkstack/common": "0.6.5",
18
+ "@checkstack/dashboard-frontend": "0.3.26",
19
+ "@checkstack/frontend-api": "0.3.9",
20
+ "@checkstack/maintenance-common": "0.4.9",
21
+ "@checkstack/signal-frontend": "0.0.15",
22
+ "@checkstack/ui": "1.2.1",
23
23
  "date-fns": "^4.1.0",
24
24
  "lucide-react": "^0.344.0",
25
25
  "react": "^18.2.0",
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "typescript": "^5.0.0",
30
30
  "@types/react": "^18.2.0",
31
- "@checkstack/tsconfig": "0.0.4",
31
+ "@checkstack/tsconfig": "0.0.5",
32
32
  "@checkstack/scripts": "0.1.2"
33
33
  }
34
34
  }
@@ -26,6 +26,7 @@ import { Plus, MessageSquare, Loader2, AlertCircle } from "lucide-react";
26
26
  import { MaintenanceUpdateForm } from "./MaintenanceUpdateForm";
27
27
  import { getMaintenanceStatusBadge } from "../utils/badges";
28
28
  import { TeamAccessEditor } from "@checkstack/auth-frontend";
29
+ import { extractErrorMessage } from "@checkstack/common";
29
30
 
30
31
  interface Props {
31
32
  open: boolean;
@@ -73,7 +74,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
73
74
  onSave();
74
75
  },
75
76
  onError: (error) => {
76
- toast.error(error instanceof Error ? error.message : "Failed to save");
77
+ toast.error(extractErrorMessage(error, "Failed to save"));
77
78
  },
78
79
  });
79
80
 
@@ -83,7 +84,7 @@ export const MaintenanceEditor: React.FC<Props> = ({
83
84
  onSave();
84
85
  },
85
86
  onError: (error) => {
86
- toast.error(error instanceof Error ? error.message : "Failed to save");
87
+ toast.error(extractErrorMessage(error, "Failed to save"));
87
88
  },
88
89
  });
89
90
 
@@ -14,6 +14,7 @@ import {
14
14
  useToast,
15
15
  } from "@checkstack/ui";
16
16
  import { Loader2 } from "lucide-react";
17
+ import { extractErrorMessage } from "@checkstack/common";
17
18
 
18
19
  interface MaintenanceUpdateFormProps {
19
20
  maintenanceId: string;
@@ -45,7 +46,7 @@ export const MaintenanceUpdateForm: React.FC<MaintenanceUpdateFormProps> = ({
45
46
  },
46
47
  onError: (error) => {
47
48
  toast.error(
48
- error instanceof Error ? error.message : "Failed to post update"
49
+ extractErrorMessage(error, "Failed to post update")
49
50
  );
50
51
  },
51
52
  });
@@ -48,6 +48,7 @@ import {
48
48
  import { format } from "date-fns";
49
49
  import { MaintenanceEditor } from "../components/MaintenanceEditor";
50
50
  import { getMaintenanceStatusBadge } from "../utils/badges";
51
+ import { extractErrorMessage } from "@checkstack/common";
51
52
 
52
53
  const MaintenanceConfigPageContent: React.FC = () => {
53
54
  const maintenanceClient = usePluginClient(MaintenanceApi);
@@ -112,7 +113,7 @@ const MaintenanceConfigPageContent: React.FC = () => {
112
113
  setDeleteId(undefined);
113
114
  },
114
115
  onError: (error) => {
115
- toast.error(error instanceof Error ? error.message : "Failed to delete");
116
+ toast.error(extractErrorMessage(error, "Failed to delete"));
116
117
  },
117
118
  });
118
119
 
@@ -124,7 +125,7 @@ const MaintenanceConfigPageContent: React.FC = () => {
124
125
  },
125
126
  onError: (error) => {
126
127
  toast.error(
127
- error instanceof Error ? error.message : "Failed to complete",
128
+ extractErrorMessage(error, "Failed to complete"),
128
129
  );
129
130
  },
130
131
  });
@@ -11,7 +11,7 @@ import {
11
11
  accessApiRef,
12
12
  useApi,
13
13
  } from "@checkstack/frontend-api";
14
- import { resolveRoute } from "@checkstack/common";
14
+ import { resolveRoute, extractErrorMessage} from "@checkstack/common";
15
15
  import { MaintenanceApi } from "../api";
16
16
  import {
17
17
  maintenanceRoutes,
@@ -86,7 +86,7 @@ const MaintenanceDetailPageContent: React.FC = () => {
86
86
  },
87
87
  onError: (error) => {
88
88
  toast.error(
89
- error instanceof Error ? error.message : "Failed to complete",
89
+ extractErrorMessage(error, "Failed to complete"),
90
90
  );
91
91
  },
92
92
  });