a2ui-project / a2ui-project/a2ui

Consider widening React peer dep range to include React 17

Aperta Adatta ai principianti
#2,372 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
P2 status: first-line-handled
Lingua principale
TypeScript
Stelle
16.4k
Fork
1.3k
Merge medio
3g 15h
PR unite (30g)
134

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Controlla i file package.json per la dichiarazione di peerDependencies. Quindi verifica il codice sorgente cercando API specifiche di React 18+ come useId, useSyncExternalStore o createRoot. Se non ne trovi nessuna, aggiorna l’intervallo di peerDependencies in package.json in modo da includere ^17.0.0. Verifica la modifica eseguendo la build del pacchetto e controllando che si installi correttamente in un progetto React 17.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
75/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.