Skip to content

Commit b8dea39

Browse files
author
Amine
committed
refactor: migrate to using @powersync/common for shared functionality across the react-native-web demo
1 parent 20bb3a3 commit b8dea39

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

demos/react-native-web-supabase-todolist/app/views/todos/edit/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ATTACHMENT_TABLE, AttachmentRecord } from '@powersync/react-native';
1+
import { ATTACHMENT_TABLE, AttachmentRecord } from '@powersync/common';
22
import { usePowerSync, useQuery } from '@powersync/react';
33
import { CameraCapturedPicture } from 'expo-camera';
44
import _ from 'lodash';

demos/react-native-web-supabase-todolist/library/powersync/AppSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { column, Schema, Table, AttachmentTable } from '@powersync/react-native';
1+
import { column, Schema, Table, AttachmentTable } from '@powersync/common';
22

33
export const LIST_TABLE = 'lists';
44
export const TODO_TABLE = 'todos';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import '@azure/core-asynciterator-polyfill';
22

33
import React from 'react';
4-
import { AttachmentQueue, LogLevel, PowerSyncDatabase as PowerSyncDatabaseNative, AbstractPowerSyncDatabase, createBaseLogger, ExpoFileSystemAdapter, WatchedAttachmentItem } from '@powersync/react-native';
4+
import { PowerSyncDatabase as PowerSyncDatabaseNative, AbstractPowerSyncDatabase, ExpoFileSystemAdapter } from '@powersync/react-native';
55
import { PowerSyncDatabase as PowerSyncDatabaseWeb, WASQLiteOpenFactory, IndexDBFileSystemStorageAdapter } from '@powersync/web';
6-
import { type AttachmentRecord } from '@powersync/common';
6+
import { type AttachmentRecord, AttachmentQueue, LogLevel, createBaseLogger, WatchedAttachmentItem } from '@powersync/common';
77
import { SupabaseRemoteStorageAdapter } from '../storage/SupabaseRemoteStorageAdapter';
88
import { ExpoKVStorage, WebKVStorage } from '../storage/KVStorage';
99
import { AppConfig } from '../supabase/AppConfig';

demos/react-native-web-supabase-todolist/library/storage/SupabaseRemoteStorageAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SupabaseClient } from '@supabase/supabase-js';
2-
import { AttachmentRecord, RemoteStorageAdapter } from '@powersync/react-native';
2+
import { type AttachmentRecord, RemoteStorageAdapter } from '@powersync/common';
33

44
export interface SupabaseRemoteStorageAdapterOptions {
55
client: SupabaseClient;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@powersync/react": "workspace:*",
2020
"@powersync/react-native": "workspace:*",
2121
"@powersync/web": "workspace:*",
22+
"@powersync/common": "workspace:*",
2223
"@react-native-async-storage/async-storage": "1.23.1",
2324
"@react-navigation/bottom-tabs": "^7.2.0",
2425
"@react-navigation/drawer": "^7.1.1",

packages/attachments/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# @powersync/attachments
22

3+
> [!WARNING]
4+
> This package is deprecated in favor of using the built in attachments functionality in each web, node and react-native SDKs. For more information [see the documentation](https://docs.powersync.com/usage/use-case-examples/attachments-files)
5+
36
A [PowerSync](https://powersync.com) library to manage attachments in React Native and JavaScript/TypeScript apps.
47

58
## Installation

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)