Bundle Buffer on bare hosts without a react-native-quick-base64 alias

Aperta
#1,116 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, react-native

Direzione di ricerca

Start with the runtime require branches in @craftzdog/react-native-buffer and the existing alias in example/test/bare/aliases.mjs. After the upstream package changes, bump the dependency, remove the alias and react-native-quick-base64 peer dependency, and update the bare-host documentation. Done means a bare-host bundle resolves without that alias while the iOS and Android test suites pass.

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

Descrizione

@craftzdog/react-native-buffer picks its base64 library at runtime: require('react-native-quick-base64') on React Native, require('base64-js') elsewhere. Bundlers resolve both branches, and quick-base64 v3 imports react-native, so bare-host apps (Nitro UI, margelo/nitro-ui#637) must alias it to build even though that branch never runs there.

Plan: propose an upstream change to @craftzdog/react-native-buffer so the bundler picks the base64 library by resolution condition instead of a runtime check. Hosts without React Native then never see the React Native import. Once that ships, RNQC bumps the dependency, removes the alias from example/test/bare/aliases.mjs and the bare-host docs, and drops the react-native-quick-base64 peer dependency (#1117).

Related: #1058 (a native Nitro Buffer, blocked until it ports to Nitro Modules v1).

Done when a bare-host bundle of RNQC resolves without a react-native-quick-base64 alias, and the iOS and Android suites still pass.

Lingua principale
TypeScript
Stelle
1.1k
Fork
121
Merge medio
12h 53m
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di margelo/react-native-quick-crypto

Tutte le issue di margelo/react-native-quick-crypto

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.