Skip to content
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

Exposing Universal Storage on the Analytics object rather than passing it directly to plugins #721

Merged
merged 6 commits into from
Dec 9, 2022

Conversation

pooyaj
Copy link
Contributor

@pooyaj pooyaj commented Dec 8, 2022

I think the old style where we pass down the storage as an argument to each plugin wasn't elegant. Exposing it via the analytics object have few benefits:

  • We don't have to change the way we register plugins
  • We don't have to make changes to action destination runtime to pass storage as a new parameter, and hence changing docs, etc.
  • Makes storage more accessible for future use

[] I've included a changeset (psst. run yarn changeset. Read about changesets here).

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2022

🦋 Changeset detected

Latest commit: 17b10f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pooyaj pooyaj requested a review from a team December 8, 2022 23:28
Copy link
Contributor

@silesky silesky left a comment

Choose a reason for hiding this comment

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

Thank you!

@pooyaj pooyaj enabled auto-merge (squash) December 9, 2022 00:21
@pooyaj pooyaj merged commit 779e66b into master Dec 9, 2022
@pooyaj pooyaj deleted the pj/refactor_univ_storage branch December 9, 2022 00:25
@github-actions github-actions bot mentioned this pull request Dec 9, 2022
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.

2 participants