Skip to content

ref(types): deprecate severity enum - #4280

Merged
JonasBa merged 7 commits into
masterfrom
jb/bundle/drop-severity
Dec 16, 2021
Merged

ref(types): deprecate severity enum#4280
JonasBa merged 7 commits into
masterfrom
jb/bundle/drop-severity

Conversation

@JonasBa

@JonasBaJonasBa commented Dec 14, 2021

Copy link
Copy Markdown
Contributor

Drops Deprecate severity enum. I kept the implementation of fromString because it guards from arbitrary severity types

@JonasBa
JonasBaforce-pushed the jb/bundle/drop-severity branch from 4edc753 to 29bb6adCompareDecember 14, 2021 13:47
@JonasBa
JonasBaforce-pushed the jb/bundle/drop-severity branch from 29bb6ad to 4ca00aaCompareDecember 14, 2021 15:38
@github-actions

github-actionsBot commented Dec 14, 2021

Copy link
Copy Markdown
Contributor

size-limit report

PathBase Size (b8dc945)Current SizeChange
@sentry/browser - CDN Bundle (gzipped)21.01 KB20.61 KB-1.92% 🔽
@sentry/browser - CDN Bundle (minified)66.97 KB65.87 KB-1.64% 🔽
@sentry/browser - Webpack22.79 KB22.59 KB-0.9% 🔽
@sentry/browser - Webpack - gzip = false78.2 KB77.45 KB-0.97% 🔽
@sentry/react - Webpack22.82 KB22.62 KB-0.9% 🔽
@sentry/nextjs Client - Webpack47.34 KB46.72 KB-1.32% 🔽
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped)29.35 KB28.75 KB-2.04% 🔽

@JonasBa

Copy link
Copy Markdown
ContributorAuthor

Slow and steady

@JonasBa

Copy link
Copy Markdown
ContributorAuthor

@AbhiPrasad One problem with above code changes is that Severity.fromString is now marked as deprecated too 🤮 This is actually unexpected and I'm not quite sure why TS does this. We can remove the namespace and just export a severityFromString function, but it may be better to move this function to the utils package. Wdyt?
CleanShot 2021-12-14 at 18 14 29@2x

@mitsuhiko

Copy link
Copy Markdown
Contributor

@JonasBa i would keep this function internally and hide it as good as possible. In the spirit of removing API surface there is no reason for this function to be public.

@AbhiPrasad

Copy link
Copy Markdown
Contributor

+1 on keeping it internal

@JonasBa
JonasBaforce-pushed the jb/bundle/drop-severity branch from 6d11492 to 291d0e1CompareDecember 15, 2021 08:00
@JonasBaJonasBa changed the title refactor(types): drop severity enumref(types): deprecate severity enumDec 15, 2021
@JonasBaJonasBa changed the title ref(types): deprecate severity enumref(types): deprecate Severity enumDec 15, 2021
@mitsuhiko

Copy link
Copy Markdown
Contributor

@JonasBa it's conflicting now :(

