getsentry / getsentry/sentry-react-native

Review and clean up public API surface types

オープン
#6,094 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

React-Native Task
主要言語
TypeScript
スター
1.8k
フォーク
367
平均マージ
1日 6時間
マージ済み PR(30日)
94

説明

Context

With the addition of @microsoft/api-extractor in #6093, we now have visibility into the public API surface. The tool reports 36 ae-forgotten-export warnings — types that appear in public function signatures but are not exported from index.ts.

None of these types are documented in the Sentry docs, and no users have reported needing them. TypeScript's structural typing means consumers can pass plain object literals without importing the types explicitly.

What needs reviewing

For each type, decide whether to export it (make it part of the public API) or mark it @internal (explicitly keep it private).

Options/config types (used as integration/function parameters)
  • ReactNativeTracingOptions, ReactNativeTracingState, ReactNativeTracingIntegration
  • ReactNavigationIntegrationOptions, ReactNativeNavigationOptions
  • ReactNativeClientOptions, ReactNativeTransportOptions, BaseReactNativeOptions, ReactNativeWrapperOptions
  • ReactNativeErrorHandlersOptions, LinkedErrorsOptions, BreadcrumbsOptions
  • MobileReplayOptions, MobileReplayIntegration
  • HermesProfilingOptions
  • GraphQLReactNativeIntegrationOptions, SpotlightReactNativeIntegrationOptions, SupabaseReactNativeIntegrationOptions
  • FeedbackFormProps, FeedbackButtonProps, ScreenshotButtonProps, FeedbackFormTheme
  • TouchEventBoundaryProps
  • AppStartIntegration, defaultIdleOptions
Internal/external types (likely should stay unexported)
  • FeedbackFormState, FeedbackIntegration, GlobalErrorBoundaryState — internal component state
  • Replay, ReplayConfiguration@sentry/browser internals
  • HostComponent, ViewProps — react-native types
  • ExpoAssetInstance, ExpoImageSource, ExpoImageLoadOptions, ExpoImageRef — internal Expo types

Additional items to review

  • logger from @sentry/browser is exported publicly — is this intentional?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

index.ts の公開エクスポートと、#6093 で導入された @microsoft/api-extractor レポートから始めます。リストにある忘れられた各エクスポート型を確認し、それが公開 API に属するのか、@internal を付けるべきなのかを判断します。logger のエクスポートが意図的なものかどうかも含めます。36 件の警告すべてに明示的な解決策があり、API サーフェスがその判断を反映していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native, typescript
領域
api, mobile
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。