Skip to content

Commit

Permalink
WIP: Fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mugikhan committed Oct 4, 2024
1 parent 1b40f38 commit 7ae4111
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 43 deletions.
30 changes: 18 additions & 12 deletions demos/react-native-supabase-todolist/library/powersync/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { AppConfig } from '../supabase/AppConfig';
import { SupabaseConnector } from '../supabase/SupabaseConnector';
import { AppSchema } from './AppSchema';
import { PhotoAttachmentQueue } from './PhotoAttachmentQueue';
import { OPSqliteOpenFactory } from '@powersync/op-sqlite';

Logger.useDefaults();

Expand All @@ -26,21 +25,28 @@ export class System {
this.kvStorage = new KVStorage();
this.supabaseConnector = new SupabaseConnector(this);
this.storage = this.supabaseConnector.storage;
const factory = new OPSqliteOpenFactory({
dbFilename: 'powersync.db'
this.powersync = new PowerSyncDatabase({
schema: AppSchema,
database: {
dbFilename: 'sqlite.db'
}
});
this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });
/**
* The snippet below uses React Native Quick SQLite as the default database adapter.
* You will have to uninstall `@op-engineering/op-sqlite` and
* install `@journeyapps/react-native-quick-sqlite` to use this.
* The snippet below uses OP-SQLite as the default database adapter.
* You will have to uninstall `@journeyapps/react-native-quick-sqlite` and
* install both `@powersync/op-sqlite` and `@op-engineering/op-sqlite` to use this.
*
* import { OPSqliteOpenFactory } from '@powersync/op-sqlite'; // Add this import
*
* const factory = new OPSqliteOpenFactory({
* dbFilename: 'sqlite.db'
* });
* this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });
*/
// this.powersync = new PowerSyncDatabase({
// schema: AppSchema,
// database: {
// dbFilename: 'sqlite.db'
// }
// const factory = new OPSqliteOpenFactory({
// dbFilename: 'sqlite.db'
// });
// this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });

if (AppConfig.supabaseBucket) {
this.attachmentQueue = new PhotoAttachmentQueue({
Expand Down
3 changes: 1 addition & 2 deletions demos/react-native-supabase-todolist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@expo/vector-icons": "^14.0.3",
"@op-engineering/op-sqlite": "8.0.3",
"@journeyapps/react-native-quick-sqlite": "^1.4.0",
"@powersync/attachments": "workspace:*",
"@powersync/common": "workspace:*",
"@powersync/op-sqlite": "workspace:*",
"@powersync/react": "workspace:*",
"@powersync/react-native": "workspace:*",
"@react-native-community/masked-view": "^0.1.11",
Expand Down
1 change: 0 additions & 1 deletion packages/powersync-op-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"react-native": "0.75.3"
},
"devDependencies": {
"@op-engineering/op-sqlite": "8.0.3",
"@react-native/eslint-config": "^0.73.1",
"@types/async-lock": "^1.4.0",
"@types/react": "^18.2.44",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://docs.powersync.com/",
"peerDependencies": {
"@journeyapps/react-native-quick-sqlite": "^1.3.0",
"@journeyapps/react-native-quick-sqlite": "^1.4.0",
"@powersync/common": "workspace:^1.18.1",
"react": "*",
"react-native": "*"
Expand All @@ -45,7 +45,7 @@
},
"devDependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",
"@journeyapps/react-native-quick-sqlite": "^1.3.0",
"@journeyapps/react-native-quick-sqlite": "^1.4.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-inject": "^5.0.5",
Expand Down
49 changes: 23 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ae4111

Please sign in to comment.