@checkstack/api-docs-frontend 0.1.19 → 0.1.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,47 @@
1
1
  # @checkstack/api-docs-frontend
2
2
 
3
+ ## 0.1.21
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/ui@1.2.1
35
+ - @checkstack/frontend-api@0.3.9
36
+ - @checkstack/api-docs-common@0.1.9
37
+
38
+ ## 0.1.20
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [23c80bc]
43
+ - @checkstack/ui@1.2.0
44
+
3
45
  ## 0.1.19
4
46
 
5
47
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/api-docs-frontend",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "checkstack": {
@@ -15,7 +15,7 @@
15
15
  "@checkstack/frontend-api": "0.3.8",
16
16
  "@checkstack/common": "0.6.4",
17
17
  "@checkstack/api-docs-common": "0.1.8",
18
- "@checkstack/ui": "1.1.3",
18
+ "@checkstack/ui": "1.2.0",
19
19
  "react": "^18.2.0",
20
20
  "react-router-dom": "^6.22.0",
21
21
  "lucide-react": "^0.344.0"
@@ -23,7 +23,7 @@
23
23
  "devDependencies": {
24
24
  "typescript": "^5.0.0",
25
25
  "@types/react": "^18.2.0",
26
- "@checkstack/tsconfig": "0.0.4",
26
+ "@checkstack/tsconfig": "0.0.5",
27
27
  "@checkstack/scripts": "0.1.2"
28
28
  }
29
29
  }
@@ -20,6 +20,7 @@ import {
20
20
  Server,
21
21
  FileCode,
22
22
  } from "lucide-react";
23
+ import { extractErrorMessage } from "@checkstack/common";
23
24
 
24
25
  interface OpenApiSpec {
25
26
  info: {
@@ -379,7 +380,7 @@ export function ApiDocsPage() {
379
380
  const data = (await response.json()) as OpenApiSpec;
380
381
  setSpec(data);
381
382
  } catch (error_) {
382
- setError(error_ instanceof Error ? error_.message : "Unknown error");
383
+ setError(extractErrorMessage(error_, "Unknown error"));
383
384
  } finally {
384
385
  setLoading(false);
385
386
  }