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.69.0 #3247

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
- Bump Cocoa SDK from v8.10.0 to v8.11.0 ([#3245](https://github.com/getsentry/sentry-react-native/pull/3245))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8110)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.10.0...8.11.0)
- Bump JavaScript SDK from v7.63.0 to v7.68.0 ([#3277](https://github.com/getsentry/sentry-react-native/pull/3277))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7680)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.63.0...7.68.0)
- Bump JavaScript SDK from v7.63.0 to v7.69.0 ([#3277](https://github.com/getsentry/sentry-react-native/pull/3277), [#3247](https://github.com/getsentry/sentry-react-native/pull/3247))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7690)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.63.0...7.69.0)
- Bump Android SDK from v6.28.0 to v6.29.0 ([#3271](https://github.com/getsentry/sentry-react-native/pull/3271))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6290)
- [diff](https://github.com/getsentry/sentry-java/compare/6.28.0...6.29.0)
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
"react-native": ">=0.65.0"
},
"dependencies": {
"@sentry/browser": "7.68.0",
"@sentry/browser": "7.69.0",
"@sentry/cli": "2.20.7",
"@sentry/core": "7.68.0",
"@sentry/hub": "7.68.0",
"@sentry/integrations": "7.68.0",
"@sentry/react": "7.68.0",
"@sentry/types": "7.68.0",
"@sentry/utils": "7.68.0"
"@sentry/core": "7.69.0",
"@sentry/hub": "7.69.0",
"@sentry/integrations": "7.69.0",
"@sentry/react": "7.69.0",
"@sentry/types": "7.69.0",
"@sentry/utils": "7.69.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.68.0",
"@sentry-internal/eslint-plugin-sdk": "7.68.0",
"@sentry-internal/eslint-config-sdk": "7.69.0",
"@sentry-internal/eslint-plugin-sdk": "7.69.0",
"@sentry/typescript": "^5.20.1",
"@sentry/wizard": "3.9.1",
"@types/jest": "^29.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ const PerformanceTimingScreen = () => {
const [dateTime, setDateTime] = React.useState(0);

React.useEffect(() => {
// @ts-ignore
// @ts-expect-error
if (typeof global.performance !== 'undefined') {
initialDate.current = Date.now();
// @ts-ignore
// @ts-expect-error
initialPerformance.current = global.performance.now();

const interval = setInterval(() => {
// @ts-ignore
// @ts-expect-error
setPerformanceTime(global.performance.now());
setDateTime(Date.now());
}, 1000);
Expand Down
1 change: 0 additions & 1 deletion src/js/profiling/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export class HermesProfiling implements Integration {
const client = this._getCurrentHub && this._getCurrentHub().getClient();
const options = client && client.getOptions();

// @ts-ignore not part of the browser options yet
const profilesSampleRate =
options && options._experiments && typeof options._experiments.profilesSampleRate === 'number'
? options._experiments.profilesSampleRate
Expand Down
7 changes: 1 addition & 6 deletions src/js/tracing/reactnativetracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,7 @@ export class ReactNativeTracing implements Integration {
/**
* Registers routing and request instrumentation.
*/
public setupOnce(
// @ts-ignore TODO
addGlobalEventProcessor: (callback: EventProcessor) => void,
getCurrentHub: () => Hub,
): void {
public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
const hub = getCurrentHub();
const client = hub.getClient();
const clientOptions = client && client.getOptions();
Expand All @@ -175,7 +171,6 @@ export class ReactNativeTracing implements Integration {
traceXHR,
// eslint-disable-next-line deprecation/deprecation
tracingOrigins,
// @ts-ignore TODO
shouldCreateSpanForRequest,
// eslint-disable-next-line deprecation/deprecation
tracePropagationTargets: thisOptionsTracePropagationTargets,
Expand Down
3 changes: 1 addition & 2 deletions src/js/tracing/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { IdleTransaction } from '@sentry/core';
import type { BeforeFinishCallback } from '@sentry/core/types/tracing/idletransaction';
import type { BeforeFinishCallback, IdleTransaction } from '@sentry/core';
import { logger } from '@sentry/utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/js/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export const NATIVE: SentryNativeWrapper = {

if (NATIVE.platform === 'android') {
if ('message' in event) {
// @ts-ignore Android still uses the old message object, without this the serialization of events will break.
// @ts-expect-error Android still uses the old message object, without this the serialization of events will break.
event.message = { message: event.message };
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('Tests ReactNativeClient', () => {
});

await expect(client.eventFromMessage('test')).resolves.toBeDefined();
// @ts-ignore: Is Mocked
// @ts-expect-error: Is Mocked
await expect(RN.LogBox.ignoreLogs).toBeCalled();
});

Expand Down
20 changes: 10 additions & 10 deletions test/integrations/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ describe('Tests the Release integration', () => {

let eventProcessor: EventProcessor = () => null;

// @ts-ignore Mock
// @ts-expect-error Mock
addGlobalEventProcessor.mockImplementation(e => (eventProcessor = e));
releaseIntegration.setupOnce();

expect(addGlobalEventProcessor).toBeCalled();

const client = getCurrentHub().getClient();

// @ts-ignore Mock
// @ts-expect-error Mock
client.getOptions.mockImplementation(() => ({}));

const event = await eventProcessor({}, {});
Expand All @@ -60,13 +60,13 @@ describe('Tests the Release integration', () => {

let eventProcessor: EventProcessor = () => null;

// @ts-ignore Mock
// @ts-expect-error Mock
addGlobalEventProcessor.mockImplementation(e => (eventProcessor = e));
releaseIntegration.setupOnce();

const client = getCurrentHub().getClient();

// @ts-ignore Mock
// @ts-expect-error Mock
client.getOptions.mockImplementation(() => ({
dist: 'options_dist',
}));
Expand All @@ -82,13 +82,13 @@ describe('Tests the Release integration', () => {

let eventProcessor: EventProcessor = () => null;

// @ts-ignore Mock
// @ts-expect-error Mock
addGlobalEventProcessor.mockImplementation(e => (eventProcessor = e));
releaseIntegration.setupOnce();

const client = getCurrentHub().getClient();

// @ts-ignore Mock
// @ts-expect-error Mock
client.getOptions.mockImplementation(() => ({
release: 'options_release',
}));
Expand All @@ -104,15 +104,15 @@ describe('Tests the Release integration', () => {

let eventProcessor: EventProcessor = () => null;

// @ts-ignore Mock
// @ts-expect-error Mock
addGlobalEventProcessor.mockImplementation(e => (eventProcessor = e));
releaseIntegration.setupOnce();

expect(addGlobalEventProcessor).toBeCalled();

const client = getCurrentHub().getClient();

// @ts-ignore Mock
// @ts-expect-error Mock
client.getOptions.mockImplementation(() => ({
dist: 'options_dist',
release: 'options_release',
Expand All @@ -129,15 +129,15 @@ describe('Tests the Release integration', () => {

let eventProcessor: EventProcessor = () => null;

// @ts-ignore Mock
// @ts-expect-error Mock
addGlobalEventProcessor.mockImplementation(e => (eventProcessor = e));
releaseIntegration.setupOnce();

expect(addGlobalEventProcessor).toBeCalled();

const client = getCurrentHub().getClient();

// @ts-ignore Mock
// @ts-expect-error Mock
client.getOptions.mockImplementation(() => ({
dist: 'options_dist',
release: 'options_release',
Expand Down
8 changes: 4 additions & 4 deletions test/sdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('Tests the SDK functionality', () => {
(NATIVE.isNativeAvailable as jest.Mock).mockImplementation(() => false);
init({});
expect(NATIVE.isNativeAvailable).toBeCalled();
// @ts-ignore enableNative not publicly available here.
// @ts-expect-error enableNative not publicly available here.
expect(usedOptions()?.enableNative).toEqual(false);
expect(usedOptions()?.transport).toEqual(makeFetchTransport);
});
Expand All @@ -226,7 +226,7 @@ describe('Tests the SDK functionality', () => {
(NATIVE.isNativeAvailable as jest.Mock).mockImplementation(() => false);
init({ enableNative: true });
expect(NATIVE.isNativeAvailable).toBeCalled();
// @ts-ignore enableNative not publicly available here.
// @ts-expect-error enableNative not publicly available here.
expect(usedOptions()?.enableNative).toEqual(false);
expect(usedOptions()?.transport).toEqual(makeFetchTransport);
});
Expand All @@ -235,7 +235,7 @@ describe('Tests the SDK functionality', () => {
(NATIVE.isNativeAvailable as jest.Mock).mockImplementation(() => false);
init({ enableNative: false });
expect(NATIVE.isNativeAvailable).not.toBeCalled();
// @ts-ignore enableNative not publicly available here.
// @ts-expect-error enableNative not publicly available here.
expect(usedOptions()?.enableNative).toEqual(false);
expect(usedOptions()?.transport).toEqual(makeFetchTransport);
});
Expand All @@ -248,7 +248,7 @@ describe('Tests the SDK functionality', () => {
});
expect(usedOptions()?.transport).toEqual(mockTransport);
expect(NATIVE.isNativeAvailable).toBeCalled();
// @ts-ignore enableNative not publicly available here.
// @ts-expect-error enableNative not publicly available here.
expect(usedOptions()?.enableNative).toEqual(false);
});
});
Expand Down
8 changes: 4 additions & 4 deletions test/touchevents.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('TouchEventBoundary._onTouchStart', () => {
},
};

// @ts-ignore Calling private member
// @ts-expect-error Calling private member
boundary._onTouchStart(event);

expect(addBreadcrumb).not.toBeCalled();
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('TouchEventBoundary._onTouchStart', () => {
},
};

// @ts-ignore Calling private member
// @ts-expect-error Calling private member
boundary._onTouchStart(event);

expect(addBreadcrumb).toBeCalledWith({
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('TouchEventBoundary._onTouchStart', () => {
},
};

// @ts-ignore Calling private member
// @ts-expect-error Calling private member
boundary._onTouchStart(event);

expect(addBreadcrumb).toBeCalledWith({
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('TouchEventBoundary._onTouchStart', () => {
},
};

// @ts-ignore Calling private member
// @ts-expect-error Calling private member
boundary._onTouchStart(event);

expect(addBreadcrumb).toBeCalledWith({
Expand Down
18 changes: 9 additions & 9 deletions test/tracing/reactnativetracing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ describe('ReactNativeTracing', () => {
expect(transaction.op).toBe(UI_LOAD);

expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_COLD].value,
).toEqual(timeOriginMilliseconds - appStartTimeMilliseconds);
expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_COLD].unit,
).toBe('millisecond');
}
Expand Down Expand Up @@ -163,11 +163,11 @@ describe('ReactNativeTracing', () => {
expect(transaction.op).toBe(UI_LOAD);

expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_WARM].value,
).toEqual(timeOriginMilliseconds - appStartTimeMilliseconds);
expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_WARM].unit,
).toBe('millisecond');
}
Expand Down Expand Up @@ -198,12 +198,12 @@ describe('ReactNativeTracing', () => {

if (transaction) {
expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_WARM],
).toBeUndefined();

expect(
// @ts-ignore access private for test
// @ts-expect-error access private for test
transaction._measurements[APP_START_COLD],
).toBeUndefined();
}
Expand Down Expand Up @@ -271,7 +271,7 @@ describe('ReactNativeTracing', () => {
// trigger idle transaction to finish and call before finish callbacks
jest.advanceTimersByTime(DEFAULT_IDLE_TIMEOUT);

// @ts-ignore access private for test
// @ts-expect-error access private for test
expect(routeTransaction._measurements[APP_START_COLD].value).toBe(
timeOriginMilliseconds - appStartTimeMilliseconds,
);
Expand Down Expand Up @@ -327,7 +327,7 @@ describe('ReactNativeTracing', () => {
// trigger idle transaction to finish and call before finish callbacks
jest.advanceTimersByTime(DEFAULT_IDLE_TIMEOUT);

// @ts-ignore access private for test
// @ts-expect-error access private for test
expect(routeTransaction._measurements[APP_START_WARM].value).toBe(
timeOriginMilliseconds - appStartTimeMilliseconds,
);
Expand Down Expand Up @@ -383,7 +383,7 @@ describe('ReactNativeTracing', () => {
// trigger idle transaction to finish and call before finish callbacks
jest.advanceTimersByTime(DEFAULT_IDLE_TIMEOUT);

// @ts-ignore access private for test
// @ts-expect-error access private for test
expect(routeTransaction._measurements).toMatchObject({});

expect(routeTransaction.op).not.toBe(UI_LOAD);
Expand Down
4 changes: 2 additions & 2 deletions test/vendor/buffer/utf8ToBytes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ describe('Buffer utf8 tests', () => {
describe('test strings', () => {
for (const input of testCases) {
it(`should encode "${input}"`, () => {
// @ts-ignore The test run in node where Buffer is available
// @ts-expect-error The test run in node where Buffer is available
const actual = Buffer.from(utf8ToBytes(input));
// @ts-ignore The test run in node where Buffer is available
// @ts-expect-error The test run in node where Buffer is available
const expected = Buffer.from(input, 'utf8');

expect(actual).toEqual(expected);
Expand Down
Loading