Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-boxes-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@journeyapps/powersync-sdk-web": patch
---

Change to use lib instead of dist build folder
2 changes: 1 addition & 1 deletion demos/nextjs-supabase-todolist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This package is currently in a beta release.

Demo app demonstrating use of the [PowerSync SDK for Web](https://www.npmjs.com/package/@journeyapps/powersync-sdk-web) together with Supabase.

A step-by-step guide on Supabase<>PowerSync integration is available [here](https://docs.powersync.co/integration-guides/supabase).
A step-by-step guide on Supabase<>PowerSync integration is available [here](https://docs.powersync.com/integration-guides/supabase).

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

Expand Down
4 changes: 2 additions & 2 deletions demos/react-native-supabase-todolist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Demo app demonstrating use of the [PowerSync SDK for React Native](https://www.npmjs.com/package/@journeyapps/powersync-sdk-react-native) together with Supabase.

A step-by-step guide on Supabase<>PowerSync integration is available [here](https://docs.powersync.co/integration-guides/supabase).
A step-by-step guide on Supabase<>PowerSync integration is available [here](https://docs.powersync.com/integration-guides/supabase).

![docs-react-native-supabase-powersync-setup](https://github.com/journeyapps/powersync-supabase-react-native-todolist-demo/assets/277659/923dc9a2-6a0e-4ce4-934d-29e3ab8b0f09)

Expand All @@ -21,7 +21,7 @@ It does the following:

## Set up PowerSync Instance

Create a new PowerSync instance, connecting to the database of the Supabase project (find detailed instructions in the [Supabase<>PowerSync integration guide](https://docs.powersync.co/integration-guides/supabase)).
Create a new PowerSync instance, connecting to the database of the Supabase project (find detailed instructions in the [Supabase<>PowerSync integration guide](https://docs.powersync.com/integration-guides/supabase)).

Then deploy the following sync rules:

Expand Down
2 changes: 1 addition & 1 deletion demos/yjs-nextjs-supabase-text-collab/sync-rules.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sync-rule docs: https://docs.powersync.co/usage/sync-rules
# Sync-rule docs: https://docs.powersync.com/usage/sync-rules
bucket_definitions:
global:
data:
Expand Down
2 changes: 1 addition & 1 deletion packages/powersync-attachments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"author": "JOURNEYAPPS",
"license": "Apache-2.0",
"homepage": "https://docs.powersync.co/resources/api-reference",
"homepage": "https://docs.powersync.com/resources/api-reference",
"bugs": {
"url": "https://github.com/powersync-ja/powersync-js/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/powersync-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"bugs": {
"url": "https://github.com/powersync-ja/powersync-js/issues"
},
"homepage": "https://docs.powersync.co/resources/api-reference",
"homepage": "https://docs.powersync.com/resources/api-reference",
"dependencies": {
"@journeyapps/powersync-sdk-common": "workspace:*"
},
Expand Down
1 change: 1 addition & 0 deletions packages/powersync-sdk-common/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# PowerSync SDK common JS

This package contains a TypeScript implementation of a PowerSync database connector and streaming sync bucket implementation, which is used in the following SDKs:

- [packages/powersync-sdk-react-native](./packages/powersync-sdk-react-native/README.md)
- [packages/powersync-sdk-web](./packages/powersync-sdk-web/README.md)
2 changes: 1 addition & 1 deletion packages/powersync-sdk-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bugs": {
"url": "https://github.com/powersync-ja/powersync-js/issues"
},
"homepage": "https://docs.powersync.co/resources/api-reference",
"homepage": "https://docs.powersync.com/resources/api-reference",
"scripts": {
"build": "tsc -b",
"clean": "rm -rf lib tsconfig.tsbuildinfo"
Expand Down
8 changes: 4 additions & 4 deletions packages/powersync-sdk-react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# PowerSync SDK for React Native

[PowerSync](https://powersync.com) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases.
[PowerSync](https://powersync.com) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases.

This package (`packages/powersync-sdk-react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/powersync-sdk-common`.

Expand Down Expand Up @@ -116,6 +116,6 @@ For example projects built with PowerSync and React Native, see our [Demo Apps /

# Found a bug or need help?

* Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
* Please open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) when you come across a bug.
* Have feedback or an idea? [Submit an idea](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) via our public roadmap or [schedule a chat](https://calendly.com/powersync-product/powersync-chat) with someone from our product team.
- Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
- Please open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) when you come across a bug.
- Have feedback or an idea? [Submit an idea](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) via our public roadmap or [schedule a chat](https://calendly.com/powersync-product/powersync-chat) with someone from our product team.
2 changes: 1 addition & 1 deletion packages/powersync-sdk-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"bugs": {
"url": "https://github.com/powersync-ja/powersync-js/issues"
},
"homepage": "https://docs.powersync.co/",
"homepage": "https://docs.powersync.com/",
"peerDependencies": {
"@journeyapps/react-native-quick-sqlite": "^1.1.1",
"base-64": "^1.0.0",
Expand Down
10 changes: 4 additions & 6 deletions packages/powersync-sdk-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# PowerSync SDK for Web

[PowerSync](https://powersync.com) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases.
[PowerSync](https://powersync.com) is a service and set of SDKs that keeps Postgres databases in sync with on-device SQLite databases.

This package (`packages/powersync-sdk-web`) is the PowerSync SDK for JavaScript Web clients. It is an extension of `packages/powersync-sdk-common`.

Expand Down Expand Up @@ -50,8 +50,6 @@ For example projects built with PowerSync on Web, see our [Demo Apps / Example P

# Found a bug or need help?

* Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
* Please open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) when you come across a bug.
* Have feedback or an idea? [Submit an idea](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) via our public roadmap or [schedule a chat](https://calendly.com/powersync-product/powersync-chat) with someone from our product team.


- Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
- Please open a [GitHub issue](https://github.com/powersync-ja/powersync-js/issues) when you come across a bug.
- Have feedback or an idea? [Submit an idea](https://roadmap.powersync.com/tabs/5-roadmap/submit-idea) via our public roadmap or [schedule a chat](https://calendly.com/powersync-product/powersync-chat) with someone from our product team.
8 changes: 4 additions & 4 deletions packages/powersync-sdk-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "@journeyapps/powersync-sdk-web",
"version": "0.2.2",
"description": "A Web SDK for JourneyApps PowerSync",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"files": [
"dist"
"lib"
],
"repository": "https://github.com/powersync-ja/powersync-js",
"bugs": {
Expand All @@ -15,7 +15,7 @@
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"homepage": "https://docs.powersync.co",
"homepage": "https://docs.powersync.com",
"scripts": {
"build": "tsc --build",
"clean": "rm -rf dist tsconfig.tsbuildinfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
QueryResult,
Transaction
} from '@journeyapps/powersync-sdk-common';
import _ from 'lodash';
import * as Comlink from 'comlink';
import Logger, { ILogger } from 'js-logger';
import type { DBWorkerInterface, OpenDB } from '../../../worker/db/open-db';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import '@journeyapps/wa-sqlite';

import _ from 'lodash';
import * as Comlink from 'comlink';
import { DBWorkerInterface, _openDB } from './open-db';

Expand All @@ -27,7 +26,7 @@ _self.onconnect = function (event: MessageEvent<string>) {
Comlink.expose(openDB, port);
};

addEventListener('beforeunload', (event) => {
addEventListener('beforeunload', () => {
Array.from(DBMap.values()).forEach(async (dbPromise) => {
const db = await dbPromise;
db.close?.();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'lodash';
import * as Comlink from 'comlink';
import { SharedSyncImplementation, SharedSyncMessageType } from './SharedSyncImplementation';

Expand Down
6 changes: 3 additions & 3 deletions packages/powersync-sdk-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"lib": ["DOM", "ES2020", "WebWorker"] /* Specify library files to be included in the compilation. */,
"module": "es2020" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"outDir": "./dist" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"outDir": "./lib" /* Redirect output structure to the directory. */,
"skipLibCheck": true /* Skip type checking of declaration files. */,
"sourceMap": true /* Generates corresponding '.map' file. */,
"strict": true /* Enable all strict type-checking options. */,
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
}
},
"include": ["src/**/*"]
}