Replace deprecated `_INTERNAL_flushLogsBuffer` with `flushLogsBuffer`

Abierto
#7,108 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
55/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react-native, typescript
Área
backend

Línea de trabajo

Start in packages/core/src/js/client.ts and inspect the three spies in packages/core/test/client.test.ts. First confirm that the required @sentry/core release exports flushLogsBuffer; then replace the old name in those locations and verify the client tests. Done means the client and test spies use the new export and the JS SDK team is told the alias is no longer used by RN.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Next Major React-Native Task

Context

@sentry/core is dropping its _INTERNAL_-prefixed exports (getsentry/sentry-javascript#26744). _INTERNAL_flushLogsBuffer is renamed to flushLogsBuffer. The old name stays as a deprecated alias for now because React Native still uses it. The alias can't be removed until we switch.

This is the only _INTERNAL_ export from @sentry/core that the RN SDK uses.

⚠️ This will be implemented in the next major.

Usages

  • packages/core/src/js/client.ts: called on the client's flush event and from the idle timer after afterCaptureLog, when enableLogs is on.
  • packages/core/test/client.test.ts: three tests use jest.spyOn(SentryCore, '_INTERNAL_flushLogsBuffer'). The export name is a string here, so the type checker won't catch it. Rename these by hand.

Tasks

  • Bump @sentry/core to a release that exports flushLogsBuffer (getsentry/sentry-javascript#26744 merged and released).
  • Replace _INTERNAL_flushLogsBuffer with flushLogsBuffer in client.ts and the test spies.
  • Tell the JS SDK team the alias is no longer used by RN, so it can be removed.

Notes

  • Users won't see any change, and no changelog entry is needed. We can make the switch as soon as the new name is released, before the next major if that's convenient. It is tracked for the next major because the JS SDK can only drop the alias after we switch.
  • Related: #6969
Lenguaje dominante
TypeScript
Estrellas
1.8k
Forks
371
Merge medio
22 h 3 min
PR fusionados (30 d)
106

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-react-native

Todos los issues de getsentry/sentry-react-native

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.