a2ui-project / a2ui-project/a2ui
Consider widening React peer dep range to include React 17
- Vorherrschende Sprache
- TypeScript
- Sterne
- 16.4k
- Forks
- 1.3k
- Ø Merge
- 3 T. 15 Std.
- Gemergte PRs (30 T.)
- 134
Beschreibung
### Summary
`@a2ui/react` declares `peerDependencies` of `react` / `react-dom` as `^18.0.0 || ^19.0.0` across every published version (0.8.0 → 0.10.2). This prevents installation in React 17 codebases without `--legacy-peer-deps` or `--force`, even when the runtime features used are React 17-compatible.
### Ask
Would the maintainers consider one of:
1. Widening the peer range to `^17.0.0 || ^18.0.0 || ^19.0.0` if the package doesn't depend on React 18-only APIs.
2. Publishing a `0.9.x`-line release scoped to React 17, if 18+ features are required in newer versions.
### Motivation
React 17 is still widely deployed. Downstream consumers currently must set `legacy-peer-deps=true` globally, which papers over all peer-dep issues in their tree, not just this one.
### Environment
- Package: `@a2ui/react@0.9.1` (also verified 0.8.0, 0.9.0, 0.10.2)
- npm: 10.x
- Consumer: React 17.0.2 app
### React 18-only API audit
Happy to help audit the source if that would speed a decision — a quick grep for `useId`, `useSyncExternalStore`, `useTransition`, `useDeferredValue`, `useInsertionEffect`, or `createRoot`-only paths would tell us whether the current implementation actually requires React 18.
Beitragsleitfaden
Rechercherichtung
Überprüfe die package.json-Dateien auf die peerDependencies-Deklaration. Prüfe anschließend den Quellcode auf React-18+-spezifische APIs wie useId, useSyncExternalStore oder createRoot. Falls keine gefunden werden, aktualisiere den peerDependencies-Bereich in package.json, sodass ^17.0.0 eingeschlossen ist. Teste die Änderung, indem du das Paket baust und überprüfst, dass es korrekt in einem React-17-Projekt installiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 75/100