Skip to content

SDK that enables local-first and real-time reactive apps with embedded SQLite for JavaScript clients, including React Native and Web

License

Notifications You must be signed in to change notification settings

powersync-ja/powersync-js

Repository files navigation

PowerSync React Native SDK

Monorepo for all things React Native and PowerSync.

Monorepo Structure

Development

Git Submodules

After cloning this repo be sure to init the Git submodules

git submodule init && git submodule update

This monorepo uses Yarn as it works well with React native.

Install workspace dependencies

yarn install

Build packages

yarn build:packages

Versioning

Development Packages

Development packages can be published by manually triggering the dev-packages workflow. Development packages are versioned as 0.0.0-{tag}-DATETIMESTAMP.

Production Packages

Pull requests should contain Changesets for changed packages.

Add changesets with

yarn changeset add

Merging a PR with Changesets will automatically create a PR with version bumps. That PR will be merged when releasing.

React Native Quick SQLite Development

Testing live development changes to @journeyapps/react-native-quick-sqlite will not with with standard yarn link commands. Metro does not work well with symlinks facebook/metro#286.

The process of releasing development packages for @journeyapps/react-native-quick-sqlite for each change can be tedious and slow. A faster (and hackier) method is to use mtsl which will watch and copy the package into this workspace's node_modules.

npm install -g mtsl
mtsl add -s "[source path to your react-native-quick-sqlite repo folder]" -d "[this workspaces root node_modules folder]"/@journeyapps/react-native-quick-sqlite
mtsl start "[the id returned from step above]"

Testing Supabase example app

cd apps/supabase-todolist

Test on either Android or iOS

yarn ios