Skip to content

Commit bf24e5e

Browse files
cleanup
1 parent b6c8c2a commit bf24e5e

File tree

5 files changed

+48
-45
lines changed

5 files changed

+48
-45
lines changed

demos/react-native-supabase-todolist/library/powersync/system.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,10 @@ import { SupabaseConnector } from '../supabase/SupabaseConnector';
1313
import { AppSchema } from './AppSchema';
1414
import { PhotoAttachmentQueue } from './PhotoAttachmentQueue';
1515

16-
// console.log(SQLJS);
17-
// const result = SQLJS({ locateFile: (filename: any) => `../dist/${filename}` });
18-
// result.then((SQL: any) => {
19-
// console.log('SQL.js loaded:');
20-
// const powersync = new PowerSyncDatabase({
21-
// schema: AppSchema,
22-
// // database: {
23-
// // dbFilename: 'ddd'
24-
// // },
25-
// database: new SQLJSOpenFactory({
26-
// dbFilename: 'powersync.db',
27-
// sql: SQL as any,
28-
// persister: {
29-
// // TODO
30-
// readFile: async () => null,
31-
// writeFile: async () => {}
32-
// }
33-
// }),
34-
// logger
35-
// });
36-
// });
3716
const logger = createBaseLogger();
3817
logger.useDefaults();
3918
logger.setLevel(LogLevel.DEBUG);
4019

41-
logger.info('ssdaddas');
42-
4320
export class System {
4421
kvStorage: KVStorage;
4522
storage: SupabaseStorageAdapter;

demos/react-native-supabase-todolist/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"expo-splash-screen": "~0.29.22",
3636
"expo-status-bar": "~2.0.1",
3737
"lodash": "^4.17.21",
38-
"sql.js": "link:/private/tmp/sql.js",
3938
"react": "18.3.1",
4039
"react-native": "0.76.9",
4140
"react-native-encrypted-storage": "^4.0.3",

packages/common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -359,20 +359,20 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
359359
throw new Error(`The powersync extension is not loaded correctly. Details: ${e.message}`);
360360
}
361361
let versionInts: number[];
362-
// try {
363-
// versionInts = this.sdkVersion!.split(/[.\/]/)
364-
// .slice(0, 3)
365-
// .map((n) => parseInt(n));
366-
// } catch (e) {
367-
// throw new Error(
368-
// `Unsupported powersync extension version. Need >=0.3.11 <1.0.0, got: ${this.sdkVersion}. Details: ${e.message}`
369-
// );
370-
// }
371-
372-
// // Validate >=0.3.11 <1.0.0
373-
// if (versionInts[0] != 0 || versionInts[1] < 3 || (versionInts[1] == 3 && versionInts[2] < 11)) {
374-
// throw new Error(`Unsupported powersync extension version. Need >=0.3.11 <1.0.0, got: ${this.sdkVersion}`);
375-
// }
362+
try {
363+
versionInts = this.sdkVersion!.split(/[.\/]/)
364+
.slice(0, 3)
365+
.map((n) => parseInt(n));
366+
} catch (e) {
367+
throw new Error(
368+
`Unsupported powersync extension version. Need >=0.3.11 <1.0.0, got: ${this.sdkVersion}. Details: ${e.message}`
369+
);
370+
}
371+
372+
// Validate >=0.3.11 <1.0.0
373+
if (versionInts[0] != 0 || versionInts[1] < 3 || (versionInts[1] == 3 && versionInts[2] < 11)) {
374+
throw new Error(`Unsupported powersync extension version. Need >=0.3.11 <1.0.0, got: ${this.sdkVersion}`);
375+
}
376376
}
377377

378378
protected async updateHasSynced() {

packages/sqljs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@powersync/sql.js",
2+
"name": "sql.js",
33
"private": "true",
44
"version": "0.0.0",
55
"description": "API definitions for JourneyApps PowerSync",

pnpm-lock.yaml

Lines changed: 33 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)