Uh oh!
There was an error while loading. Please reload this page.
ref(hub): Move @sentry/hub code to @sentry/core - #5823
Conversation
@sentry/hub code to @sentry/core
This comment was marked as outdated.
This comment was marked as outdated.
AbhiPrasad
commented
Oct 5, 2022
We merged in #5873, which prob requires a more tricky rebase. |
timfish
commented
Oct 5, 2022
Should we be marking all |
AbhiPrasad
left a comment
There was a problem hiding this comment.
For future readers: We'll save deleting @sentry/hub for the next major version, this just sets us up to do further refactors to work toward truly platform agnostic packages.
AbhiPrasad
commented
Oct 5, 2022
Good idea! Let's do that. |
Since the exports in export{getCurrentHubasgetCurrentHubCore}from'@sentry/core';/** * @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8 */constgetCurrentHub=getCurrentHubCore;export{getCurrentHub} |
timfish
commented
Oct 5, 2022
Ok, I think this is now good to go. I couldn't mark |
@timfish, since they're classes, could you do import{HubasCoreHub}from'@sentry/core';/** * @deprecated This export has moved to @sentry/core. The @sentry/hub package will be removed in v8 */exportclassHubextendsCoreHub{};? |
timfish
commented
Oct 7, 2022
It does leave me with a strange feeling that it is somehow exporting a different type to before but my logical side says that it's totally fine! 🙃 |
AbhiPrasad
commented
Oct 7, 2022
Can we move the tests in another PR? Let's try to get this released on Monday alongside the NextJS experimental flag switch |
timfish
commented
Oct 7, 2022
Leaving the tests in hub was instrumental in ensuring that there were no breaking changes in Safe to move then now? |
AbhiPrasad
commented
Oct 7, 2022
Ahhh great point, then let's keep them until we do the actual deletion during the major. |
Closes#5665
This PR:
@sentry/hubcode files to@sentry/core@sentry/hubto a stub that re-exports the same types from@sentry/core@sentry/hubnow only depends on@sentry/core@sentry/hub->@sentry/core@sentry/hubas a dependency from packages@sentry/hubtests where they are for nowSurprisingly this results in a 159 byte increase in minified bundle size!
I've compared the type exports from
@sentry/hubfrom before and after this PR and the exports match so it looks like this isn't a breaking change 😬