Skip to content
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

chore(deps): update JavaScript SDK to v7.47.0 #2958

Merged
merged 10 commits into from
Apr 12, 2023
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

### Dependencies

- Bump JavaScript SDK from v7.45.0 to v7.46.0 ([#2946](https://github.com/getsentry/sentry-react-native/pull/2946))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7460)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.45.0...7.46.0)
- Bump JavaScript SDK from v7.45.0 to v7.47.0 ([#2946](https://github.com/getsentry/sentry-react-native/pull/2946), [#2958](https://github.com/getsentry/sentry-react-native/pull/2958))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7470)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.45.0...7.47.0)
- Bump Android SDK from v6.16.0 to v6.17.0 ([#2948](https://github.com/getsentry/sentry-react-native/pull/2948))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6170)
- [diff](https://github.com/getsentry/sentry-java/compare/6.16.0...6.17.0)
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
"react-native": ">=0.65.0"
},
"dependencies": {
"@sentry/browser": "7.46.0",
"@sentry-internal/tracing": "7.47.0",
"@sentry/browser": "7.47.0",
"@sentry/cli": "2.17.0",
"@sentry/core": "7.46.0",
"@sentry/hub": "7.46.0",
"@sentry/integrations": "7.46.0",
"@sentry/react": "7.46.0",
"@sentry/tracing": "7.46.0",
"@sentry/types": "7.46.0",
"@sentry/utils": "7.46.0"
"@sentry/core": "7.47.0",
"@sentry/hub": "7.47.0",
"@sentry/integrations": "7.47.0",
"@sentry/react": "7.47.0",
"@sentry/types": "7.47.0",
"@sentry/utils": "7.47.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.46.0",
"@sentry-internal/eslint-plugin-sdk": "7.46.0",
"@sentry-internal/eslint-config-sdk": "7.47.0",
"@sentry-internal/eslint-plugin-sdk": "7.47.0",
"@sentry/typescript": "^5.20.1",
"@sentry/wizard": "2.6.1",
"@types/jest": "^29.2.5",
Expand Down
4 changes: 2 additions & 2 deletions scripts/update-javascript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

tagPrefix=''
repo="https://github.com/getsentry/sentry-javascript.git"
packages=('@sentry/browser' '@sentry/core' '@sentry/hub' '@sentry/integrations' '@sentry/react' '@sentry/tracing' '@sentry/types' '@sentry/utils')
packages+=('@sentry-internal/eslint-config-sdk' '@sentry-internal/eslint-plugin-sdk')
packages=('@sentry/browser' '@sentry/core' '@sentry/hub' '@sentry/integrations' '@sentry/react' '@sentry/types' '@sentry/utils')
packages+=('@sentry-internal/tracing', '@sentry-internal/eslint-config-sdk' '@sentry-internal/eslint-plugin-sdk')

. $(dirname "$0")/update-package-json.sh
5 changes: 0 additions & 5 deletions src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ export {
startTransaction,
} from '@sentry/core';

// We need to import it so we patch the hub with global functions
// aka. this has side effects
import '@sentry/tracing';

// Add the React Native SDK's own tracing extensions, this needs to happen AFTER @sentry/tracing's
import { _addTracingExtensions } from './measurements';
_addTracingExtensions();

Expand Down
8 changes: 4 additions & 4 deletions src/js/measurements.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Hub } from '@sentry/core';
import { getCurrentHub, getMainCarrier } from '@sentry/core';
import type { Transaction } from '@sentry/tracing';
import type { Hub, Transaction } from '@sentry/core';
import { addTracingExtensions, getCurrentHub, getMainCarrier } from '@sentry/core';
import type { CustomSamplingContext, Span, SpanContext, TransactionContext } from '@sentry/types';

import { DEFAULT, ReactNativeTracing } from './tracing';
Expand All @@ -13,9 +12,10 @@ export const STALL_TOTAL_TIME = 'stall_total_time';
export const STALL_LONGEST_TIME = 'stall_longest_time';

/**
* Adds React Native's extensions. Needs to be called after @sentry/tracing's extension methods are added
* Adds React Native's extensions. Needs to be called before any transactions are created.
*/
export function _addTracingExtensions(): void {
addTracingExtensions();
const carrier = getMainCarrier();
if (carrier.__SENTRY__) {
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
Expand Down
2 changes: 1 addition & 1 deletion src/js/tracing/nativeframes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Span, Transaction } from '@sentry/tracing';
import type { Span, Transaction } from '@sentry/core';
import type { Event, EventProcessor, Measurements, MeasurementUnit } from '@sentry/types';
import { logger, timestampInSeconds } from '@sentry/utils';

Expand Down
14 changes: 5 additions & 9 deletions src/js/tracing/reactnativetracing.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
/* eslint-disable max-lines */
import type { Hub } from '@sentry/core';
import { getCurrentHub } from '@sentry/core';
import type { IdleTransaction, RequestInstrumentationOptions, Transaction } from '@sentry/tracing';
import {
defaultRequestInstrumentationOptions,
getActiveTransaction,
instrumentOutgoingRequests,
startIdleTransaction,
} from '@sentry/tracing';
import type { RequestInstrumentationOptions } from '@sentry-internal/tracing';
import { instrumentOutgoingRequests } from '@sentry-internal/tracing';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like we need to export this from @sentry/browser! With that we can remove @sentry-internal/tracing usage as well :)

I'll take care of making that fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be nice. Thank you.

import { defaultRequestInstrumentationOptions } from '@sentry/browser';
import type { Hub, IdleTransaction, Transaction } from '@sentry/core';
import { getActiveTransaction, getCurrentHub, startIdleTransaction } from '@sentry/core';
import type { EventProcessor, Integration, Transaction as TransactionType, TransactionContext } from '@sentry/types';
import { logger } from '@sentry/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/js/tracing/stalltracking.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable max-lines */
import type { IdleTransaction, Span, Transaction } from '@sentry/tracing';
import type { IdleTransaction, Span, Transaction } from '@sentry/core';
import type { Measurements, MeasurementUnit } from '@sentry/types';
import { logger, timestampInSeconds } from '@sentry/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/js/tracing/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IdleTransaction } from '@sentry/core';
import type { BeforeFinishCallback } from '@sentry/core/types/tracing/idletransaction';
import type { IdleTransaction } from '@sentry/tracing';
import { logger } from '@sentry/utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/js/tracing/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IdleTransaction, Span, Transaction } from '@sentry/tracing';
import type { IdleTransaction, Span, Transaction } from '@sentry/core';
import type { TransactionContext, TransactionSource } from '@sentry/types';
import { timestampInSeconds } from '@sentry/utils';

Expand Down
3 changes: 1 addition & 2 deletions test/measurements.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Carrier } from '@sentry/core';
import type { Carrier, Transaction } from '@sentry/core';
import { getCurrentHub, getMainCarrier } from '@sentry/core';
import type { Transaction } from '@sentry/tracing';
import type { Hub } from '@sentry/types';

import type { StartTransactionFunction } from '../src/js/measurements';
Expand Down
Loading