@checkstack/api-docs-frontend 0.1.20 → 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,47 @@
1
1
  # @checkstack/api-docs-frontend
2
2
 
3
+ ## 0.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [26d8bae]
8
+ - @checkstack/ui@1.3.0
9
+
10
+ ## 0.1.21
11
+
12
+ ### Patch Changes
13
+
14
+ - d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
15
+
16
+ **New utility**
17
+
18
+ - `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
19
+
20
+ **ESLint rules**
21
+
22
+ - `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
23
+ - `no-console` in frontend packages — forces `toast` over silent `console.error`
24
+ - `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
25
+ - Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
26
+
27
+ **Refactoring**
28
+
29
+ - Replace 141 `instanceof Error` boilerplate patterns across the codebase
30
+ - Replace swallowed `console.error` with user-visible `toast.error()` feedback
31
+ - Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
32
+ - Consolidate 3 identical callback handlers into `handleDialogClose`
33
+ - Fix conditional React hook call in `FormField.tsx`
34
+ - Fix unstable useMemo deps in `Dashboard.tsx`
35
+ - Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
36
+ - Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
37
+ - Delete obvious comments in `encryption.ts` and Teams `provider.ts`
38
+
39
+ - Updated dependencies [d1a2796]
40
+ - @checkstack/common@0.6.5
41
+ - @checkstack/ui@1.2.1
42
+ - @checkstack/frontend-api@0.3.9
43
+ - @checkstack/api-docs-common@0.1.9
44
+
3
45
  ## 0.1.20
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.20",
3
+ "version": "0.1.22",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "checkstack": {
@@ -12,10 +12,10 @@
12
12
  "lint:code": "eslint . --max-warnings 0"
13
13
  },
14
14
  "dependencies": {
15
- "@checkstack/frontend-api": "0.3.8",
16
- "@checkstack/common": "0.6.4",
17
- "@checkstack/api-docs-common": "0.1.8",
18
- "@checkstack/ui": "1.1.3",
15
+ "@checkstack/frontend-api": "0.3.9",
16
+ "@checkstack/common": "0.6.5",
17
+ "@checkstack/api-docs-common": "0.1.9",
18
+ "@checkstack/ui": "1.2.1",
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
  }