This repository contains a React Native library (reactnative-forceupdate) and an example application under the example/ folder. The library source code lives in src/ and unit tests are in src/__tests__/. The project uses Yarn workspaces and requires Node.js 18.
- Install dependencies with
yarnfrom the repository root. Do not usenpm. - Run the following before committing any change:
yarn lint– ESLint with Prettier rulesyarn typecheck– TypeScript compilation without emitting filesyarn test– Jest unit tests
- Pre‑commit hooks run ESLint and TypeScript checks (see
lefthook.yml). Commit messages must follow the Conventional Commits specification. - The example application can be run with
yarn example <platform>where<platform>isstart,android,iosorweb.
- Build the library with
yarn prepare(usesreact-native-builder-bob). - Releases are handled via
yarn releasewhich usesrelease-it.
GitHub Actions (.github/workflows/ci.yml) run yarn lint, yarn typecheck, yarn test with coverage, build the library and the web example.
Run yarn test locally to execute the Jest suite. The CI workflow installs Node 18 via actions/setup-node and caches node_modules and .yarn/install-state.gz (see .github/actions/setup). Preinstall Node 18 or use a similar cache in your own CI to avoid re‑downloading all dependencies.
Keep pull requests focused and small. Verify that lint, typecheck and tests pass before creating the PR. Use clear commit messages in the Conventional Commit format.