Skip to content

Commit dc22c20

Browse files
committed
Update demo to work in new workspace config
1 parent 6807713 commit dc22c20

File tree

9 files changed

+10170
-17
lines changed

9 files changed

+10170
-17
lines changed

demos/react-native-web-supabase-todolist/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ npm-debug.*
3838
.idea
3939

4040
public/@powersync
41+
android/
4142
ios/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-linker=hoisted

demos/react-native-web-supabase-todolist/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
1818
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
1919
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
20-
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/b5a3e5ad-eb77-4296-a34e-9556dd7d6e05"/>
20+
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/foo"/>
2121
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
2222
<intent-filter>
2323
<action android:name="android.intent.action.MAIN"/>
@@ -29,7 +29,6 @@
2929
<category android:name="android.intent.category.BROWSABLE"/>
3030
<data android:scheme="powersync"/>
3131
<data android:scheme="com.powersync.example"/>
32-
<data android:scheme="exp+powersync-example"/>
3332
</intent-filter>
3433
</activity>
3534
</application>

demos/react-native-web-supabase-todolist/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3535
# your application. You should enable this flag either if you want
3636
# to write custom TurboModules/Fabric components OR use libraries that
3737
# are providing them.
38-
newArchEnabled=false
38+
newArchEnabled=true
3939

4040
# Use this property to enable or disable the Hermes JS engine.
4141
# If set to false, you will be using JSC instead.

demos/react-native-web-supabase-todolist/app.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const config: ExpoConfig = {
3838
},
3939
package: 'com.powersync.example'
4040
},
41-
41+
newArchEnabled: true,
42+
jsEngine: 'hermes',
4243
web: {
4344
bundler: 'metro',
4445
output: 'single',
@@ -62,16 +63,12 @@ const config: ExpoConfig = {
6263
{
6364
ios: {
6465
deploymentTarget: '15.1',
65-
// TODO: New architecture is currently not yet supported by @journeyapps/react-native-quick-sqlite
66-
newArchEnabled: false
6766
},
6867
android: {
6968
minSdkVersion: 24,
7069
compileSdkVersion: 35,
7170
targetSdkVersion: 35,
7271
buildToolsVersion: '35.0.0',
73-
// TODO: New architecture is currently not yet supported by @journeyapps/react-native-quick-sqlite
74-
newArchEnabled: false
7572
}
7673
}
7774
],

demos/react-native-web-supabase-todolist/metro.config.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,17 @@ const path = require('node:path');
44

55
// Find the project and workspace directories
66
const projectRoot = __dirname;
7-
const workspaceRoot = path.resolve(projectRoot, '../..');
8-
97
const config = getDefaultConfig(projectRoot);
108

119
// 1. Watch all files within the monorepo
12-
config.watchFolders = [workspaceRoot];
10+
config.watchFolders = [projectRoot];
1311
// 2. Let Metro know where to resolve packages and in what order
1412
config.resolver.nodeModulesPaths = [
1513
path.resolve(projectRoot, 'node_modules'),
16-
path.resolve(workspaceRoot, 'node_modules')
1714
];
1815
// #3 - Force resolving nested modules to the folders below
19-
config.resolver.disableHierarchicalLookup = true;
20-
config.resolver.unstable_enableSymlinks = true;
16+
// config.resolver.disableHierarchicalLookup = true;
17+
// config.resolver.unstable_enableSymlinks = true;
2118

2219
// Needed to make `@powersync/web/umd` imports work
2320
config.resolver.unstable_enablePackageExports = true;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@azure/core-asynciterator-polyfill": "^1.0.2",
1414
"@expo/metro-runtime": "^4.0.1",
15-
"@expo/vector-icons": "^14.0.2",
15+
"@expo/vector-icons": "^14.0.4",
1616
"@journeyapps/react-native-quick-sqlite": "^2.4.9",
1717
"@journeyapps/wa-sqlite": "^1.3.2",
1818
"@powersync/attachments": "^2.4.1",
@@ -26,8 +26,9 @@
2626
"@supabase/supabase-js": "^2.45.4",
2727
"@tanstack/react-query": "^5.66.0",
2828
"base64-arraybuffer": "^1.0.2",
29-
"expo": "52.0.46",
29+
"expo": "~52.0.47",
3030
"expo-blur": "~14.0.3",
31+
"expo-build-properties": "~0.13.3",
3132
"expo-camera": "~16.0.18",
3233
"expo-constants": "~17.0.5",
3334
"expo-crypto": "~14.0.2",
@@ -41,14 +42,17 @@
4142
"expo-symbols": "~0.2.2",
4243
"expo-system-ui": "~4.0.8",
4344
"expo-web-browser": "~14.0.2",
45+
"lodash": "^4.17.21",
4446
"react": "18.3.1",
4547
"react-dom": "18.3.1",
4648
"react-native": "0.76.9",
4749
"react-native-elements": "^3.4.3",
4850
"react-native-gesture-handler": "~2.20.2",
51+
"react-native-helmet-async": "^2.0.4",
4952
"react-native-logs": "^5.3.0",
5053
"react-native-prompt-android": "^1.1.0",
5154
"react-native-reanimated": "~3.16.1",
55+
"react-native-reanimated-table": "^0.0.2",
5256
"react-native-safe-area-context": "4.12.0",
5357
"react-native-screens": "~4.4.0",
5458
"react-native-web": "~0.19.13",

0 commit comments

Comments
 (0)