refactor: migrate backend to @comapeo/core-react-native + add iOS support (Expo SDK 56, New Architecture)#1994
Conversation
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
07ec4e5 to
c55afc3
Compare
|
| Status | Count |
|---|---|
| 36 | |
| 98 | |
| 2 | |
| 65 |
Click to toggle table visibility
| Name | Status | Previous | Current |
|---|---|---|---|
@0no-co/graphql.web |
1.3.2 | - | |
@babel/highlight |
7.25.9 | - | |
@babel/plugin-syntax-jsx |
7.27.1 | 7.29.7 | |
@babel/plugin-syntax-typescript |
7.27.1 | 7.29.7 | |
@babel/plugin-transform-react-jsx |
7.27.1 | 7.29.7 | |
@babel/plugin-transform-typescript |
7.27.0 | 7.29.7 | |
@babel/preset-react |
7.28.5 | - | |
@babel/preset-typescript |
7.27.0 | 7.29.7 | |
@babel/traverse--for-generate-function-map |
7.28.4 | - | |
@comapeo/core-react-native |
- | 1.0.0-pre.7 | |
@comapeo/default-categories |
- | 1.1.2 | |
@comapeo/nodejs-mobile-react-native |
18.20.4-2 | - | |
@cspotcode/source-map-support |
- | 0.8.1 | |
@expo/config-plugins |
54.0.4 | 56.0.13 | |
@expo/config-types |
54.0.10 | 56.0.7 | |
@expo/config |
12.0.13 | 56.0.12 | |
@expo/devtools |
0.1.8 | 56.0.2 | |
@expo/env |
2.0.8 | 2.4.2 | |
@expo/expo-modules-macros-plugin |
- | 0.2.2 | |
@expo/fingerprint |
0.15.5 | 0.19.8 | |
@expo/image-utils |
0.8.8 | 0.10.3 | |
@expo/inline-modules |
- | 0.0.14 | |
@expo/json-file |
10.0.14 | 10.2.0 | |
@expo/local-build-cache-provider |
- | 56.0.10 | |
@expo/metro-file-map |
- | 56.0.3 | |
@expo/metro |
54.2.0 | 56.0.0 | |
@expo/osascript |
2.7.0 | 2.7.1 | |
@expo/package-manager |
1.13.0 | 1.13.1 | |
@expo/plist |
0.4.9 | 0.7.0 | |
@expo/prebuild-config |
54.0.8 | 56.0.20 | |
@expo/require-utils |
- | 56.1.5 | |
@expo/schema-utils |
0.1.8 | 56.0.2 | |
@expo/ws-tunnel |
1.0.6 | 2.0.0 | |
@jridgewell/gen-mapping |
0.3.12 | 0.3.13 | |
@npmcli/agent |
2.2.2 | - | |
@npmcli/fs |
3.1.1 | - | |
@react-native/assets-registry |
0.81.6 | 0.85.3 | |
@react-native/community-cli-plugin |
0.81.6 | - | |
@react-native/debugger-frontend |
0.81.5 | 0.85.3 | |
@react-native/debugger-shell |
- | 0.85.3 | |
@react-native/dev-middleware |
0.81.5 | 0.85.3 | |
@react-native/gradle-plugin |
0.81.6 | 0.85.3 | |
@react-native/jest-preset |
- | 0.85.3 | |
@react-native/normalize-colors |
0.81.5 | 0.85.3 | |
@react-native/virtualized-lists |
- | 0.85.3 | |
@sentry-internal/browser-utils |
10.38.0 | - | |
@sentry-internal/feedback |
10.38.0 | - | |
@sentry-internal/replay-canvas |
10.38.0 | - | |
@sentry-internal/replay |
10.38.0 | - | |
@sentry/babel-plugin-component-annotate |
4.9.1 | 5.3.0 | |
@sentry/browser-utils |
- | 10.58.0 | |
@sentry/browser |
10.38.0 | 10.58.0 | |
@sentry/cli-darwin |
3.2.0 | 3.5.1 | |
@sentry/cli-linux-arm |
3.2.0 | 3.5.1 | |
@sentry/cli-linux-arm64 |
3.2.0 | 3.5.1 | |
@sentry/cli-linux-i686 |
3.2.0 | 3.5.1 | |
@sentry/cli-linux-x64 |
3.2.0 | 3.5.1 | |
@sentry/cli-win32-arm64 |
3.2.0 | 3.5.1 | |
@sentry/cli-win32-i686 |
3.2.0 | 3.5.1 | |
@sentry/cli-win32-x64 |
3.2.0 | 3.5.1 | |
@sentry/cli |
3.2.0 | 3.5.1 | |
@sentry/core |
10.38.0 | 10.58.0 | |
@sentry/expo-upload-sourcemaps |
- | 8.15.1 | |
@sentry/feedback |
- | 10.58.0 | |
@sentry/react-native |
8.0.0 | 8.15.1 | |
@sentry/react |
10.38.0 | 10.58.0 | |
@sentry/replay-canvas |
- | 10.58.0 | |
@sentry/replay |
- | 10.58.0 | |
@sentry/types |
10.38.0 | - | |
@tsconfig/node10 |
- | 1.0.12 | |
@tsconfig/node12 |
- | 1.0.11 | |
@tsconfig/node14 |
- | 1.0.3 | |
@tsconfig/node16 |
- | 1.0.4 | |
@urql/core |
5.2.0 | - | |
@urql/exchange-retry |
1.3.2 | - | |
abbrev |
2.0.0 | - | |
accepts |
1.3.8 | 2.0.0 | |
agent-cli-detector |
- | 0.1.2 | |
aggregate-error |
3.1.0 | - | |
any-promise |
1.3.0 | - | |
async-limiter |
1.0.1 | - | |
babel-preset-expo |
54.0.10 | 56.0.17 | |
better-opn |
3.0.2 | - | |
cacache |
18.0.4 | - | |
chownr |
2.0.0 | - | |
chromium-edge-launcher |
0.2.0 | 0.3.0 | |
clean-stack |
2.2.0 | - | |
create-require |
- | 1.1.1 | |
define-lazy-prop |
2.0.0 | - | |
dnssd-advertise |
- | 1.1.6 | |
encoding |
0.1.13 | - | |
env-editor |
0.4.2 | - | |
env-paths |
2.2.1 | - | |
err-code |
2.0.3 | - | |
expo-application |
7.0.8 | 56.0.3 | |
expo-asset |
12.0.13 | 56.0.17 | |
expo-audio |
1.1.1 | 56.0.12 | |
expo-build-properties |
1.0.10 | 56.0.19 | |
expo-constants |
18.0.13 | 56.0.21 | |
expo-crypto |
15.0.9 | 56.0.4 | |
expo-device |
8.0.10 | 56.0.4 | |
expo-document-picker |
14.0.8 | 56.0.4 | |
expo-file-system |
19.0.23 | 56.0.8 | |
expo-font |
14.0.12 | 56.0.7 | |
expo-image-loader |
6.0.0 | 56.0.3 | |
expo-image-manipulator |
14.0.8 | 56.0.19 | |
expo-image |
3.0.11 | 56.0.11 | |
expo-keep-awake |
15.0.8 | 56.0.3 | |
expo-linking |
8.0.12 | 56.0.14 | |
expo-localization |
17.0.9 | 56.0.6 | |
expo-location |
19.0.8 | 56.0.18 | |
expo-modules-autolinking |
3.0.26 | 56.0.20 | |
expo-modules-core |
3.0.30 | - | |
expo-modules-jsi |
- | 56.0.12 | |
expo-secure-store |
15.0.8 | 56.0.4 | |
expo-sensors |
15.0.8 | 56.0.6 | |
expo-server |
1.0.7 | 56.0.5 | |
expo-splash-screen |
31.0.13 | 56.0.10 | |
expo-system-ui |
6.0.9 | 56.0.5 | |
expo-task-manager |
14.0.9 | 56.0.19 | |
expo |
54.0.35 | 56.0.12 | |
fb-dotslash |
- | 0.5.8 | |
fetch-nodeshim |
- | 0.4.10 | |
freeport-async |
2.0.0 | - | |
fs-minipass |
3.0.3 | - | |
glob |
10.4.5 | 10.5.0 | |
hermes-compiler |
- | 250829098.0.10 | |
is-lambda |
1.0.1 | - | |
jest-expo |
54.0.17 | 56.0.5 | |
make-error |
- | 1.3.6 | |
make-fetch-happen |
13.0.1 | - | |
metro-babel-transformer |
0.83.3 | 0.84.4 | |
metro-cache-key |
0.83.3 | 0.84.4 | |
metro-cache |
0.83.3 | 0.84.4 | |
metro-core |
0.83.3 | 0.84.4 | |
metro-file-map |
0.83.3 | 0.84.4 | |
metro-minify-terser |
0.83.3 | 0.84.4 | |
metro-resolver |
0.83.3 | 0.84.4 | |
metro-source-map |
0.83.3 | 0.84.4 | |
metro-symbolicate |
0.83.3 | 0.84.4 | |
metro-transform-plugins |
0.83.3 | 0.84.4 | |
metro-transform-worker |
0.83.3 | 0.84.4 | |
metro |
0.83.7 | 0.84.2 | |
minipass-collect |
2.0.1 | - | |
minipass-fetch |
3.0.5 | - | |
minipass-flush |
1.0.5 | - | |
minipass-pipeline |
1.2.4 | - | |
minipass-sized |
1.0.3 | - | |
minizlib |
2.1.2 | - | |
mkdirp |
0.5.6 | - | |
multitars |
- | 1.0.0 | |
mz |
2.7.0 | - | |
nanoid |
3.3.11 | 3.3.16 | |
ncp |
2.0.0 | - | |
nested-error-stacks |
2.0.1 | - | |
node-gyp-build-mobile |
4.6.0-2 | - | |
nodejs-mobile-gyp |
0.4.0 | - | |
nopt |
7.2.1 | - | |
ob1 |
0.83.3 | 0.84.4 | |
p-map |
4.0.0 | - | |
postcss |
8.4.49 | 8.5.19 | |
pretty-bytes |
5.6.0 | - | |
proc-log |
3.0.0 | - | |
promise-retry |
2.0.1 | - | |
qrcode-terminal |
0.11.0 | - | |
react-native-is-edge-to-edge |
1.1.7 | 1.3.1 | |
react-native-nitro-modules |
0.35.4 | 0.35.9 | |
react-native-reanimated |
3.19.5 | 4.5.0 | |
react-native-restart |
0.0.27 | 0.0.28 | |
react-native-safe-area-context |
5.8.0 | 5.7.0 | |
react-native-screens |
4.24.0 | 4.25.2 | |
react-native-svg |
15.15.5 | 15.15.4 | |
react-native-worklets |
- | 0.10.0 | |
react-native |
0.81.6 | 0.85.3 | |
react-test-renderer |
- | 19.2.3 | |
react |
19.1.4 | 19.2.3 | |
requireg |
0.2.2 | - | |
resolve-global |
1.0.0 | - | |
resolve-workspace-root |
2.0.0 | 2.0.1 | |
retry |
0.12.0 | - | |
rimraf |
3.0.2 | - | |
scheduler |
0.26.0 | 0.27.0 | |
sf-symbols-typescript |
2.1.0 | 2.2.0 | |
ssri |
10.0.6 | - | |
sucrase |
3.35.1 | - | |
tar |
6.2.1 | - | |
temp-dir |
2.0.0 | - | |
terser |
5.44.0 | 5.49.0 | |
thenify-all |
1.6.0 | - | |
thenify |
3.3.1 | - | |
toqr |
- | 0.1.1 | |
ts-interface-checker |
0.1.13 | - | |
ts-node |
- | 10.9.2 | |
unimodules-app-loader |
6.0.8 | 56.0.1 | |
unique-filename |
3.0.0 | - | |
unique-slug |
4.0.0 | - | |
v8-compile-cache-lib |
- | 3.0.1 | |
whatwg-url-minimum |
- | 0.1.2 | |
wonka |
6.3.6 | - | |
yn |
- | 3.1.1 | |
zod |
3.25.75 | 3.25.76 |
Replace the embedded nodejs-mobile backend (rolled-up @comapeo/core server) with the @comapeo/core-react-native native module, and upgrade to Expo SDK 56 / React Native 0.85 / new architecture, which the new module requires.
Add iOS Info.plist entries for local-network sync discovery and the encryption-exempt flag, plus iOS device-build docs and the iOS e2e (wdio) config.
Bump react 19.2.3->19.2.7 and @react-navigation/native 7.2.4->7.3.4 to satisfy peer ranges (react-dom, @react-navigation/elements), drop the blanket legacy-peer-deps=true, and remove the orphaned react-native-indicators patch.
c55afc3 to
cc0924d
Compare
We continuously update the observation location if the accuracy increases, and we check whether the user might have moved away while recording the observation by checking if the location moves by more than 1.5x the initial position accuracy. This previous behaviour is not ideal when taking observations in a moving vehicle or boat. It means that invariably observations will be 1.5x the initial position accuracy away from their actual location. This commit checks the device speed in the position update, and discards the position if the device is moving at more than 3 m/s. The value was chosen as "faster than walking, but slower than most transport", and could be refined if needed. Co-authored-by: ErikSin <67773827+ErikSin@users.noreply.github.com>
* Adds a refetch on window focus for storage in case it is updated. Adds the app state listener at the base of the app so that it works. * Removes default because not needed
…1935) startRecording awaits prepareToRecordAsync before calling record(). If the recording screen is left during that await (e.g. starting then leaving in quick succession), expo-audio's useReleasingSharedObject releases the recorder's native object on unmount, and the subsequent record() call hits a released shared object and crashes. Skip record() when the hook has been torn down during the await. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: do not add the observation location to track Previously, when the user saves an observation, we would add the observation location to the track. The observation location is from the moment the user first adds the observation, so if the user is moving, by the time they save the observation, the track has advanced to the new location, and adding the observation location makes the track "loop back". This is more of a problem the faster the user is moving. The only reason I am aware of for adding the observation location to the track is so that the track and observation spatially/visually coinincide. Without this code there is a chance that an observation taken during a track will not appear exactly on the track. I think this is fine, and it's not very easy to "force" the observation to appear on the track, without creating artifacts like these track loops. This commit removes the code that adds the observation location to the track when you save the observation * chore: remove unused type --------- Co-authored-by: ErikSin <67773827+ErikSin@users.noreply.github.com>
…es (#1985) * Adds a connection lost title and message for download fails. * Messages.
* Enables sentry replay on QA builds on error only. * Removes optional replay which is default to 0 * Replays all sessions for QA in sentry. * Prettier updating file.
* Adds a QA device name screen. Adds a store for it. Sends the name to Sentry. Adds a context test. * Tweaks to QA screen app screens and where logic sits for sending tag to Sentry. Adds an integration test. Removes unneeded provider. * Messages * No back button on initial screen. Use name in settings. Pass key. * Trying again for no back button. * Trying again for no back button. No QA name in app screens so it does not rerender when saving from the gate at the outset. * Removes header shown. Removes extra screen. * Trying new screen name for app screens. Adding margin top when not on app screen. * Increases top margin. * Adjusts tests. * Tries to remove navigator key. * Modifies the test for opening screen. * Changes set qa device name to a component used outside of the navigator. Breaks it down so the settings piece can still access navigation. * UPdates styles to account for being outside of navigator. * Removes unnecessary prop. * Simplifies store setting for qa name. Exports app variant as qa device. Expands comment. Fixes test. * Fixes keyboard avoiding behavior. * Uses exported variable. Adds keyboard avoiding view with padding just to edit screen. * Removes callback and subscriber for setting the tag in sentry. Sets the tag within the Context file.
* Updates prettier. Bumps minor and patch versions in frontend and backend dev dependencies. Changes order of desription and message in messages. Adds params to querykey. * Updates all easy minor updates. * Teeny bump in expo. * Update pevent and test that uses it. * Updates lint staged. * Updates type fest. * Updates typescript. * Reverts typescript so ci will pass. * Updates expo packages per expo doctor. * Updates expo linking
* Bumps core and core react for export flattening. * Updates E2e tests for adding a qa name. * adds scroll to early access to E2E tests
…1938) navigation.replace only swapped the top screen, leaving YourTeam and CollaboratorInfo mounted with active queries scoped to the left project. Refetching those queries always fails because leaving closes the project's non-auth data stores (Sentry COMAPEO-1TK, COMAPEO-223, COMAPEO-20E). Also set the new active project before navigating so the remounted Home targets the default project. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: ErikSin <67773827+ErikSin@users.noreply.github.com>
The device-diagnostics report (`device diagnostics v1`) carries no app identifier, unlike the app-diagnostics report which already sends `appId`/`appName`. As a result the device-hardware telemetry cannot be filtered by release channel, so hardware stats (brand, model, screen, memory, CPU arch) mix production installs with RC/dev/QA builds and emulators. On the analytics side ~half of all app-diagnostics rows are non-production, and device diagnostics currently has no way to exclude that traffic at all. Add `appId` (from `expo-application`'s `Application.applicationId`, the same source app diagnostics uses) so downstream queries can scope device-hardware metrics to `com.comapeo`. The field is optional and set via `setIfNotNull`, mirroring the app-diagnostics implementation; older clients simply omit it.
* Updates prettier. Bumps minor and patch versions in frontend and backend dev dependencies. Changes order of desription and message in messages. Adds params to querykey. * Updates all easy minor updates. * Teeny bump in expo. * Update pevent and test that uses it. * Updates lint staged. * Updates type fest. * Updates typescript. * Reverts typescript so ci will pass. * Updates expo packages per expo doctor. * Updates expo linking * Adds patch package to use eslint 10. Turns off unnecessary rules. Fixes setstate naming style. Updates eslint related dev dependencies. * Follows two new rules as best as possible. Fixes implementation. Disables rules in specific files where the disable is needed. * Updates package lock. * Rmoves eslint plugin react native because it doesn't support the current version of eslint. Update the rules accordingly. Replace one of the rules with a custom file. Remove references to rule that we no longer have access to. * Adds mapeo crypto as a dev dependency. * Restores base branch package lock and reinstalled from there to fix hoisting of require addon.
* Updates prettier. Bumps minor and patch versions in frontend and backend dev dependencies. Changes order of desription and message in messages. Adds params to querykey. * Updates all easy minor updates. * Teeny bump in expo. * Update pevent and test that uses it. * Updates lint staged. * Updates type fest. * Updates typescript. * Reverts typescript so ci will pass. * Updates expo packages per expo doctor. * Updates expo linking * Adds patch package to use eslint 10. Turns off unnecessary rules. Fixes setstate naming style. Updates eslint related dev dependencies. * Follows two new rules as best as possible. Fixes implementation. Disables rules in specific files where the disable is needed. * Updates package lock. * Rmoves eslint plugin react native because it doesn't support the current version of eslint. Update the rules accordingly. Replace one of the rules with a custom file. Remove references to rule that we no longer have access to. * Adds mapeo crypto as a dev dependency. * Restores base branch package lock and reinstalled from there to fix hoisting of require addon. * Adds await where needed for api. New eslint ignore. * Adds async awaits as needed for new API for test library 14. * Fixes tests and linting. * Removes unneeded react test renderer.
Co-Authored-By: ErikSin <67773827+ErikSin@users.noreply.github.com>
Summary
Replaces the app's hand-rolled embedded Node backend (
src/backend/+ the nodejs-mobile build pipeline) with the@comapeo/core-react-nativenative module (^1.0.0-pre.7), upgrades the app to Expo SDK 56 / React Native 0.85 / React 19 on the New Architecture, and brings the app up on iOS for the first time. Removes ~13k lines of backend/build/patch code.FYI: The update the new architecture required switching out
react-native-indicatorswith the RN nativeActivityIndicator, and those changes make up a significant portion of the changes in this PR, all in commit 07ec4e5. This could be moved to a separate PR to reduce the review surface here.Motivation
The previous setup bundled and built the backend in-tree (
build-backend.mjs,download-prebuilds.mjs, a rollup pipeline, and severalpatch-packagepatches), which was Android-only and heavy to maintain.@comapeo/core-react-nativeships the backend as a managed native module (Android dual-process foreground service; in-process on iOS) and unlocks iOS support. The expo update is required to support@comapeo/core-react-nativeand brings with it a requirement to update to the New Architecture.Key changes
Backend → module
@comapeo/core-react-native@^1.0.0-pre.7; wire the app to itscomapeoRPC client,
statelifecycle, andcomapeoServicesClient.mapServer.src/backend/,scripts/build-backend.mjs,scripts/download-prebuilds.mjs,@comapeo/nodejs-mobile-react-native, and the associated backend patches.ServerLoading/App.tsxnow react to the module'sstateinstead of theold socket/RPC bootstrapping (
initializeNodejs,MessagePortLike,ServerStateStore,createAppRpc,createMapeoApiremoved).Platform / deps
react-native-reanimated3 → 4 (pulls in the newreact-native-workletsdependency);
@sentry/react-native→ 8.15,metro→ 0.84. TypeScript staysat 5.9.3 (6.0 flagged ~36 spurious side-effect-import errors on untouched
files; not worth bundling that churn into this PR).
(
patches/@maplibre+maplibre-react-native+10.4.2.patch): patches the AndroidEventEmitterto stop usingReactNativeHost(forbidden on new arch) and theAnimatedPointJS to stop clobbering RN 0.85's_listenersMap..npmrcsetslegacy-peer-deps=true, andpackage.jsonaddsexpo.install.excludefor@sentry/react-native, to hold the ecosystem atthese versions through the upgrade.
metro.config.jsdrops the nodejs-mobileblockListentries andunstable_enablePackageExports(now the Metro default).Module configuration (in
app.config.js, moved out ofapp.jsonto read env)defaultConfig— bundles@comapeo/default-categoriesso new projects get default presets.defaultOnlineStyleUrl— Mapboxoutdoors-v11whenMAPBOX_ACCESS_TOKENis set, else MapLibre demo tiles.sentry— DSN/environment(qa/production/development)/tracesSampleRatebaked perAPP_VARIANT.Sentry
Sentry.initto the module'sinitSentry(
@comapeo/core-react-native/sentry), which unifies the RN, Node-backend, andAndroid-FGS hubs under one release/environment.
scripts/upload-backend-sourcemaps.sh(neweas-build-on-successhook beforeupload-release.sh) uploads the embedded Node backend bundle's sourcemaps sobackend stack traces symbolicate; the host app's own JS/native symbols are
still handled by the
@sentry/react-nativeplugin.iOS bring-up & fixes
PermissionsAndroid); fixthe GPS pill, which treated the Android-only
gpsAvailableas required.requestForegroundPermissionsAsynccalls left
LocationProviderblocked; made its query read-only + made splashdismissal robust on app-active).
$typefilter →geometry-type).wdio.ios.config.jsfor the iOS e2e runner.Android
expo-config-plugins/mergeBackupRules.js— resolve a manifest-merge conflictwith
expo-secure-store(the module's plugin does not own backup rules, sothis stays app-side).
Docs
docs/iOSDeviceBuilds.md— build/install a standalone Release build on a physical iPhone.E2E_IOS_ROADMAP.md— audit + roadmap for migrating the e2e suites to iOS.Platforms
Known gaps / follow-ups
getSentryUserIdis now dead code —@comapeo/core-react-nativeneeds to update to handle this before we release.E2E_IOS_ROADMAP.md(authored Android-only; selector/keyboard/
driver.back()/a11y work outstanding).model migrates later with an updated core (the app's per-month rotating
user.idis currently dropped, as
initSentrylocksuser.id).