Skip to content

Commit 816d961

Browse files
fix(deps): override postcss ^8.5.16 (GHSA-qx2v-qp2m-jg93) (#170)
* fix(deps): remove postcss devDep + override ^8.5.16 for nested next 8.4.31 (GHSA-qx2v-qp2m-jg93) postcss is not imported directly — postcss.config.mjs uses types only, @tailwindcss/postcss bundles its own, Next ships a nested 8.4.31. npm override forces the transitive version across all install contexts. Closes #156. * docs(adr): add ADR-001 recharts 3 upgrade decision + un-ignore docs/decisions/ADR-*.md --------- Co-authored-by: Emiya Kiritsugu <emiyakiritsugu3@users.noreply.github.com>
1 parent ddba3bd commit 816d961

4 files changed

Lines changed: 133 additions & 1438 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ docs/.obsidian/
129129
docs/archive/
130130
docs/assets/
131131
docs/decisions/
132+
!docs/decisions/ADR-*.md
132133
docs/observability/
133134
docs/operations/
134135
docs/pdr/
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# ADR-001: Recharts 2 → 3 Upgrade
2+
3+
**Status:** Accepted
4+
5+
**Date:** 2026-07-04
6+
7+
## Context
8+
9+
The project used recharts 2.15.4. PR #78 (2026-04-22) upgraded to recharts ^3.8.1 to unblock Tailwind CSS v4 (recharts 3 requires React 19 / Tailwind v4 compatible peer deps). The breaking change was already absorbed in the codebase.
10+
11+
### Breaking change absorbed
12+
13+
Recharts 3 removed `payload`, `label`, and coordinate props from the `ComponentProps` type (used by `Tooltip`, `Legend`, and `Customized` components). The types were moved to named exports `DefaultLegendContentProps` and `TooltipContentProps`.
14+
15+
## Decision
16+
17+
Upgrade `recharts` from 2.15.4 to ^3.8.1 with the import type pivot:
18+
19+
```typescript
20+
// Before (recharts 2)
21+
import type { ContentType } from 'recharts/types/component/DefaultLegendContent';
22+
23+
// After (recharts 3)
24+
import type { DefaultLegendContentProps, TooltipContentProps } from 'recharts';
25+
```
26+
27+
The import path change is the only migration cost. No runtime API changes affected the project's chart usage.
28+
29+
## Consequences
30+
31+
### Positive
32+
33+
- React 19 / Tailwind v4 compatibility via recharts 3 peer deps
34+
- `types/component/` deep path removed from sensitive type imports
35+
- TypeScript strict mode compatible (no `@ts-ignore` needed)
36+
37+
### Negative
38+
39+
- None. The breaking type change was fully absorbed in `src/components/ui/chart.tsx:5`.
40+
41+
## Files Changed
42+
43+
- `src/components/ui/chart.tsx` — recharts import type pivot
44+
- `package.json``recharts` dep bumped from 2.15.4 to ^3.8.1
45+
46+
## Testing
47+
48+
- `npm run typecheck` — 0 errors
49+
- `npm run test` — 1103/1103
50+
- `npm run e2e` — 21/21 (dashboard smoke + chart render)
51+
- `/dashboard` — manual smoke: charts render with correct axis labels, tooltip on hover, legend visible

0 commit comments

Comments
 (0)