Skip to content

refactor(remote-config)!: migrate to TypeScript#8972

Open
russellwheatley wants to merge 38 commits intomainfrom
remote-config-ts
Open

refactor(remote-config)!: migrate to TypeScript#8972
russellwheatley wants to merge 38 commits intomainfrom
remote-config-ts

Conversation

@russellwheatley
Copy link
Copy Markdown
Member

@russellwheatley russellwheatley commented Apr 13, 2026

Description

Breaking Changes

  • breaking: the primary modular remote-config types now use Firebase JS SDK names: LogLevel, FetchStatus, Value, and RemoteConfigSettings. types/remote-config.ts#L21-L37

  • breaking: RemoteConfig.settings is now typed as RemoteConfigSettings, which uses fetchTimeoutMillis rather than the older RNFB-style fetchTimeMillis on the modular surface. types/remote-config.ts#L34-L37 types/remote-config.ts#L55-L63

  • breaking: modular getAll() and getValue() now return SDK-aligned types: Record<string, Value> and Value. modular.ts#L91-L123

  • breaking: modular setLogLevel() now matches the Firebase JS SDK signature and returns void. modular.ts#L126-L133

  • breaking: the legacy modular helper exports fetchTimeMillis(), settings(), and lastFetchStatus() have been removed from @react-native-firebase/remote-config. Modular callers should read remoteConfig.fetchTimeMillis, remoteConfig.settings, and remoteConfig.lastFetchStatus from the RemoteConfig instance instead. types/remote-config.ts#L55-L63

  • breaking: modular fetch() has been removed. Modular callers should use fetchConfig(remoteConfig) instead; the RNFB-only modular expirationDurationSeconds helper is no longer part of the public modular API. modular.ts#L81-L86

  • breaking: modular setConfigSettings() and setDefaults() have been removed. Modular callers should use remoteConfig.settings = ... and remoteConfig.defaultConfig = ... on the RemoteConfig instance instead. types/remote-config.ts#L55-L63

  • breaking: modular onConfigUpdated() has been removed. Modular callers should use onConfigUpdate(remoteConfig, observer) instead. modular.ts#L165-L174 types/remote-config.ts#L39-L49

  • breaking: deprecated RemoteConfigValue.value and .source getters have been removed. Callers should use asString() and getSource() instead. 69ffd4c

  • breaking - Remove LastFetchStatus, ValueSource, ConfigSettings, ConfigDefaults, ConfigValue, ConfigValues, LastFetchStatusType, and RemoteConfigLogLevel from modular exports f22f19b

Related issues

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@russellwheatley russellwheatley changed the title refactor(remote-config): add typescript package scaffolding refactor(remote-config): migrate to TypeScript Apr 13, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-firebase Error Error Apr 17, 2026 11:12am

Request Review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Remote Config package to use TypeScript and aligns its structure with the modular API of the Firebase JS SDK. Key changes include the introduction of comprehensive type definitions for internal, namespaced, and modular APIs, the implementation of modular API functions, and the adoption of react-native-builder-bob for the build process. Feedback was provided regarding the reset method implementation on iOS, suggesting a cleaner way to resolve the promise.

Comment thread packages/remote-config/lib/namespaced.ts Outdated
@russellwheatley russellwheatley changed the title refactor(remote-config): migrate to TypeScript refactor(remote-config)!: migrate to TypeScript Apr 14, 2026
…at still have methods (such as StorageReference) and fire console warning incorrectly
@russellwheatley russellwheatley marked this pull request as ready for review April 17, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant