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

オープン
#1,116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, react-native

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
1.1k
フォーク
121
平均マージ
12時間 53分
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

margelo/react-native-quick-crypto のほかの issue

margelo/react-native-quick-crypto の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。