Skip to content

Commit

Permalink
ref(types): Remove deprecated user dsn field (#4864)
Browse files Browse the repository at this point in the history
The `user` dsn component was renamed to `publicKey`. This PR removes that from the dsn field.
  • Loading branch information
AbhiPrasad authored and lobsterkatie committed Apr 26, 2022
1 parent c481f55 commit 8ed1e9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions packages/types/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export type DsnProtocol = 'http' | 'https';
export interface DsnComponents {
/** Protocol used to connect to Sentry. */
protocol: DsnProtocol;
/** Public authorization key (deprecated, renamed to publicKey). */
user?: string;
/** Public authorization key. */
publicKey?: string;
/** Private authorization key (deprecated, optional). */
Expand Down
6 changes: 0 additions & 6 deletions packages/utils/src/dsn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,7 @@ function dsnFromString(str: string): DsnComponents {
}

function dsnFromComponents(components: DsnComponents): DsnComponents {
// TODO this is for backwards compatibility, and can be removed in a future version
if ('user' in components && !('publicKey' in components)) {
components.publicKey = components.user;
}

return {
user: components.publicKey || '',
protocol: components.protocol,
publicKey: components.publicKey || '',
pass: components.pass || '',
Expand Down

0 comments on commit 8ed1e9e

Please sign in to comment.