Skip to content

Commit e1c95fe

Browse files
committed
random cleanup
1 parent 0848575 commit e1c95fe

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function initialize(appInstance: ApplicationInstance): void {
2828
}
2929
}
3030

31-
function getTransitionInformation(transition: any, router: any) {
31+
function getTransitionInformation(transition: any, router: any): { [key: string]: any } {
3232
const fromRoute = transition?.from?.name;
3333
const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName;
3434
return {

packages/tracing/src/transaction.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
TransactionContext,
77
TransactionMetadata,
88
} from '@sentry/types';
9-
import { dropUndefinedKeys, isInstanceOf, logger } from '@sentry/utils';
9+
import { dropUndefinedKeys, logger } from '@sentry/utils';
1010

1111
import { Span as SpanClass, SpanRecorder } from './span';
1212

@@ -21,7 +21,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
2121
/**
2222
* The reference to the current hub.
2323
*/
24-
private readonly _hub: Hub = (getCurrentHub() as unknown) as Hub;
24+
private readonly _hub: Hub;
2525

2626
private _trimEnd?: boolean;
2727

@@ -35,16 +35,14 @@ export class Transaction extends SpanClass implements TransactionInterface {
3535
public constructor(transactionContext: TransactionContext, hub?: Hub) {
3636
super(transactionContext);
3737

38-
if (isInstanceOf(hub, Hub)) {
39-
this._hub = hub as Hub;
40-
}
41-
4238
this.name = transactionContext.name || '';
43-
4439
this.metadata = transactionContext.metadata || {};
4540
this._trimEnd = transactionContext.trimEnd;
41+
this._hub = hub || getCurrentHub();
4642

47-
// this is because transactions are also spans, and spans have a transaction pointer
43+
// this is because transactions are also spans, and spans have a transaction pointer (it doesn't get set in `super`
44+
// because theoretically you can create a span without a transaction, though at the moment it doesn't do you much
45+
// good)
4846
this.transaction = this;
4947
}
5048

packages/utils/src/misc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ interface SemVer {
217217
/**
218218
* Parses input into a SemVer interface
219219
* @param input string representation of a semver version
220+
* @returns A object containing each part of the version string as a separate entry
220221
*/
221222
export function parseSemver(input: string): SemVer {
222223
const match = input.match(SEMVER_REGEXP) || [];

0 commit comments

Comments
 (0)