Skip to content

React Native DiagnosticEvent.level omits native debug emissions #471

Description

@kivtxs

The React Native v0.27.0 declaration DiagnosticEvent.level accepts info | warn | error, but native managers emit debug.

Evidence at tag v0.27.0:

  • bindings/react-native/src/types.ts: DiagnosticEvent.level omits debug.
  • bindings/react-native/android/src/main/java/com/offlineprotocol/WifiDirectManager.kt: emitDiagnostic("debug", ...) at lines 571 and 888.
  • bindings/react-native/android/src/main/java/com/offlineprotocol/NostrManager.kt: multiple debug emissions beginning at line 646.

This was found while validating generated documentation against the released package. The docs now disclose the runtime value without silently changing the released declaration.

Suggested fix: align the public diagnostic level type with native emissions and add a meaningful cross-binding contract check. Before a public SDK PR, validate all affected bindings and explain the effect on deployed consumers. Widening the union reflects existing runtime behavior, but can require changes to exhaustive switches or maps in consumers; it should not be described as automatically source-compatible.

No SDK implementation was changed by the documentation refresh.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions