Skip to content

fix: fix flush policies reference copy, add BackgroundPolicy #838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2023

Conversation

oscb
Copy link
Contributor

@oscb oscb commented May 24, 2023

  • Fixes the behaviour of flushPolicies to be mutually exclusive with flushAt/flushInterval. This will pevent getting the default policies when specifying only policies.
  • Fixes the reference copy of the flushPolicies to prevent mutating the user supplied array if not destructured in the method call
  • Adds tests for the flushPolicies from the client public methods (previously only tested in unit tests)
  • Adds BackgroundFlushPolicy to trigger a flush when the app goes into the Background. Useful for uploading events before switching or launching a different app.

Copy link
Contributor

@alanjcharles alanjcharles left a comment

Choose a reason for hiding this comment

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

lgtm!

@oscb oscb merged commit e4b558a into master May 30, 2023
@oscb oscb deleted the oscb/policiesFixes branch May 30, 2023 17:20
oscb pushed a commit that referenced this pull request Jun 2, 2023
## [@segment/analytics-react-native-v2.15.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.14.0...@segment/analytics-react-native-v2.15.0) (2023-06-02)

### Features

* add config option for cdn proxy ([#834](#834)) ([95562ed](95562ed))

### Bug Fixes

* fix flush policies reference copy, add BackgroundPolicy ([#838](#838)) ([e4b558a](e4b558a))
* queue storage fixes ([#836](#836)) ([f5a6a86](f5a6a86))
* removes Inject plugins ([#837](#837)) ([ce56c9e](ce56c9e))
* update braze example and readme ([#830](#830)) ([b6a319a](b6a319a))
@oscb
Copy link
Contributor Author

oscb commented Jun 2, 2023

🎉 This PR is included in version @segment/analytics-react-native-v2.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscb oscb added the released label Jun 2, 2023
oscb pushed a commit that referenced this pull request Jun 2, 2023
## [@segment/analytics-react-native-plugin-clevertap-v1.0.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-plugin-clevertap-v1.0.1...@segment/analytics-react-native-plugin-clevertap-v1.0.2) (2023-06-02)

### Bug Fixes

* fix flush policies reference copy, add BackgroundPolicy ([#838](#838)) ([e4b558a](e4b558a))
@oscb
Copy link
Contributor Author

oscb commented Jun 2, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-clevertap-v1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Jun 2, 2023
## [@segment/analytics-react-native-plugin-device-token-v1.0.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-plugin-device-token-v1.0.1...@segment/analytics-react-native-plugin-device-token-v1.0.2) (2023-06-02)

### Bug Fixes

* fix flush policies reference copy, add BackgroundPolicy ([#838](#838)) ([e4b558a](e4b558a))
@oscb
Copy link
Contributor Author

oscb commented Jun 2, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-device-token-v1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Jun 2, 2023
## [@segment/analytics-react-native-plugin-mixpanel-v0.3.3](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-plugin-mixpanel-v0.3.2...@segment/analytics-react-native-plugin-mixpanel-v0.3.3) (2023-06-02)

### Bug Fixes

* fix flush policies reference copy, add BackgroundPolicy ([#838](#838)) ([e4b558a](e4b558a))
@oscb
Copy link
Contributor Author

oscb commented Jun 2, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-mixpanel-v0.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants