React Native turbo-module library (Kotlin + ObjC, new architecture only). Monorepo with Yarn workspaces.
Tool versions are managed via mise. After cloning, run:
mise install # installs pinned Node, Yarn, and Ruby versions| Tool | Version |
|---|---|
| Node | 22.20.0 |
| Yarn | 4.11.0 |
| Ruby | 3.4.4 |
Yarn is vendored at
.yarn/releases/yarn-4.11.0.cjs— themiseentry is a convenience to ensure the correct version is used system-wide.
| Command | Purpose |
|---|---|
yarn |
Install deps (Yarn 4.11.0, npm won't work) |
yarn lint |
ESLint on src/ + example/ |
yarn expo-plugin lint |
ESLint on plugin/ |
yarn typecheck |
tsc (root) |
yarn expo-plugin typecheck |
tsc (plugin) |
yarn test |
Jest (root library tests) |
yarn expo-plugin test |
Jest (plugin tests, snapshots) |
yarn prepare |
Build expo plugin + bob build → generates lib/ |
yarn release |
release-it (publish to npm + GitHub release) |
CI runs: lint → typecheck → test → build-library → build-android → build-ios.
- Library entry:
src/index.tsx— exportsRNOrientationDirectorclass, 3 hooks, 3 enums - Native spec:
src/NativeOrientationDirector.ts— TurboModule (RNOrientationDirectorSpec), codegen config inpackage.json - Expo plugin:
plugin/workspace, output →lib/plugin/, re-exported viaapp.plugin.js - Example app:
example/workspace, references local lib via workspace - Build:
react-native-builder-bob→lib/module/(ESM) +lib/typescript/(declarations)
- Only Yarn (v4.11.0, nodeLinker: node-modules). Do not use npm.
- New architecture only (Fabric, TurboModules). Old arch not supported since v3.0.0.
lib/is gitignored (generated). After modifying source, runyarn prepareto rebuild.- JS changes hot-reload in example app; native changes need
yarn example android/yarn example iosrebuild. - Plugin runs via Expo config plugins (SDK 54+).
- Commits must follow conventional commits — enforced by commitlint + lefthook.
- Pre-commit hooks lint + typecheck staged files in parallel.
- Root tests:
src/__tests__/(Jest, presetreact-native) - Plugin tests:
plugin/__tests__/(Jest viaexpo-module-scripts, snapshot-based) modulePathIgnorePatterns:example/node_modules,lib/- Run both suites before CI-relevant changes.