Skip to content

Commit 54f7a69

Browse files
authored
Merge pull request #61 from powersync-ja/alpha-release
Web Support
2 parents de5b7dd + 38f9ff3 commit 54f7a69

File tree

106 files changed

+3759
-1738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3759
-1738
lines changed

.github/workflows/demos.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install Melos
2424
run: flutter pub global activate melos
2525
- name: Install dependencies
26-
run: melos bootstrap
26+
run: melos prepare
2727
- name: Check formatting
2828
run: melos format:check:demos
2929
- name: Lint
@@ -43,11 +43,8 @@ jobs:
4343
- name: Install melos
4444
run: flutter pub global activate melos
4545
- name: Install dependencies
46-
run: melos bootstrap
47-
- name: Download powersync binary
48-
run: |
49-
github="https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.1.6"
50-
51-
curl "${github}/libpowersync_x64.so" -o packages/powersync/libpowersync.so --create-dirs -L -f
52-
- name: Run tests
46+
run: melos prepare
47+
- name: Run flutter tests
5348
run: melos test
49+
- name: Run dart tests
50+
run: melos test:web

.github/workflows/packages.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install Melos
2424
run: flutter pub global activate melos
2525
- name: Install dependencies
26-
run: melos bootstrap
26+
run: melos prepare
2727
- name: Check formatting
2828
run: melos format:check:packages
2929
- name: Lint
@@ -33,7 +33,7 @@ jobs:
3333
- name: Check publish score
3434
run: |
3535
flutter pub global activate pana
36-
./.github/workflows/scripts/run-pana.sh
36+
melos analyze:packages:pana --no-select
3737
3838
test:
3939
runs-on: ubuntu-latest
@@ -46,12 +46,9 @@ jobs:
4646
channel: "stable"
4747
- name: Install melos
4848
run: flutter pub global activate melos
49-
- name: Install dependencies
50-
run: melos bootstrap
51-
- name: Download powersync binary
52-
run: |
53-
github="https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v0.1.6"
54-
55-
curl "${github}/libpowersync_x64.so" -o packages/powersync/libpowersync.so --create-dirs -L -f
56-
- name: Run tests
49+
- name: Install dependencies and prepare project
50+
run: melos prepare
51+
- name: Run flutter tests
5752
run: melos test
53+
- name: Run dart tests
54+
run: melos test:web

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
permissions:
88
contents: write
99
id-token: write # Required for authentication using OIDC
10-
runs-on: [ ubuntu-latest ]
10+
runs-on: [ubuntu-latest]
1111
steps:
1212
- uses: actions/checkout@v3
1313
- uses: subosito/flutter-action@v2

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This triggers whenever a tagged release is pushed
2+
name: Compile Assets and Create Draft Release
3+
4+
on:
5+
push:
6+
tags:
7+
# Trigger on tags beginning with 'v'
8+
# Note that `melos version ...` adds the package name as a suffix
9+
# This action is not compatible with tags such as `powersync-v1.1.1`
10+
# marvinpinto/action-automatic-releases struggles to generate changelogs
11+
# Be sure to manually tag the commit to trigger this action
12+
- 'v*'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v4
21+
22+
- name: Install Flutter
23+
uses: subosito/flutter-action@v2
24+
with:
25+
flutter-version: '3.x'
26+
channel: 'stable'
27+
28+
- name: Install Melos
29+
run: flutter pub global activate melos
30+
31+
- name: Install Dependencies and Compile Assets
32+
run: melos prepare
33+
34+
- name: Create Draft Release
35+
uses: 'marvinpinto/action-automatic-releases@latest'
36+
with:
37+
repo_token: '${{ secrets.GITHUB_TOKEN }}'
38+
prerelease: true # TODO update when out of alpha
39+
draft: true
40+
files: |
41+
assets/powersync_db.worker.js

.github/workflows/scripts/run-pana.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
.DS_Store
55
pubspec_overrides.yaml
66
.idea
7+
.vscode
78
*.iml
89
.flutter-plugins-dependencies
910
.flutter-plugins
11+
build
12+
13+
# Shared assets
14+
assets
15+
16+
# Web assets
17+
powersync_db.worker.js
18+
sqlite3.wasm
19+
20+
#Core binaries
21+
*.dylib
22+
*.dll
23+
*.so

