refactor(remote-config)!: migrate to TypeScript#8972
Open
russellwheatley wants to merge 38 commits intomainfrom
Open
refactor(remote-config)!: migrate to TypeScript#8972russellwheatley wants to merge 38 commits intomainfrom
russellwheatley wants to merge 38 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
…at still have methods (such as StorageReference) and fire console warning incorrectly
…ce to match firebase-js-sdk
…e a chance to update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Breaking Changes
breaking: the primary modular remote-config types now use Firebase JS SDK names:
LogLevel,FetchStatus,Value, andRemoteConfigSettings. types/remote-config.ts#L21-L37breaking:
RemoteConfig.settingsis now typed asRemoteConfigSettings, which usesfetchTimeoutMillisrather than the older RNFB-stylefetchTimeMillison the modular surface. types/remote-config.ts#L34-L37 types/remote-config.ts#L55-L63breaking: modular
getAll()andgetValue()now return SDK-aligned types:Record<string, Value>andValue. modular.ts#L91-L123breaking: modular
setLogLevel()now matches the Firebase JS SDK signature and returnsvoid. modular.ts#L126-L133breaking: the legacy modular helper exports
fetchTimeMillis(),settings(), andlastFetchStatus()have been removed from@react-native-firebase/remote-config. Modular callers should readremoteConfig.fetchTimeMillis,remoteConfig.settings, andremoteConfig.lastFetchStatusfrom theRemoteConfiginstance instead. types/remote-config.ts#L55-L63breaking: modular
fetch()has been removed. Modular callers should usefetchConfig(remoteConfig)instead; the RNFB-only modularexpirationDurationSecondshelper is no longer part of the public modular API. modular.ts#L81-L86breaking: modular
setConfigSettings()andsetDefaults()have been removed. Modular callers should useremoteConfig.settings = ...andremoteConfig.defaultConfig = ...on theRemoteConfiginstance instead. types/remote-config.ts#L55-L63breaking: modular
onConfigUpdated()has been removed. Modular callers should useonConfigUpdate(remoteConfig, observer)instead. modular.ts#L165-L174 types/remote-config.ts#L39-L49breaking: 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
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter