You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whole @sentry/minimal was build around @sentry/hub. If you are writing 3rd party integrations, or plug-in widgets, you are not going to depend on @sentry/core, and can use @sentry/hub directly.
Would it be possible to move the hub code without breaking the public API?
We could move the code to core and then have hub only depend on core and re-export the types?
The only reason I suggest this is because it becomes easier to make the changes and iterate on the codebase without creating a load of merge conflicts as v8 approaches. When we get to v8 we'd simply remove the @sentry/hub package?
The only downside I can see is that we'd be exporting the types from two different packages at the same time.
Activity
kanbykanby commentedon Sep 1, 2022
Why didn't do it in the first place?
AbhiPrasad commentedon Sep 1, 2022
Maybe @kamilogorek can offer us some history listens on why hub was made a seperate package.
kamilogorek commentedon Sep 1, 2022
Whole
@sentry/minimalwas build around@sentry/hub. If you are writing 3rd party integrations, or plug-in widgets, you are not going to depend on@sentry/core, and can use@sentry/hubdirectly.timfish commentedon Sep 26, 2022
Would it be possible to move the hub code without breaking the public API?
We could move the code to
coreand then havehubonly depend oncoreand re-export the types?The only reason I suggest this is because it becomes easier to make the changes and iterate on the codebase without creating a load of merge conflicts as v8 approaches. When we get to v8 we'd simply remove the
@sentry/hubpackage?The only downside I can see is that we'd be exporting the types from two different packages at the same time.
AbhiPrasad commentedon Sep 26, 2022
I'm going to go ahead and make the call for us to do this, esp if it makes the work in #5611 easier.
Internally, we can shift to only depending on core, so the chances of this causing issues will decrease.
lobsterkatie commentedon Sep 26, 2022
We already do this all over the place, because most wrapper SDKs re-export stuff from the SDKs they wrap. I don't think it's an issue.
timfish commentedon Oct 7, 2022
I've reopened this and it can be closed when
@sentry/hubis finally deleted and the tests are migrated to core.yordis commentedon Oct 10, 2022
Happy about this change! 🚀
[-]Remove @sentry/hub[/-][+][v8] Remove `@sentry/hub` package[/+]feat(v8): Delete @sentry/hub (#10530)