v11 is a breaking API rework (renamed components, restructured props, event payloads on nativeEvent) and requires React Native's new architecture. Doing it as a manual migration instead of taking dependabot's #268 because the renames need code changes. Changes in apps/mobile: - RouteMap.tsx — switch to named imports; rename MapView→Map, ShapeSource→GeoJSONSource (with shape→data), LineLayer→Layer (with type="line" and paint instead of style), MarkerView→ ViewAnnotation (with coordinate→lngLat); Camera uses initialViewState with bounds as [w,s,e,n] and a separate padding object; onLongPress reads lngLat from event.nativeEvent. - app.config.ts — set `newArchEnabled: true`. MapLibre RN v11 supports only the new architecture, so Fabric/TurboModules must be on for the Expo prebuild. Cast the config type since Expo SDK 55's ExpoConfig typings don't yet include the field (the runtime does). - package.json — `^10.4.2` → `^11.0.0`. Supersedes dependabot #268; it'll auto-close once this merges. Runtime verification requires an EAS dev build (native deps changed + new arch flipped). JS-only surface typechecks + lints + unit tests clean locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58 lines
1.4 KiB
TypeScript
58 lines
1.4 KiB
TypeScript
import { ExpoConfig, ConfigContext } from "expo/config";
|
|
|
|
// `newArchEnabled` isn't in the Expo SDK 55 typings yet but is an
|
|
// accepted runtime flag. MapLibre RN v11 requires the new architecture.
|
|
type ExpoConfigWithNewArch = ExpoConfig & { newArchEnabled?: boolean };
|
|
|
|
export default ({ config }: ConfigContext): ExpoConfigWithNewArch => ({
|
|
...config,
|
|
name: "trails.cool",
|
|
slug: "mobile",
|
|
version: "0.0.1",
|
|
scheme: "trailscool",
|
|
newArchEnabled: true,
|
|
orientation: "portrait",
|
|
icon: "./assets/icon.png",
|
|
userInterfaceStyle: "light",
|
|
splash: {
|
|
image: "./assets/splash-icon.png",
|
|
resizeMode: "contain",
|
|
backgroundColor: "#ffffff",
|
|
},
|
|
ios: {
|
|
supportsTablet: true,
|
|
bundleIdentifier: "cool.trails.app",
|
|
infoPlist: {
|
|
NSAppTransportSecurity: {
|
|
NSAllowsLocalNetworking: true,
|
|
},
|
|
ITSAppUsesNonExemptEncryption: false,
|
|
},
|
|
},
|
|
android: {
|
|
adaptiveIcon: {
|
|
foregroundImage: "./assets/adaptive-icon.png",
|
|
backgroundColor: "#ffffff",
|
|
},
|
|
package: "cool.trails.app",
|
|
},
|
|
web: {
|
|
favicon: "./assets/favicon.png",
|
|
},
|
|
plugins: [
|
|
"expo-router",
|
|
"expo-secure-store",
|
|
"expo-web-browser",
|
|
"@maplibre/maplibre-react-native",
|
|
["@sentry/react-native", {
|
|
organization: "trails-qq",
|
|
project: "mobile",
|
|
}],
|
|
"expo-sqlite",
|
|
],
|
|
extra: {
|
|
eas: {
|
|
projectId: "93c75cae-fecf-4ce5-8cd8-c823760b12e2",
|
|
},
|
|
},
|
|
});
|