Skip to content

Commit 5e58081

Browse files
committed
Expand supported version range.
1 parent 67de3e6 commit 5e58081

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/powersync/bin/setup_web.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ void main(List<String> arguments) async {
9090
}
9191

9292
bool coreVersionIsInRange(String tag) {
93-
//Sets the range of powersync core version that is compatible with the sqlite3 version
94-
VersionConstraint constraint = VersionConstraint.parse('>=0.2.0 <0.4.0');
93+
// Sets the range of powersync core version that is compatible with the sqlite3 version
94+
// We're a little more selective in the versions chosen here than the range
95+
// we're compatible with.
96+
VersionConstraint constraint = VersionConstraint.parse('>=0.3.0 <0.4.0');
9597
List<String> parts = tag.split('-');
9698
String powersyncPart = parts[1];
9799

packages/powersync/lib/src/database/powersync_db_mixin.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ mixin PowerSyncDatabaseMixin implements SqliteConnection {
104104
version.split(RegExp(r'[./]')).take(3).map(int.parse).toList();
105105
} catch (e) {
106106
throw SqliteException(1,
107-
'Unsupported powersync extension version. Need >=0.2.0 <0.4.0, got: $version. Details: $e');
107+
'Unsupported powersync extension version. Need >=0.2.0 <1.0.0, got: $version. Details: $e');
108108
}
109109

110-
// Validate >=0.2.0 <0.4.0
110+
// Validate >=0.2.0 <1.0.0
111111
if (versionInts[0] != 0 ||
112-
(versionInts[1] != 2 && versionInts[1] != 3) ||
113-
versionInts[2] < 0) {
112+
(versionInts[1] < 2) ||
113+
(versionInts[1] == 2 && versionInts[2] < 0)) {
114114
throw SqliteException(1,
115-
'Unsupported powersync extension version. Need >=0.2.0 <0.4.0, got: $version');
115+
'Unsupported powersync extension version. Need >=0.2.0 <1.0.0, got: $version');
116116
}
117117
}
118118

0 commit comments

Comments
 (0)