fix: respect EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE in native diff and default unset APP_VARIANT to development

- useNativeReviewDiffHighlighting: resolve engine from EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE
  via the shared resolveReviewHighlighterEnginePreference helper instead of hardcoding 'native'
- app.config.ts: default to 'development' when APP_VARIANT is unset so local dev scripts
  (dev, start) get cleartext HTTP and dev bundle IDs; EAS profiles are unaffected since they
  always set APP_VARIANT explicitly
This commit is contained in:
Cursor Agent committed 2026-05-20 11:28:25 +00:00
1 parent 6b48288f77
commit 7294763bfe
2 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ function resolveAppVariant(value: string | undefined): AppVariant {
case "production":
return value;
default:
return "production";
return "development";
}
}
@@ -7,6 +7,12 @@ import {
} from "../diffs/nativeReviewDiffHighlighter";
import type { NativeReviewDiffRow } from "../diffs/nativeReviewDiffSurface";
import type { NativeReviewDiffFile } from "../diffs/nativeReviewDiffTypes";
import { resolveReviewHighlighterEnginePreference } from "./reviewHighlighterEngine";
const CONFIGURED_ENGINE: NativeReviewDiffHighlightEngine = resolveReviewHighlighterEnginePreference(
process.env.EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE ??
(process.env.NODE_ENV === "test" ? "javascript" : "native"),
);
interface NativeReviewVisibleRange {
readonly firstRowIndex: number;
@@ -68,7 +74,7 @@ export function useNativeReviewDiffHighlighting(input: {
const abortController = new AbortController();
const requestRange = visibleRangeRef.current;
const engine: NativeReviewDiffHighlightEngine = "native";
const engine: NativeReviewDiffHighlightEngine = CONFIGURED_ENGINE;
void (async () => {
try {