@JonasBa
JonasBaforce-pushed the jb/bundle/drop-severity branch from a2642a1 to 2dc1d7aCompareDecember 15, 2021 14:59
@JonasBa
JonasBaforce-pushed the jb/bundle/drop-severity branch from edba6fb to 1dbeedaCompareDecember 16, 2021 10:57
@JonasBaJonasBa changed the title ref(types): deprecate Severity enumref(types): deprecate severity enumDec 16, 2021
* ref(types): deprecate enum and export type
* ref(types): fix fromHttpCode usage to statusFromHttpCode
* ref(types): remove enum usage
* fix(types): fix mistake on span
* fix: fmt
* ref(types): do not export the status enum
* ref(types): fix all imports
* ref(utils): consistent naming
* ref(types): deprecate span status enum (#4299)
* ref(span): deprecate span status enum
* ts(span): widen type
* ref(span): avoid reexporting the enum
* ref(types): fix all imports
* fix(test): remove extra space
* fix(test): import extension methods
* ref(types): deprecate transactionmethod enum (#4314)
* ref(types): deprecate transactionmethod enum
* fix(types): drop transactionsamplingmethod
* ref(types): deprecate outcome enum (#4315)
* ref(types): deprecate outcome enum
* fix(types): drop transportoutcome
* ref(types): deprecate request status enum (#4316)
* ref(types): deprecate request status
* ref(types): deprecate session status
* ref(types): remove unused logLevel (#4317) (#4320)
Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
@JonasBa
JonasBa merged commit caba96e into masterDec 16, 2021
@JonasBa
JonasBa deleted the jb/bundle/drop-severity branch December 16, 2021 14:18
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
* fix(types): use SeverityLevel
* fix(types): remove other references to the enum
* fix(types): disable deprecation warning
* fix(types): move fromString to utils
* packages(types): fix exports
* fix(rebase): fix conflicts
* ref(types): deprecate status enum (#4298)
* ref(types): deprecate enum and export type
* ref(types): fix fromHttpCode usage to statusFromHttpCode
* ref(types): remove enum usage
* fix(types): fix mistake on span
* fix: fmt
* ref(types): do not export the status enum
* ref(types): fix all imports
* ref(utils): consistent naming
* ref(types): deprecate span status enum (#4299)
* ref(span): deprecate span status enum
* ts(span): widen type
* ref(span): avoid reexporting the enum
* ref(types): fix all imports
* fix(test): remove extra space
* fix(test): import extension methods
* ref(types): deprecate transactionmethod enum (#4314)
* ref(types): deprecate transactionmethod enum
* fix(types): drop transactionsamplingmethod
* ref(types): deprecate outcome enum (#4315)
* ref(types): deprecate outcome enum
* fix(types): drop transportoutcome
* ref(types): deprecate request status enum (#4316)
* ref(types): deprecate request status
* ref(types): deprecate session status
* ref(types): remove unused logLevel (#4317) (#4320)
Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
AbhiPrasad added a commit that referenced this pull request Jan 17, 2022
In #4280,
specifically in commit dd3aa70, we
deprecated the `Severity` enum in favour of using a string union type,
`SeverityLevel`. It's important to note that this change affected the
type signature of one of our public API methods, `captureMessage`.
The change to deprecate the `Severity` enum was done for bundle size
reasons.
After releasing the beta with these changes, it was found that
deprecating the `Severity` enum and replacing it with `SeverityLevel`
was quite the disruptive change, which would make upgrading to the minor
version a hassle for users. As a result, this patch undeprecates the
`Severity` enum. The `Severity` enum will be removed in the upcoming
major release instead, as a breaking change.
AbhiPrasad added a commit that referenced this pull request Jan 17, 2022
In #4280,
specifically in commit dd3aa70, we
deprecated the `Severity` enum in favour of using a string union type,
`SeverityLevel`. It's important to note that this change affected the
type signature of one of our public API methods, `captureMessage`.
The change to deprecate the `Severity` enum was done for bundle size
reasons.
After releasing the beta with these changes, it was found that
deprecating the `Severity` enum and replacing it with `SeverityLevel`
was quite the disruptive change, which would make upgrading to the minor
version a hassle for users. As a result, this patch undeprecates the
`Severity` enum. The `Severity` enum will be removed in the upcoming
major release instead, as a breaking change.
AbhiPrasad added a commit that referenced this pull request Jan 17, 2022
In #4280,
specifically in commit dd3aa70, we
deprecated the `Severity` enum in favour of using a string union type,
`SeverityLevel`. It's important to note that this change affected the
type signature of one of our public API methods, `captureMessage`.
The change to deprecate the `Severity` enum was done for bundle size
reasons.
After releasing the beta with these changes, it was found that
deprecating the `Severity` enum and replacing it with `SeverityLevel`
was quite the disruptive change, which would make upgrading to the minor
version a hassle for users. As a result, this patch undeprecates the
`Severity` enum. The `Severity` enum will be removed in the upcoming
major release instead, as a breaking change.
AbhiPrasad added a commit that referenced this pull request Jan 17, 2022
In #4280,
specifically in commit dd3aa70, we
deprecated the `Severity` enum in favour of using a string union type,
`SeverityLevel`. It's important to note that this change affected the
type signature of one of our public API methods, `captureMessage`.
The change to deprecate the `Severity` enum was done for bundle size
reasons.
After releasing the beta with these changes, it was found that
deprecating the `Severity` enum and replacing it with `SeverityLevel`
was quite the disruptive change, which would make upgrading to the minor
version a hassle for users. As a result, this patch undeprecates the
`Severity` enum. The `Severity` enum will be removed in the upcoming
major release instead, as a breaking change.
AbhiPrasad added a commit that referenced this pull request Jan 18, 2022
In #4280,
specifically in commit dd3aa70, we
deprecated the `Severity` enum in favour of using a string union type,
`SeverityLevel`. It's important to note that this change affected the
type signature of one of our public API methods, `captureMessage`.
The change to deprecate the `Severity` enum was done for bundle size
reasons.
After releasing the beta with these changes, it was found that
deprecating the `Severity` enum and replacing it with `SeverityLevel`
was quite the disruptive change, which would make upgrading to the minor
version a hassle for users. As a result, this patch undeprecates the
`Severity` enum. The `Severity` enum will be removed in the upcoming
major release instead, as a breaking change.
Sign up for freeto 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.

3 participants

@JonasBa@mitsuhiko@AbhiPrasad