feat/add react-native named exports for PubNub static members - #506
feat/add react-native named exports for PubNub static members#506tommaso-sebastianelli wants to merge 1 commit into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
8477f2f to
7ffa1f7
Compare
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7ffa1f7 to
d603cf7
Compare
The React Native entry point only exposed enums, retry-policy
constructors and helper utilities as static members on the default
`PubNub` class (e.g. `PubNub.LogLevel`, `PubNub.ExponentialRetryPolicy`).
Consumers using named imports (`import { LogLevel } from 'pubnub'`) had
no way to access them, forcing them to always go through the default
export.
Re-export these members as top-level named exports so they can be
imported either way:
- Enums: CATEGORIES, OPERATIONS, LogLevel
- Retry policy constructors: ExponentialRetryPolicy, LinearRetryPolicy,
NoneRetryPolicy
- Utilities: generateUUID, notificationPayload
This mirrors the static members already available on the class and keeps
the RN build consistent with how the values are surfaced elsewhere.
d603cf7 to
0ba7fbc
Compare
|
Thank you so much for taking the time and effort to put this PR together! We really appreciate your contribution to the SDK. We took a close look at the implementation. Currently, our Node and Web builds export these members as static properties. |
The React Native entry point only exposed enums, retry-policy
constructors and helper utilities as static members on the default
PubNubclass (e.g.PubNub.LogLevel,PubNub.ExponentialRetryPolicy).Consumers using named imports (
import { LogLevel } from 'pubnub') hadno way to access them, forcing them to always go through the default
export.
Re-export these members as top-level named exports so they can be
imported either way:
NoneRetryPolicy
This mirrors the static members already available on the class and keeps
the RN build consistent with how the values are surfaced elsewhere.