getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
8.01k stars 1.58k forks source link

Hoist `@sentry/types` into `@sentry/core` #14271

Open lforst opened 1 week ago

lforst commented 1 week ago

Description

We found that moving @sentry/types into @sentry/core would clean up some architecture, docs, and prevent footguns like diverging package versions.

This task involves:

ATTENTION: Because of https://github.com/getsentry/sentry-javascript/issues/9840 which is also planned for v9, we do not want to export the Client type from @sentry/core. The same goes for the Scope type. Instead, we want to export Client as an alias for BaseClient as part of this task, and the Scope interface as we have it in @sentry/types should not make it into @sentry/core.

We don't want to delete @sentry/types in the v9 major, just deprecate. The friction for deletion would likely be too high.

timfish commented 3 days ago

We don't want to delete @sentry/types in the v9 major, just deprecate

I don't understand this statement.

lforst commented 3 days ago

@timfish this decision was pushed by @mydea. The idea is to limit breakage.

The theory is that too many people depend on the types package through docs and similar.

timfish commented 3 days ago

If we update types in core they will obv also be updated in the types package

Oh ok, I was missing this bit of context!