Skip to content

Expo Router ErrorBoundary auto wrapped - #6347

Merged
alwx merged 8 commits into
mainfrom
feat/auto-wrap-expo-router-error-boundary
Jun 26, 2026
Merged

Expo Router ErrorBoundary auto wrapped#6347
alwx merged 8 commits into
mainfrom
feat/auto-wrap-expo-router-error-boundary

fix(core): Clone reused specifier nodes; lock in 'use client' preserv…

aa389da
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Jun 26, 2026 in 0s

1 issue

find-bugs: Found 1 issue (1 low)

Low

Plugin transforms `export type { ErrorBoundary }` type-only re-exports into value exports - `samples/expo/metro.config.js:14`

In sentryExpoRouterAutoWrapBabelPlugin.ts, the ExportNamedDeclaration visitor guard only checks !node.source || node.source.value !== EXPO_ROUTER_PACKAGE and never inspects node.exportKind (or the per-specifier exportKind). As a result a TypeScript type-only re-export export type { ErrorBoundary } from 'expo-router' is silently rewritten into a value const declaration plus a value export, changing its semantics from a type-only re-export to a runtime value export. Fix: add || node.exportKind === 'type' to the early-return guard (and optionally skip per-specifier exportKind === 'type').


⏱ 13m 53s · 1.3M in / 137.4k out · $3.46