Skip to content

Commit

Permalink
Increase supported version range.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Oct 14, 2024
1 parent 77e196d commit 5c840c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/common/src/client/AbstractPowerSyncDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
.map((n) => parseInt(n));
} catch (e) {
throw new Error(
`Unsupported powersync extension version. Need >=0.2.0 <0.4.0, got: ${this.sdkVersion}. Details: ${e.message}`
`Unsupported powersync extension version. Need >=0.2.0 <1.0.0, got: ${this.sdkVersion}. Details: ${e.message}`
);
}

// Validate >=0.2.0 <0.4.0
if (versionInts[0] != 0 || (versionInts[1] != 2 && versionInts[1] != 3) || versionInts[2] < 0) {
throw new Error(`Unsupported powersync extension version. Need >=0.2.0 <0.4.0, got: ${this.sdkVersion}`);
// Validate >=0.2.0 <1.0.0
if (versionInts[0] != 0 || versionInts[1] < 2 || versionInts[2] < 0) {
throw new Error(`Unsupported powersync extension version. Need >=0.2.0 <1.0.0, got: ${this.sdkVersion}`);
}
}

Expand Down

0 comments on commit 5c840c2

Please sign in to comment.