CHANGELOG.md

Lines changed: 162 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,186 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## 2024-07-16
6+
## 2024-07-18
77

88
### Changes
99

1010
---
1111

1212
Packages with breaking changes:
1313

14-
- There are no breaking changes in this release.
14+
- There are no breaking changes in this release.
1515

1616
Packages with other changes:
1717

18-
- [`powersync` - `v1.5.5`](#powersync---v155)
19-
- [`powersync_attachments_helper` - `v0.5.1+1`](#powersync_attachments_helper---v0511)
18+
- [`powersync` - `v1.6.0-alpha.1`](#powersync---v160-alpha1)
19+
- [`powersync_attachments_helper` - `v0.6.0-alpha.1`](#powersync_attachments_helper---v060-alpha1)
2020

2121
Packages with dependency updates only:
2222

2323
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
2424
25-
- `powersync_attachments_helper` - `v0.5.1+1`
25+
- `powersync_attachments_helper` - `v0.6.0-alpha.1`
26+
27+
---
28+
29+
#### `powersync` - `v1.6.0-alpha.1`
30+
31+
- Added support for client parameters when connecting.
32+
- Fix watch query parameter `triggerOnTables` to prepend powersync view names.
33+
- Upgrade dependency `sqlite_async` to version 0.8.1.
34+
- Fix issue where `hasSynced` is cleared when offline.
35+
36+
## 2024-07-16
37+
38+
### Changes
2639

2740
---
2841

42+
- [`powersync` - `v1.5.5`](#powersync---v155)
43+
- [`powersync_attachments_helper` - `v0.5.1+1`](#powersync_attachments_helper---v0511)
44+
2945
#### `powersync` - `v1.5.5`
3046

31-
- Fix issue where `hasSynced` is cleared when offline.
47+
- Fix issue where `hasSynced` is cleared when offline.
48+
49+
## 2024-07-10
50+
51+
### Changes
52+
53+
---
54+
55+
Packages with breaking changes:
56+
57+
- There are no breaking changes in this release.
58+
59+
Packages with other changes:
60+
61+
- [`powersync` - `v1.3.0-alpha.9`](#powersync---v130-alpha9)
62+
- [`powersync_attachments_helper` - `v0.3.0-alpha.4`](#powersync_attachments_helper---v030-alpha4)
63+
64+
Packages with dependency updates only:
65+
66+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
67+
68+
- `powersync_attachments_helper` - `v0.3.0-alpha.4`
69+
70+
---
71+
72+
#### `powersync` - `v1.3.0-alpha.9`
73+
74+
- Updated sqlite_async to use Navigator locks for limiting sync stream implementions in multiple tabs
75+
76+
## 2024-07-04
77+
78+
### Changes
79+
80+
---
81+
82+
Packages with breaking changes:
83+
84+
- There are no breaking changes in this release.
85+
86+
Packages with other changes:
87+
88+
- [`powersync` - `v1.3.0-alpha.8`](#powersync---v130-alpha8)
89+
- [`powersync_attachments_helper` - `v0.3.0-alpha.3`](#powersync_attachments_helper---v030-alpha3)
90+
91+
Packages with dependency updates only:
92+
93+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
94+
95+
- `powersync_attachments_helper` - `v0.3.0-alpha.3`
96+
97+
---
98+
99+
#### `powersync` - `v1.3.0-alpha.8`
100+
101+
- **FIX**(powersync-attachements-helper): pubspec file (#29).
102+
- **DOCS**: update readme and getting started (#51).
103+
104+
## 2024-05-30
105+
106+
### Changes
107+
108+
---
109+
110+
Packages with breaking changes:
111+
112+
- [`powersync_attachments_helper` - `v0.3.0-alpha.2`](#powersync_attachments_helper---v030-alpha2)
113+
114+
Packages with other changes:
115+
116+
- [`powersync` - `v1.3.0-alpha.5`](#powersync---v130-alpha5)
117+
118+
---
119+
120+
#### `powersync_attachments_helper` - `v0.3.0-alpha.2`
121+
122+
- **FIX**: reset isProcessing when exception is thrown during sync process. (#81).
123+
- **FIX**: attachment queue duplicating requests (#68).
124+
- **FIX**(powersync-attachements-helper): pubspec file (#29).
125+
- **FEAT**(attachments): add error handlers (#65).
126+
- **DOCS**: update readmes (#38).
127+
- **BREAKING** **FEAT**(attachments): cater for subdirectories in storage (#78).
128+
129+
#### `powersync` - `v1.3.0-alpha.5`
130+
131+
- **FIX**(powersync-attachements-helper): pubspec file (#29).
132+
- **DOCS**: update readme and getting started (#51).
133+
134+
## 2024-03-05
135+
136+
### Changes
137+
138+
---
139+
140+
Packages with breaking changes:
141+
142+
- There are no breaking changes in this release.
143+
144+
Packages with other changes:
145+
146+
- [`powersync` - `v1.3.0-alpha.3`](#powersync---v130-alpha3)
147+
- [`powersync_attachments_helper` - `v0.3.0-alpha.2`](#powersync_attachments_helper---v030-alpha2)
148+
149+
Packages with dependency updates only:
150+
151+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
152+
153+
- `powersync_attachments_helper` - `v0.3.0-alpha.2`
154+
155+
---
156+
157+
#### `powersync` - `v1.3.0-alpha.3`
158+
159+
- Fixed issue where disconnectAndClear would prevent subsequent sync connection on native platforms and would fail to clear the database on web.
160+
161+
## 2024-02-15
162+
163+
### Changes
164+
165+
---
166+
167+
Packages with breaking changes:
168+
169+
- There are no breaking changes in this release.
170+
171+
Packages with other changes:
172+
173+
- [`powersync` - `v1.3.0-alpha.2`](#powersync---v130-alpha2)
174+
- [`powersync_attachments_helper` - `v0.3.0-alpha.2`](#powersync_attachments_helper---v030-alpha2)
175+
176+
Packages with dependency updates only:
177+
178+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
179+
180+
- `powersync_attachments_helper` - `v0.3.0-alpha.2`
181+
182+
---
183+
184+
#### `powersync` - `v1.3.0-alpha.2`
32185

186+
- **FIX**(powersync-attachements-helper): pubspec file (#29).
187+
- **DOCS**: update readme and getting started (#51).
188+
- `powersync_attachments_helper` - `v0.5.1+1`

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This monorepo uses [melos](https://melos.invertase.dev/) to handle command and p
1818

1919
For detailed usage, check out the inner [powersync](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync) and [attachments helper](https://github.com/powersync-ja/powersync.dart/tree/master/packages/powersync_attachments_helper) packages.
2020

21+
To configure the monorepo for development run `melos prepare` after cloning
22+
2123
#### Blog posts
2224

2325
- [Flutter Tutorial: building an offline-first chat app with Supabase and PowerSync](https://www.powersync.com/blog/flutter-tutorial-building-an-offline-first-chat-app-with-supabase-and-powersync)

demos/django-todolist/lib/models/todo_item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:powersync_django_todolist_demo/models/schema.dart';
22

33
import '../powersync.dart';
4-
import 'package:powersync/sqlite3.dart' as sqlite;
4+
import 'package:powersync/sqlite3_common.dart' as sqlite;
55

66
/// TodoItem represents a result row of a query on "todos".
77
///

demos/django-todolist/lib/models/todo_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:powersync/sqlite3.dart' as sqlite;
1+
import 'package:powersync/sqlite3_common.dart' as sqlite;
22

33
import './todo_item.dart';
44
import '../powersync.dart';

demos/django-todolist/lib/widgets/query_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:async';
22

33
import 'package:flutter/material.dart';
4-
import 'package:powersync/sqlite3.dart' as sqlite;
4+
import 'package:powersync/sqlite3_common.dart' as sqlite;
55

66
import './resultset_table.dart';
77
import '../powersync.dart';

demos/django-todolist/lib/widgets/resultset_table.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:powersync/sqlite3.dart' as sqlite;
2+
import 'package:powersync/sqlite3_common.dart' as sqlite;
33

44
/// Stateless DataTable rendering results from a SQLite query
55
class ResultSetTable extends StatelessWidget {

0 commit comments

Comments
 (0)