Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.57 KB

contributing.md

File metadata and controls

56 lines (40 loc) · 2.57 KB

Contributing to FingerprintJS Pro React Native integration

Development Environment

Before starting work on repository please configure environment and emulators. You can find complete instruction here.

Development playground

In e2e-app folder you can find demo application that can be used for both local development and E2E tests.

Common steps

  1. Run pnpm install in the project root.
  2. Go to the e2e-app folder and run pnpm install.
  3. Set environment variable EXPO_PUBLIC_API_KEY, you can just use e2e-app/.env approach.
  4. Run pnpm prebuild to generate native projects using Expo.
  5. After prebuild is done, run pnpm start to start Metro bundler.
  6. Refer to the sections below to run the app on a specific platform.

Android

  1. Run emulator in Android Studio or connect your device. You can check connected devices with /android/sdk/platform-tools/adb devices command.
  2. Run pnpm android from e2e folder.
  3. You should see the running app in emulator or device.

iOS

  1. Run pnpm ios from e2e folder.
  2. You should see the running app in a simulator.

Web

  1. Run pnpm serve:web from e2e folder.
  2. You should see the running app in a browser.

Troubleshooting

  1. Try pnpm start --reset-cache.
  2. Try relaunch emulator/simulator or reconnect your device.
  3. Try to delete both node_modules and install dependencies again in order from common steps.

E2E tests

End-to-end tests live in e2e-app (an Expo app driven by Detox) and run in CI across a matrix of React Native versions. We intentionally test only React Native versions that Expo supports, because the app's native projects are generated by expo prebuild: each Expo SDK scaffolds from its own template and its native modules compile only against the React Native version(s) it supports. A React Native version with no corresponding Expo SDK can only be forced onto a mismatched scaffold or a pre-release canary, both of which break in ways no real user would hit, so testing them wouldn't produce enough value.

With that being said, it would be possible to test these versions without Expo, but it's not worth the effort at the moment.

Below is the list of React Native versions that are not tested in CI:

0.80, 0.82, 0.84

How to publish

We use changesets for handling release notes. If there are relevant changes, please add them to changeset via pnpm changeset. You need to run pnpm install before doing so.