@checkstack/announcement-frontend 0.2.0 → 0.2.2
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 +45 -0
- package/package.json +8 -8
- package/src/pages/AnnouncementManagePage.tsx +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @checkstack/announcement-frontend
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [26d8bae]
|
|
8
|
+
- @checkstack/ui@1.3.0
|
|
9
|
+
- @checkstack/auth-frontend@0.5.19
|
|
10
|
+
|
|
11
|
+
## 0.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
|
|
16
|
+
|
|
17
|
+
**New utility**
|
|
18
|
+
|
|
19
|
+
- `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
|
|
20
|
+
|
|
21
|
+
**ESLint rules**
|
|
22
|
+
|
|
23
|
+
- `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
|
|
24
|
+
- `no-console` in frontend packages — forces `toast` over silent `console.error`
|
|
25
|
+
- `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
|
|
26
|
+
- Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
|
|
27
|
+
|
|
28
|
+
**Refactoring**
|
|
29
|
+
|
|
30
|
+
- Replace 141 `instanceof Error` boilerplate patterns across the codebase
|
|
31
|
+
- Replace swallowed `console.error` with user-visible `toast.error()` feedback
|
|
32
|
+
- Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
|
|
33
|
+
- Consolidate 3 identical callback handlers into `handleDialogClose`
|
|
34
|
+
- Fix conditional React hook call in `FormField.tsx`
|
|
35
|
+
- Fix unstable useMemo deps in `Dashboard.tsx`
|
|
36
|
+
- Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
|
|
37
|
+
- Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
|
|
38
|
+
- Delete obvious comments in `encryption.ts` and Teams `provider.ts`
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [d1a2796]
|
|
41
|
+
- @checkstack/common@0.6.5
|
|
42
|
+
- @checkstack/ui@1.2.1
|
|
43
|
+
- @checkstack/auth-frontend@0.5.18
|
|
44
|
+
- @checkstack/frontend-api@0.3.9
|
|
45
|
+
- @checkstack/announcement-common@0.2.1
|
|
46
|
+
- @checkstack/signal-frontend@0.0.15
|
|
47
|
+
|
|
3
48
|
## 0.2.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/announcement-frontend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"checkstack": {
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"lint:code": "eslint . --max-warnings 0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@checkstack/announcement-common": "0.1
|
|
16
|
-
"@checkstack/auth-frontend": "0.5.
|
|
17
|
-
"@checkstack/common": "0.6.
|
|
18
|
-
"@checkstack/frontend-api": "0.3.
|
|
19
|
-
"@checkstack/signal-frontend": "0.0.
|
|
20
|
-
"@checkstack/ui": "1.2.
|
|
15
|
+
"@checkstack/announcement-common": "0.2.1",
|
|
16
|
+
"@checkstack/auth-frontend": "0.5.18",
|
|
17
|
+
"@checkstack/common": "0.6.5",
|
|
18
|
+
"@checkstack/frontend-api": "0.3.9",
|
|
19
|
+
"@checkstack/signal-frontend": "0.0.15",
|
|
20
|
+
"@checkstack/ui": "1.2.1",
|
|
21
21
|
"date-fns": "^4.1.0",
|
|
22
22
|
"lucide-react": "^0.344.0",
|
|
23
23
|
"react": "^18.2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.0.0",
|
|
28
28
|
"@types/react": "^18.2.0",
|
|
29
|
-
"@checkstack/tsconfig": "0.0.
|
|
29
|
+
"@checkstack/tsconfig": "0.0.5",
|
|
30
30
|
"@checkstack/scripts": "0.1.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
Columns,
|
|
60
60
|
} from "lucide-react";
|
|
61
61
|
import { formatDistanceToNow, format } from "date-fns";
|
|
62
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
62
63
|
|
|
63
64
|
// ---------------------------------------------------------------------------
|
|
64
65
|
// Editor Dialog
|
|
@@ -133,7 +134,7 @@ const AnnouncementEditor: React.FC<AnnouncementEditorProps> = ({
|
|
|
133
134
|
onSave();
|
|
134
135
|
},
|
|
135
136
|
onError: (error) => {
|
|
136
|
-
toast.error(error
|
|
137
|
+
toast.error(extractErrorMessage(error, "Failed to create"));
|
|
137
138
|
},
|
|
138
139
|
});
|
|
139
140
|
|
|
@@ -144,7 +145,7 @@ const AnnouncementEditor: React.FC<AnnouncementEditorProps> = ({
|
|
|
144
145
|
onSave();
|
|
145
146
|
},
|
|
146
147
|
onError: (error) => {
|
|
147
|
-
toast.error(error
|
|
148
|
+
toast.error(extractErrorMessage(error, "Failed to update"));
|
|
148
149
|
},
|
|
149
150
|
});
|
|
150
151
|
|
|
@@ -467,7 +468,7 @@ const AnnouncementManageContent: React.FC = () => {
|
|
|
467
468
|
setDeleteId(undefined);
|
|
468
469
|
},
|
|
469
470
|
onError: (error) => {
|
|
470
|
-
toast.error(error
|
|
471
|
+
toast.error(extractErrorMessage(error, "Failed to delete"));
|
|
471
472
|
},
|
|
472
473
|
});
|
|
473
474
|
|