-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(core)!: Remove Scope
type interface in favor of using Scope
class
#14721
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
+178
−388
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
Hmm, some test failures still happening, I'll check it out. |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
c7669bf
to
a16d7ef
Compare
s1gr1d
approved these changes
Dec 16, 2024
mydea
added a commit
that referenced
this pull request
Dec 16, 2024
Extracted out from #14721 Today, we inline all the types into `deno/build/index.d.ts`. This used to work "OK" previously, where all the types came from `@sentry/types` and where thus all "simple types". If we want to replace some of this with actual classes, e.g. `Scope` or `Client` classes, this starts to fail, because now we have separate definitions that do not match. So to fix this, we now stop inlining all the types, but instead re-export them from `@sentry/core`. While at this, I also updated the test setup to ignore utils/types and just use core for everything. With this change, `deno/build/index.d.ts` looks something like this: ```ts import * as _sentry_core from '@sentry/core'; import { BaseTransportOptions, Options, TracePropagationTargets, ClientOptions, ServerRuntimeClient, Integration, Client } from '@sentry/core'; export { ... } from '@sentry/core'; // additional types from deno go here... ``` I do not _think_ this should be breaking, but 🤷 hard to say for sure with these things.
a16d7ef
to
a086fad
Compare
AbhiPrasad
approved these changes
Dec 16, 2024
Loading status checks…
…lass
Co-authored-by: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com>
dbe5f6c
to
9f4204b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In v8, types have been exported from
@sentry/types
, while implementations have been exported from other classes.This lead to some duplication, where we had to keep an interface in
@sentry/types
, while the implementation mirroring that interface was kept e.g. in@sentry/core
.Since in v9 the types have been merged into
@sentry/core
, we can get rid of some of this duplication. This means that certain things that used to be a separate interface, will not expect an actual instance of the class/concrete implementation. This should not affect most users, unless you relied on passing things with a similar shape to internal methods.This PR removes the
Scope
interface, in favor of just using the scope class everywhere.This is related to #9840