This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Track: HTTP client support on React Native for Android and iOS #3404
Closed
Description
HTTP client - January 18-29 ⌛
- Uncover and document issues related to HTTP client's operation in React Native
- Create app to showcase HTTP client working in React Native
- Create package to polyfill and patch missing or partially supported web and core APIs
- Propose fix for HTTP client factory's URL normalization logic
- Fix default base URL as per URL spec
- Patch HTTP client's
pubsub.subscribe
method to pass an option to fetch to activate text streaming support (custom option for React Native) - Have HTTP client's test suite running on React Native (with @hugomrdias' support 🙏)
- Track: Add better guard against location definition hugomrdias/iso-url#154
- Track: Add React Native (iOS and Android) support js-ipfs-utils#91
- add RN iOS support to aegir
- Track: Adapt HTTP client tests for React Native (iOS and Android) #3517
React Native Test Runner - January 4-8 ✅
A CLI tool in line of what @hugomrdias has done with playright-test but for React Native. The first version includes support for Zora test runner.
Repo: https://github.com/acostalima/react-native-test-runner
- Concept validation: use React Native's bundler, Metro, to report test results from an iOS or Android app to a Node process.
- Uses Metro and React Native's CLI APIs
- Find iOS simulator by name and OS version
- Start/stop headless iOS simulador
- Install/launch iOS app on simulator
- Tools:
xcrun simctl
, Wix's AppleSimulatorUtils, ...
- Tools:
- Build iOS app in debug mode programatically
- Tools:
xcodebuild
,pod
- Output binary location: ??
- Tools:
- Metro bundler:
server.close()
hangs after an app connects to the server and then when it's terminated - Fix Zora's exports in package.json for React Native
- Find Android emulator by name and OS version
- Build Android app in debug mode programatically
- Tools:
gradlew
- Output binary location: ??
- Tools:
- Install/launch Android app on emulator
- Tools:
adb
,emulator
,avdmanager
- Tools:
- Start/stop headless Android emulator
- CLI
- Tests
- Add README
- Setup CI pipeline in GitHub Actions
- Android job
- iOS job
- Android cache
- iOS cache
- npm cache
- Use
react-native init
to initialize a new React Native app instead and distributing it- When the test runner is installed as dev dependency, React Native itself and its dependencies may be hoisted
- There are files in the Android and iOS projects that expect React Native, its CLI and Metro to be available at the top level
node_modules
directory by hardcoded relative path look ups (e.g.../node_modules/react-native
). As such, the Android and iOS projects cannot be packaged and released to npm. - Accept a CLI option to pass React Native semver to use
- Create/delete RN test app directory
- Make RN and Metro requires relative to RN's test app directory
- Use default package name and bundle ID defined by
react-native init
for Android and iOS respectively to launch the apps - Check whether Babel config file needs to be copied to the RN test app's directory
References & Inspiration
- https://github.com/react-native-community/cli/tree/master/packages/platform-android/src
- https://github.com/react-native-community/cli/tree/master/packages/platform-ios/src
- https://github.com/react-native-community/cli/blob/master/packages/cli/src/commands/start/runServer.ts
- https://github.com/react-native-community/cli/blob/master/packages/cli/src/commands/start/watchMode.ts
- https://facebook.github.io/metro/docs/getting-started
- https://facebook.github.io/metro/docs/configuration
- https://github.com/facebook/metro/blob/b2528d40c4/packages/metro/src/HmrServer.js
- https://github.com/facebook/metro/blob/b2528d40c4/packages/metro/src/lib/attachWebsocketServer.js
- https://github.com/facebook/metro/blob/b2528d40c4/packages/metro/src/index.js
- https://github.com/react-native-community/cli/blob/master/packages/cli/src/tools/loadMetroConfig.ts
- https://github.com/react-native-community/cli/tree/master/packages/cli-server-api/src
- https://github.com/react-native-community/cli/blob/c09733ad85ec79b6f0475cd5b0237a6fa20bbaac/packages/cli/src/tools/metroPlatformResolver.ts
- https://github.com/wix/Detox/blob/master/docs/Guide.RunningOnCI.md
- https://github.com/wix/Detox/blob/master/docs/Introduction.AndroidDevEnv.md
- https://github.com/wix/Detox/blob/master/docs/Introduction.IosDevEnv.md
Fetch API - January 8-15 ✅
Technical discussion: react-native-community/fetch#4
- Implement Fetch API with
ReadableStream
support and text streaming built in top of React Native's networking API - Report and fix an issue about async iteration of
ReadableStream
- Take existing tests from GitHub's Fetch implementation and make them run in a React Native app
- Add tests for text streaming support (chunked encoding transfers)
- Setup CI pipeline in GitHub Actions to run Fetch API's tests automatically
- Update README
- Publish v1.0.0
- Update https://github.com/acostalima/react-native-polyfill-globals to setup https://github.com/react-native-community/fetch
- Add @react-native-community/fetch@1.0.0 as a dependency to https://github.com/ipfs-shipyard/react-native-ipfs-demo
- Update https://github.com/ipfs-shipyard/react-native-ipfs-demo README
React Native - January 18-22 ⌛
- Usage of
console.error
andconsole.warn
when consuming aBlob
withFileReader.readAsDataURL
. - Land PR to implement
FormData.set
method - Land PR to make
FormData.getParts
capable of handlingBlob
instances - Land PR to implement
FileReader.readAsArrayBuffer
Related work
Jet by Invertase
Jet lets you bring your React Native JS code into NodeJS and test it mock free and native testing code free - ideal for testing React Native modules e2e.
The developers behind React Native Firebase. Currently, the project is a PoC and does not have a dedicated GitHub repo.
Blob download/upload
- React Native Blob Courier: https://github.com/edeckers/react-native-blob-courier
- React Native Fetch Blob: https://github.com/joltup/rn-fetch-blob/
- Currently not maintained: Unmaintained joltup/rn-fetch-blob#666
- Expo File System: https://docs.expo.io/versions/latest/sdk/filesystem/