Skip to content

fix: async-storage as optional peer dependency #779

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 1 commit into from
Mar 10, 2023
Merged

Conversation

oscb
Copy link
Contributor

@oscb oscb commented Mar 10, 2023

  • Makes @react-native-async-storage/async-storage and react-native-get-random-values as peer dependencies, async-storage is now optional in both core and sovran. PR by: @mateusz1913
  • Remove sovran type exports. PR by: @danychi
  • Fixing jest setup for tests for mocking UUID and react-native-get-random-values for all tests by default.
  • Fixed the async-storage mock

Co-authored-by: Mateusz Mędrek [email protected]
Co-authored-by: Daniel Alarcón Amador [email protected]

- Makes `@react-native-async-storage/async-storage` and `react-native-get-random-values` as peer dependencies, async-storage is now optional in both core and sovran. PR by: [@mateusz1913](https://github.com/mateusz1913)
- Remove sovran type exports. PR by: [@danychi](https://github.com/danychi)
- Fixing jest setup for tests for mocking `UUID` and `react-native-get-random-values` for all tests by default.
- Fixed the async-storage mock

Co-authored-by: Mateusz Mędrek <[email protected]>
Co-authored-by: Daniel Alarcón Amador <[email protected]>
@isaachinman
Copy link

Thanks @oscb – this is a fantastic improvement/re-organisation. Any idea when we can expect a release? Will this be a major release and/or require a minimum RN version?

@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

@isaachinman should be out before the end of the week! Quite possibly today or tomorrow if we can merge all fixes we want to go along with this change

oscb pushed a commit that referenced this pull request Mar 14, 2023
## [@segment/sovran-react-native-v1.0.1](https://github.com/segmentio/analytics-react-native/compare/@segment/sovran-react-native-v1.0.0...@segment/sovran-react-native-v1.0.1) (2023-03-14)

### Bug Fixes

* async-storage as optional peer dependency ([#779](#779)) ([f3d5bc0](f3d5bc0))
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

🎉 This PR is included in version @segment/sovran-react-native-v1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscb oscb added the released label Mar 14, 2023
oscb pushed a commit that referenced this pull request Mar 14, 2023
## [@segment/analytics-react-native-v2.13.2](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.13.1...@segment/analytics-react-native-v2.13.2) (2023-03-14)

### Bug Fixes

* async-storage as optional peer dependency ([#779](#779)) ([f3d5bc0](f3d5bc0))
* switching UUID library, new depedencies ([#772](#772)) ([4734389](4734389))
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-advertising-id-v1.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-amplitude-session-v0.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
## @segment/analytics-react-native-plugin-braze-middleware-v1.0.0 (2023-03-14)

### Bug Fixes

* async-storage as optional peer dependency ([#779](#779)) ([f3d5bc0](f3d5bc0))
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-braze-middleware-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 14, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-facebook-app-events-v0.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 14, 2023
## [@segment/analytics-react-native-plugin-firebase-v0.3.5](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-plugin-firebase-v0.3.4...@segment/analytics-react-native-plugin-firebase-v0.3.5) (2023-03-14)

### Bug Fixes

* async-storage as optional peer dependency ([#779](#779)) ([f3d5bc0](f3d5bc0))
* move firebase to peer dependency ([#782](#782)) ([6a6f1cd](6a6f1cd))
* switching UUID library, new depedencies ([#772](#772)) ([4734389](4734389))
@Alex-McLean
Copy link

@oscb was @segment/sovran-react-native intentionally release as 1.0.1, rather than 0.4.6 or even 0.5.0?

If it is intended to be a minor or major patch, then my understanding is there is also a required change to the core library's dependencies, as it is still listed as "@segment/sovran-react-native": "^0.4.5" here.

Am currently trying to include this fix in my repo, but analytics-react-native will still only resolve to the old 0.4.5.

@isaachinman
Copy link

@Alex-McLean @oscb Same issue here. Setting resolutions works as a temporary fix:

"resolutions": {
  "@segment/sovran-react-native": ">=1.0.1"
}

Clearly this shows that the repo is missing any sort of functional testing in its deploy/release pipeline.

@oscb
Copy link
Contributor Author

oscb commented Mar 15, 2023

@Alex-McLean yea, that was a mistake. It is the first release of that package from this monorepo, so npm version bumped the major version unexpectedly. Just released a fix in v2.13.3 to fix the dependency version in the core package

@isaachinman the monorepo does run functional integration tests against the example app, but it uses module resolutions to resolve and test the code to the commit being released. I'm guessing we could bump versions and deploy to a local registry, then install dependencies from there so that we could spot version bump mismatches before actually releasing to the public NPM Registry, but curious if you have any suggestions.

@isaachinman
Copy link

Thanks @oscb for a quick fix!

The workflow you are describing with either a local registry, or canary versions on a remote registry, sounds like the right approach to me.

I'd highly suggest having a look at auto if you're not already aware of it.

oscb pushed a commit that referenced this pull request Mar 15, 2023
@oscb
Copy link
Contributor Author

oscb commented Mar 15, 2023

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

The release is available on:

Your semantic-release bot 📦🚀

oscb pushed a commit that referenced this pull request Mar 29, 2023
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.

4 participants