Skip to content

Commit dabf474

Browse files
committed
Renamed dev package to adapter-sql-js.
1 parent fc99b93 commit dabf474

File tree

12 files changed

+40
-37
lines changed

12 files changed

+40
-37
lines changed

packages/dev/README.md renamed to packages/adapter-sql-js/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# PowerSync Dev
1+
# PowerSync SQL-JS Adapter
22

33
A development package for PowerSync which uses [SQL.js](https://sql.js.org/#/) to provide a pure JavaScript SQLite implementation.
44
This eliminates the need for native dependencies and enables seamless development with Expo Go and other JavaScript-only environments.
55

6-
This package is specifically designed to streamline the development workflow and will be much slower than DB adapters that use native dependencies.
7-
For example, when building React Native apps we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters when making production builds as they give substantially better performance.
6+
This adapter is specifically intended to streamline the development workflow and will be much slower than DB adapters that use native dependencies.
7+
Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data.
8+
In addition to the perfomance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file.
9+
10+
For production use, when building React Native apps we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters when making production builds as they give substantially better performance.
811

912
## Note: Alpha Release
1013

@@ -15,7 +18,7 @@ This package is currently in an alpha release.
1518
By default the SQLJS adapter will be in-memory. Read further for persister examples.
1619

1720
```tsx
18-
import { SQLJSOpenFactory } from '@powersync/dev';
21+
import { SQLJSOpenFactory } from '@powersync/adapter-sql-js';
1922

2023
const powersync = new PowerSyncDatabase({
2124
schema: AppSchema,

packages/dev/package.json renamed to packages/adapter-sql-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "@powersync/dev",
2+
"name": "@powersync/adapter-sql-js",
33
"version": "0.0.0",
44
"publishConfig": {
55
"registry": "https://registry.npmjs.org/",
66
"access": "public"
77
},
8-
"description": "Development helpers for JourneyApps PowerSync",
8+
"description": "A development db adapter based on SQL.js for JourneyApps PowerSync",
99
"type": "module",
1010
"main": "dist/bundle.mjs",
1111
"module": "dist/bundle.mjs",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)