diff --git a/README.md b/README.md index 50fd3c42..0b077cfc 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,14 @@ We use the following icons for the SDKs and backend databases: - Web: `icon="js"` - Kotlin: `icon="k"` - Swift: `icon="swift"` +- Node.js: `icon="node-js"` +- .NET: `icon="wave-sine"` #### Some useful references: - Writing content: https://mintlify.com/docs/page - Available components: https://mintlify.com/docs/content/components/accordions - Global settings: https://mintlify.com/docs/settings/global +- Reusable Snippets for repeated content: https://mintlify.com/docs/reusable-snippets ### Publishing Changes diff --git a/client-sdk-references/dotnet.mdx b/client-sdk-references/dotnet.mdx new file mode 100644 index 00000000..fad74226 --- /dev/null +++ b/client-sdk-references/dotnet.mdx @@ -0,0 +1,9 @@ +--- +title: ".NET (closed alpha)" +description: "SDK reference for using PowerSync in .NET clients." +sidebarTitle: Overview +--- + + + Our .NET client SDK is currently in a closed alpha release for early testing with select customers. You can explore the repo [here](https://github.com/powersync-ja/powersync-dotnet), however it is not yet officially published so expect breaking changes and instability as development continues. + \ No newline at end of file diff --git a/client-sdk-references/introduction.mdx b/client-sdk-references/introduction.mdx index f41587e2..f39acc3f 100644 --- a/client-sdk-references/introduction.mdx +++ b/client-sdk-references/introduction.mdx @@ -3,19 +3,8 @@ title: "Introduction" description: "PowerSync supports multiple client-side frameworks with official SDKs" --- +import ClientSdks from '/snippets/client-sdks.mdx'; + Select your client framework for the full SDK reference, getting started instructions and example code: - - - - - - - - - Currently in a beta release. - - - Currently in a beta release. - - + diff --git a/client-sdk-references/node.mdx b/client-sdk-references/node.mdx new file mode 100644 index 00000000..f506942f --- /dev/null +++ b/client-sdk-references/node.mdx @@ -0,0 +1,194 @@ +--- +title: "Node.js client (alpha)" +description: "SDK reference for using PowerSync in Node.js clients." +sidebarTitle: Overview +--- + + + This page describes the PowerSync _client_ SDK for Node.js. + If you're interested in using PowerSync for your Node.js backend, no special package is required. + Instead, follow our guides on [app backend setup](/installation/app-backend-setup). + + + + + This SDK is distributed via NPM [\[External link\].](https://www.npmjs.com/package/@powersync/node) + + + + Refer to packages/node in the powersync-js repo on GitHub. + + + + Full API reference for the PowerSync SDK [\[External link\].](https://powersync-ja.github.io/powersync-js/node-sdk) + + + + A small CLI app showcasing bidirectional sync. + + + +## SDK Features + +* Provides real-time streaming of database changes. +* Offers direct access to the SQLite database, enabling the use of SQL on both client and server sides. +* Operations run on a background worker and are asynchronous by default, enabling concurrent queries. +* Enables subscription to queries for receiving live updates. +* Eliminates the need for client-side database migrations as these are managed automatically. + +## Quickstart + +To start using PowerSync in a Node client, first add the dependencies: + + + + ```bash + npm install @powersync/node + ``` + + + ```bash + yarn add @powersync/node + ``` + + + ```bash + pnpm install @powersync/node + ``` + + + +Depending on the package manager used, you might have to approve install scripts. +PowerSync currently requires install scripts on the `@powersync/node` and `@powersync/better-sqlite3` packages +to download native addons. + +Next, make sure that you have: + +* Signed up for a PowerSync Cloud account ([here](https://accounts.journeyapps.com/portal/powersync-signup?s=docs)) or [self-host PowerSync](/self-hosting/getting-started). +* [Configured your backend database](/installation/database-setup) and connected it to your PowerSync instance. + +### 1. Define the schema + +The first step is defining the schema for the local SQLite database. + +This schema represents a "view" of the downloaded data. No migrations are required — the schema is applied directly when the local PowerSync database is constructed (as we'll show in the next step). +You can use [this example](https://github.com/powersync-ja/powersync-js/blob/e5a57a539150f4bc174e109d3898b6e533de272f/demos/example-node/src/powersync.ts#L47-L77) as a reference when defining your schema. + + + **Generate schema automatically** + + In the [dashboard](/usage/tools/powersync-dashboard), the schema can be generated based off your sync rules by right-clicking on an instance and selecting **Generate client-side schema**. + Select JavaScript and replace the suggested import with `@powersync/node`. + + Similar functionality exists in the [CLI](/usage/tools/cli). + + +### 2. Instantiate the PowerSync Database + +Next, you need to instantiate the PowerSync database — this is the core managed database. + +Its primary functions are to record all changes in the local database, whether online or offline. In addition, it automatically uploads changes to your app backend when connected. + +**Example**: + +```js +import { PowerSyncDatabase } from '@powersync/node'; +import { Connector } from './Connector'; +import { AppSchema } from './Schema'; + +export const db = new PowerSyncDatabase({ + // The schema you defined in the previous step + schema: AppSchema, + database: { + // Filename for the SQLite database — it's important to only instantiate one instance per file. + dbFilename: 'powersync.db', + // Optional. Directory where the database file is located.' + // dbLocation: 'path/to/directory' + }, +}); +``` + +### 3. Integrate with your Backend + +The PowerSync backend connector provides the connection between your application backend and the PowerSync client-slide managed SQLite database. + +It is used to: + +1. Retrieve an auth token to connect to the PowerSync instance. +2. Apply local changes on your backend application server (and from there, to Postgres) + +Accordingly, the connector must implement two methods: + +1. [PowerSyncBackendConnector.fetchCredentials](https://github.com/powersync-ja/powersync-js/blob/ed5bb49b5a1dc579050304fab847feb8d09b45c7/packages/common/src/client/connection/PowerSyncBackendConnector.ts#L16) - This is called every couple of minutes and is used to obtain credentials for your app backend API. -> See [Authentication Setup](/installation/authentication-setup) for instructions on how the credentials should be generated. +2. [PowerSyncBackendConnector.uploadData](https://github.com/powersync-ja/powersync-js/blob/ed5bb49b5a1dc579050304fab847feb8d09b45c7/packages/common/src/client/connection/PowerSyncBackendConnector.ts#L24) - Use this to upload client-side changes to your app backend. + -> See [Writing Client Changes](/installation/app-backend-setup/writing-client-changes) for considerations on the app backend implementation. + +**Example**: + +```js +import { UpdateType } from '@powersync/node'; + +export class Connector implements PowerSyncBackendConnector { + constructor() { + // Setup a connection to your server for uploads + this.serverConnectionClient = TODO; + } + + async fetchCredentials() { + // Implement fetchCredentials to obtain a JWT from your authentication service. + // See https://docs.powersync.com/installation/authentication-setup + // If you're using Supabase or Firebase, you can re-use the JWT from those clients, see + // - https://docs.powersync.com/installation/authentication-setup/supabase-auth + // - https://docs.powersync.com/installation/authentication-setup/firebase-auth + return { + endpoint: '[Your PowerSync instance URL or self-hosted endpoint]', + // Use a development token (see Authentication Setup https://docs.powersync.com/installation/authentication-setup/development-tokens) to get up and running quickly + token: 'An authentication token' + }; + } + + async uploadData(database) { + // Implement uploadData to send local changes to your backend service. + // You can omit this method if you only want to sync data from the database to the client + + // See example implementation here: https://docs.powersync.com/client-sdk-references/javascript-web#3-integrate-with-your-backend + } +} +``` + +With your database instantiated and your connector ready, call `connect` to start the synchronization process: + +```js +await db.connect(new Connector()); +await db.waitForFirstSync(); // Optional, to wait for a complete snapshot of data to be available +``` + +## Usage + +After connecting the client database, it is ready to be used. The API to run queries and updates is identical to our +[web SDK](/client-sdk-references/javascript-web#using-powersync%3A-crud-functions): + +```js +// Use db.get() to fetch a single row: +console.log(await db.get('SELECT powersync_rs_version();')); + +// Or db.all() to fetch all: +console.log(await db.all('SELECT * FROM lists;')); + +// Use db.watch() to watch queries for changes: +const watchLists = async () => { + for await (const rows of db.watch('SELECT * FROM lists;')) { + console.log('Has todo lists', rows.rows!._array); + } +}; +watchLists(); + +// And db.execute for inserts, updates and deletes: +await db.execute( + "INSERT INTO lists (id, created_at, name, owner_id) VALUEs (uuid(), datetime('now'), ?, uuid());", + ['My new list'] +); +``` + +PowerSync runs queries asynchronously on a background pool of workers and automatically configures WAL to +allow a writer and multiple readers to operate in parallel. diff --git a/client-sdk-references/node/javascript-orm-support.mdx b/client-sdk-references/node/javascript-orm-support.mdx new file mode 100644 index 00000000..db027a91 --- /dev/null +++ b/client-sdk-references/node/javascript-orm-support.mdx @@ -0,0 +1,5 @@ +--- +title: "JavaScript ORM Support" +url: /client-sdk-references/javascript-web/javascript-orm +sidebarTitle: "ORM Support" +--- diff --git a/installation/client-side-setup.mdx b/installation/client-side-setup.mdx index 13b6086d..26383e8e 100644 --- a/installation/client-side-setup.mdx +++ b/installation/client-side-setup.mdx @@ -207,6 +207,34 @@ Please see the steps based on your app framework: + + Add the [PowerSync Node NPM package](https://www.npmjs.com/package/@powersync/node) to your project: + + + + ```bash + npm install @powersync/node + ``` + + + + ```bash + yarn add @powersync/node + ``` + + + + ```bash + pnpm install @powersync/node + ``` + + + + See the full SDK reference for further details and getting started instructions: + + + + ## Next Steps For an overview of the client-side steps required to set up PowerSync in your app, continue reading the next sections. diff --git a/installation/client-side-setup/define-your-schema.mdx b/installation/client-side-setup/define-your-schema.mdx index effbfcf0..233a9695 100644 --- a/installation/client-side-setup/define-your-schema.mdx +++ b/installation/client-side-setup/define-your-schema.mdx @@ -27,10 +27,14 @@ For an example implementation of the client-side schema, see the _Getting Starte * [1\. Define the Schema](/client-sdk-references/react-native-and-expo#1-define-the-schema) -### JavaScript Web +### JavaScript/Web * [1\. Define the Schema](/client-sdk-references/javascript-web#1-define-the-schema) +### JavaScript/Node.js (alpha) + +* [1\. Define the Schema](/client-sdk-references/node#1-define-the-schema) + ### Kotlin Multiplatform * [1\. Define the Schema](/client-sdk-references/kotlin-multiplatform#1-define-the-schema) @@ -39,6 +43,7 @@ For an example implementation of the client-side schema, see the _Getting Starte * [1\. Define the Schema](/client-sdk-references/swift#1-define-the-schema) + ## ORM Support For details on ORM support in PowerSync, refer to [Using ORMs with PowerSync](https://www.powersync.com/blog/using-orms-with-powersync) on our blog. diff --git a/installation/client-side-setup/instantiate-powersync-database.mdx b/installation/client-side-setup/instantiate-powersync-database.mdx index 0f38ceb4..69d7a6d1 100644 --- a/installation/client-side-setup/instantiate-powersync-database.mdx +++ b/installation/client-side-setup/instantiate-powersync-database.mdx @@ -17,10 +17,14 @@ For an example implementation of instantiating the client-side database, see the * [2\. Instantiate the PowerSync Database](/client-sdk-references/react-native-and-expo#2-instantiate-the-powersync-database) -### JavaScript Web +### JavaScript/Web * [2\. Instantiate the PowerSync Database](/client-sdk-references/javascript-web#2-instantiate-the-powersync-database) +### JavaScript/Node.js (alpha) + +* [2\. Instantiate the PowerSync Database](/client-sdk-references/node#2-instantiate-the-powersync-database) + ### Kotlin Multiplatform * [2\. Instantiate the PowerSync Database](/client-sdk-references/kotlin-multiplatform#2-instantiate-the-powersync-database) diff --git a/installation/client-side-setup/integrating-with-your-backend.mdx b/installation/client-side-setup/integrating-with-your-backend.mdx index 7eee51ec..c8e76a80 100644 --- a/installation/client-side-setup/integrating-with-your-backend.mdx +++ b/installation/client-side-setup/integrating-with-your-backend.mdx @@ -27,10 +27,14 @@ For an example implementation of a PowerSync 'backend connector', see the _Getti * [3\. Integrate with your Backend](/client-sdk-references/react-native-and-expo#3-integrate-with-your-backend) -### JavaScript Web +### JavaScript/Web * [3\. Integrate with your Backend](/client-sdk-references/javascript-web#3-integrate-with-your-backend) +### JavaScript/Node.js (alpha) + +* [3\. Integrate with your Backend](/client-sdk-references/node#3-integrate-with-your-backend) + ### Kotlin Multiplatform * [3\. Integrate with your Backend](/client-sdk-references/kotlin-multiplatform#3-integrate-with-your-backend) diff --git a/installation/quickstart-guide.mdx b/installation/quickstart-guide.mdx index 088f51dc..2d8c0b3b 100644 --- a/installation/quickstart-guide.mdx +++ b/installation/quickstart-guide.mdx @@ -3,7 +3,14 @@ title: "Quickstart Guide / Installation Overview" sidebarTitle: "Quickstart / Overview" --- -PowerSync is designed to be stack agnostic, and currently supports **Postgres**, **MongoDB** and **MySQL** (alpha) as the source database, and has official SDKs for [**Flutter**](/client-sdk-references/flutter) (mobile and [web](/client-sdk-references/flutter/flutter-web-support)), [**React Native**](/client-sdk-references/react-native-and-expo) (mobile and [web](/client-sdk-references/react-native-and-expo/react-native-web-support)), [**JavaScript/Web**](/client-sdk-references/javascript-web) (vanilla JS, React, Vue), [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform) (beta) and [**Swift**](/client-sdk-references/swift) (beta) available on the client-side today. +PowerSync is designed to be stack agnostic, and currently supports **Postgres**, **MongoDB** and **MySQL** (alpha) as the source database, and has the following official client-side SDKs available today: +- [**Flutter**](/client-sdk-references/flutter) (mobile and [web](/client-sdk-references/flutter/flutter-web-support)) +- [**React Native**](/client-sdk-references/react-native-and-expo) (mobile and [web](/client-sdk-references/react-native-and-expo/react-native-web-support)) +- [**JavaScript/Web**](/client-sdk-references/javascript-web) (vanilla JS, React, Vue) +- [**JavaScript/Node.js**](/client-sdk-references/node) (alpha) +- [**Kotlin Multiplatform**](/client-sdk-references/kotlin-multiplatform) (beta) +- [**Swift**](/client-sdk-references/swift) (beta) +- [**.NET**](/client-sdk-references/dotnet) (closed alpha) Support for additional platforms is on our [Roadmap](https://roadmap.powersync.com/). If one isn't supported today, please add your vote and check back soon. @@ -42,7 +49,7 @@ The following outlines our recommended steps to implement PowerSync in your proj Implement an app using one of our Client SDKs: 1. To start, you can continue using your Development Token. - 2. Implement a "Hello World" app to quickly get a feel, **or** jump straight into installing the client SDK in your existing app — see [Client-Side Setup](/installation/client-side-setup) or follow end-to-end getting started instructions in the [full SDK reference](https://docs.powersync.com/client-sdk-references/introduction). + 2. Implement a "Hello World" app to quickly get a feel, **or** jump straight into installing the client SDK in your existing app — see [Client-Side Setup](/installation/client-side-setup) or follow end-to-end getting started instructions in the [full SDK reference](/client-sdk-references/introduction). 3. Verify that downloads from your source database are working. Data should reflect in your UI and you can also [inspect the SQLite database](/resources/troubleshooting#inspect-local-sqlite-database). diff --git a/integration-guides/flutterflow-+-powersync.mdx b/integration-guides/flutterflow-+-powersync.mdx index f90bbe49..33830071 100644 --- a/integration-guides/flutterflow-+-powersync.mdx +++ b/integration-guides/flutterflow-+-powersync.mdx @@ -22,7 +22,7 @@ Used in conjunction with **FlutterFlow**, PowerSync enables developers to build * No more dozens of custom actions - * Working Attachments package (Coming soon) + * Working Attachments package (Guide coming soon) Note that using libraries in FlutterFlow requires being on a [paid plan with FlutterFlow](https://www.flutterflow.io/pricing). If this is not an option for you, you can use our [legacy guide](/integration-guides/flutterflow-+-powersync/powersync-+-flutterflow-legacy) with custom code to integrate PowerSync in your FlutterFlow project. @@ -51,7 +51,7 @@ This guide walks you through building a basic item management app from scratch a 5. Create Data -6. Update Data (Coming soon) +6. Update Data (Guide coming soon) 7. Delete Data @@ -638,7 +638,7 @@ You will now update the app so that we can capture new list entries. ## Update Data - This section is a work in progress. Please reach out on [our Discord](https://discord.gg/powersync) if you have any questions. + Updating data is possible today using the `powersyncWrite` helper of the Library, and a guide will be published soon. In the mean time, use the section below about [Deleting Data](#delete-data) as a reference. Please reach out on [our Discord](https://discord.gg/powersync) if you have any questions. ## Delete Data diff --git a/intro/powersync-overview.mdx b/intro/powersync-overview.mdx index 6fd974e2..d7c8f6a9 100644 --- a/intro/powersync-overview.mdx +++ b/intro/powersync-overview.mdx @@ -3,6 +3,8 @@ title: PowerSync Overview description: 'Sync Engine for Local-First & Offline-First Apps' --- +import ClientSdks from '/snippets/client-sdks.mdx'; + [PowerSync](https://www.powersync.com/) is a service and set of client SDKs that keeps backend databases in sync with on-device embedded SQLite databases. It enables real-time reactive [local-first](/resources/local-first-software) & offline-first apps that remain available even when network connectivity is poor or non-existent. @@ -33,21 +35,7 @@ PowerSync is also designed to be client-side stack agnostic, and currently has c Follow the links for the full SDK references, including getting started instructions and usage examples. - - - - - - - - - Currently in a beta release. - - - - Currently in a beta release. - - + ## Get Started with PowerSync diff --git a/migration-guides/mongodb-atlas.mdx b/migration-guides/mongodb-atlas.mdx index c5045147..2ccc6c5e 100644 --- a/migration-guides/mongodb-atlas.mdx +++ b/migration-guides/mongodb-atlas.mdx @@ -157,6 +157,28 @@ Here is an example of a client-side schema for PowerSync using a simple `todos` }); ``` + ```typescript TypeScript - Node.js + // Our Node.js SDK is currently in an alpha release + import { column, Schema, Table } from '@powersync/node'; + + const todos = new Table( + { + list_id: column.text, + created_at: column.text, + completed_at: column.text, + description: column.text, + created_by: column.text, + completed_by: column.text, + completed: column.integer + }, + { indexes: { list: ['list_id'] } } + ); + + export const AppSchema = new Schema({ + todos + }); + ``` + ```java Kotlin import com.powersync.db.schema.Column import com.powersync.db.schema.Index @@ -231,6 +253,11 @@ Here is an example of a client-side schema for PowerSync using a simple `todos` ``` + ```typescript .NET (Coming soon) + // Our .NET SDK is currently in a closed alpha release. + + ``` + A few things to note regarding the PowerSync client-side schema: @@ -283,6 +310,25 @@ Now that we have our Sync Rules and client-side schema defined, we can instantia }; ``` + ```typescript TypeScript - Node.js + // Our Node.js SDK is currently in an alpha release + import { PowerSyncDatabase } from '@powersync/node'; + import { Connector } from './Connector'; + import { AppSchema } from './Schema'; + + export const db = new PowerSyncDatabase({ + schema: AppSchema, + database: { + dbFilename: 'powersync.db' + } + }); + + export const setupPowerSync = async () => { + const connector = new Connector(); + db.connect(connector); + }; + ``` + ```java Kotlin // 1: Create platform specific DatabaseDriverFactory to be used by the PowerSyncBuilder to create the SQLite database driver. @@ -336,6 +382,11 @@ Now that we have our Sync Rules and client-side schema defined, we can instantia } ``` + ```typescript .NET (Coming soon) + // Our .NET SDK is currently in a closed alpha release. + + ``` + ### 8. Reading and writing data @@ -344,7 +395,7 @@ Reading data in the application which uses PowerSync is very simple: we use SQLi - ```typescript TypeScript - React Native & Web + ```typescript TypeScript - React Native, Web & Node.js // Reading Data export const getTodos = async () => { const results = await db.getAll('SELECT * FROM todos'); @@ -387,13 +438,18 @@ Reading data in the application which uses PowerSync is very simple: we use SQLi } ``` + ```typescript .NET (Coming soon) + // Our .NET SDK is currently in a closed alpha release. + + ``` + The same applies to writing data: `INSERT`, `UPDATE` and `DELETE` statements are used to create, update and delete rows. - ```typescript TypeScript - React Native & Web + ```typescript TypeScript - React Native, Web & Node.js // Writing Data export const insertTodo = async (listId: string, description: string) => { await db.execute('INSERT INTO todos (id, created_at, list_id, description) VALUES (uuid(), date(), ?, ?)', [listId, description]); @@ -430,6 +486,11 @@ The same applies to writing data: `INSERT`, `UPDATE` and `DELETE` statements are ); ``` + ```typescript .NET (Coming soon) + // Our .NET SDK is currently in a closed alpha release. + + ``` + The best way to ensure referential integrity in your database is to use UUIDs when inserting new rows on the client side. Since UUIDs can be generated offline/locally, they allowing for unique identification of records created in the client database before they are synced to the server. diff --git a/mint.json b/mint.json index da5d4b71..7c919220 100644 --- a/mint.json +++ b/mint.json @@ -323,7 +323,7 @@ }, { "group": "Kotlin Multiplatform", - "icon": "flag", + "icon": "k", "pages": [ "client-sdk-references/kotlin-multiplatform", "client-sdk-references/kotlin-multiplatform/usage-examples" @@ -336,6 +336,21 @@ "client-sdk-references/swift", "client-sdk-references/swift/migrating-from-alpha-to-beta" ] + }, + { + "group": "Node.js", + "icon": "node-js", + "pages": [ + "client-sdk-references/node", + "client-sdk-references/node/javascript-orm-support" + ] + }, + { + "group": ".NET", + "icon": "wave-sine", + "pages": [ + "client-sdk-references/dotnet" + ] } ] }, diff --git a/resources/demo-apps-example-projects.mdx b/resources/demo-apps-example-projects.mdx index be0f0336..c33ec9ff 100644 --- a/resources/demo-apps-example-projects.mdx +++ b/resources/demo-apps-example-projects.mdx @@ -46,7 +46,7 @@ Example projects are listed under backend they use, but you can easily wire up y * Corresponding backend demo: [Django Backend for To-Do List App](https://github.com/powersync-ja/powersync-django-backend-todolist-demo) (also linked below) - + #### Supabase Backend: * [React To-Do List App](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-supabase-todolist) * Includes [Full-Text Search](/usage/use-case-examples/full-text-search) (FTS) example @@ -65,6 +65,11 @@ Example projects are listed under backend they use, but you can easily wire up y * [example-vite](https://github.com/powersync-ja/powersync-js/blob/main/demos/example-vite/README.md): A minimal example demonstrating bundling with [Vite](https://vitejs.dev/). + + #### Self-Hosted: + * [CLI example](https://github.com/powersync-ja/powersync-js/tree/main/demos/example-node) + + #### Supabase Backend: @@ -82,6 +87,10 @@ Example projects are listed under backend they use, but you can easily wire up y + + #### Coming soon! + + * [Django Backend for To-Do List App](https://github.com/powersync-ja/powersync-django-backend-todolist-demo) * Corresponding front-end demo app: React Native [To-Do List App](https://github.com/powersync-ja/powersync-js/tree/main/demos/django-react-native-todolist) (also linked above) diff --git a/snippets/client-sdks.mdx b/snippets/client-sdks.mdx new file mode 100644 index 00000000..c248ecec --- /dev/null +++ b/snippets/client-sdks.mdx @@ -0,0 +1,23 @@ + + + + + + + + + Currently in an alpha release. + + + + Currently in a beta release. + + + + Currently in a beta release. + + + + Currently in a closed alpha release. + + diff --git a/usage/lifecycle-maintenance/upgrading-the-client-sdk.mdx b/usage/lifecycle-maintenance/upgrading-the-client-sdk.mdx index 2e5f74f6..67e60e90 100644 --- a/usage/lifecycle-maintenance/upgrading-the-client-sdk.mdx +++ b/usage/lifecycle-maintenance/upgrading-the-client-sdk.mdx @@ -35,7 +35,7 @@ pnpm upgrade @powersync/react-native @journeyapps/react-native-quick-sqlite -## JavaScript Web +## JavaScript/Web Run the below command in your project folder: @@ -57,6 +57,28 @@ pnpm upgrade @powersync/web @journeyapps/wa-sqlite +## JavaScript/Node.js (alpha) + +Run the below command in your project folder: + + + + ```bash + npm upgrade @powersync/node + ``` + + + ```bash + yarn upgrade @powersync/node + ``` + + + ```bash + pnpm upgrade @powersync/node + ``` + + + ## Kotlin Multiplatform Update your project's Gradle file (`build.gradle.kts`) with the latest version of the [SDK](https://central.sonatype.com/artifact/com.powersync/core).