Skip to content

Commit 21fa93d

Browse files
committed
Merge remote-tracking branch 'origin/main' into indexeddb-flushing
2 parents 21f9d00 + f03f15a commit 21fa93d

File tree

3 files changed

+17
-49
lines changed

3 files changed

+17
-49
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Compile Assets and Create Draft Release
44
on:
55
push:
66
tags:
7-
- "powersync-v[0-9]+.[0-9]+.[0-9]+"
7+
- 'powersync-v[0-9]+.[0-9]+.[0-9]+'
88

99
jobs:
1010
build:
@@ -19,8 +19,8 @@ jobs:
1919
- name: Install Flutter
2020
uses: subosito/flutter-action@v2
2121
with:
22-
flutter-version: "3.x"
23-
channel: "stable"
22+
flutter-version: '3.x'
23+
channel: 'stable'
2424

2525
- name: Install Melos
2626
run: flutter pub global activate melos
@@ -34,6 +34,9 @@ jobs:
3434
GH_REPO: ${{ github.repository }}
3535
run: |
3636
tag="${{ github.ref_name }}"
37-
body="Release $tag"
38-
gh release create --draft "$tag" --title "$tag" --notes "$body" --generate-notes
37+
version="${tag#powersync-v}"
38+
changes=$(awk "/## $version/{flag=1;next}/##/{flag=0}flag" packages/powersync/CHANGELOG.md)
39+
body="Release $tag
40+
$changes"
41+
gh release create "$tag" --title "$tag" --notes "$body"
3942
gh release upload "${{ github.ref_name }}" packages/powersync/assets/powersync_db.worker.js packages/powersync/assets/powersync_sync.worker.js

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ git push --follow-tags
2727

2828
**Note: This will launch the `release.yaml` and `publish.yaml` github actions in `.github/workflows`. So only run it when you are absolutely sure you want to release.**
2929

30-
A version bump and tag push for `powersync` will also create a draft github release for the powersync web worker. The worker needs to be manually published in the GitHub [releases](https://github.com/powersync-ja/powersync.dart/releases).
30+
A version bump and tag push for `powersync` will also create a Github release for the PowerSync web workers. Verify the release exists and is published in the [releases](https://github.com/powersync-ja/powersync.dart/releases).

packages/powersync/README.md

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ flutter pub add powersync
1818

1919
# Getting Started
2020

21-
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/flutter) contains everything you need to know to get started implementing PowerSync in your project.
21+
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/flutter) contains everything you need to know to get started implementing PowerSync in your project.
2222

2323
## **Web support - Beta**
2424

25-
Web support in version 1.9.0 is currently in a beta release. This means it is safe to use in production, provided that you've tested your use cases.
25+
Flutter Web support in version `^1.9.0` is currently in a beta release. It is functionally ready for production use, provided that you've tested your use cases.
26+
27+
Please familiarize yourself with the limitations for Flutter Web documented [here](https://docs.powersync.com/client-sdk-references/flutter/flutter-web-support#limitations).
2628

2729
### Demo app
2830

2931
The easiest way to test Flutter Web support is to run the [Supabase Todo-List](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo app:
3032

31-
1. Checkout [this repo's](https://github.com/powersync-ja/powersync.dart/tree/main) `main` branch.
33+
1. Clone [this repo](https://github.com/powersync-ja/powersync.dart/tree/main).
3234

3335
- Note: If you are an existing user updating to the latest code after a git pull, run `melos exec 'flutter pub upgrade'` in the repo's root directory and make sure it succeeds.
3436

@@ -39,52 +41,15 @@ The easiest way to test Flutter Web support is to run the [Supabase Todo-List](h
3941

4042
### Installing PowerSync in your own project
4143

42-
Install the latest version of the package, for example:
44+
Install the [latest version](https://pub.dev/packages/powersync/versions) of the package, for example:
4345

4446
```
4547
flutter pub add powersync:'^1.9.0'
4648
```
4749

48-
The latest version can be found [here](https://pub.dev/packages/powersync/versions).
49-
50-
### Additional config
51-
52-
Web support requires `sqlite3.wasm` and worker (`powersync_db.worker.js` and `powersync_sync.worker.js`) assets to be served from the web application. They can be downloaded to the `web` directory by running the following command in your application's root folder.
53-
54-
```dart
55-
dart run powersync:setup_web
56-
```
57-
58-
The same code is used for initializing native and web `PowerSyncDatabase` clients.
59-
60-
### Limitations
61-
62-
The API for Web is essentially the same as for native platforms, however, some features within `PowerSyncDatabase` clients are not available.
63-
64-
#### Imports
65-
66-
Flutter Web does not support importing directly from `sqlite3.dart` as it uses `dart:ffi`.
67-
68-
Change imports from
69-
70-
```Dart
71-
import 'package/powersync/sqlite3.dart`
72-
```
73-
74-
to
75-
76-
```Dart
77-
import 'package/powersync/sqlite3_common.dart'
78-
```
79-
80-
In code which needs to run on the Web platform. Isolated native specific code can still import from `sqlite3.dart`.
81-
82-
#### Database connections
83-
84-
Web DB connections do not support concurrency. A single DB connection is used. `readLock` and `writeLock` contexts do not
85-
implement checks for preventing writable queries in read connections and vice-versa.
50+
#### Additional config
8651

87-
Direct access to the synchronous `CommonDatabase` (`sqlite.Database` equivalent for web) connection is not available. `computeWithDatabase` is not available on web.
52+
Additional config is required for web projects. Please see our docs [here](https://docs.powersync.com/client-sdk-references/flutter/flutter-web-support#additional-config) for details.
8853

8954
# Changelog
9055

0 commit comments

Comments
 (0)