Skip to content

Bump: @sentry/javascript dependencies to 6.19.2 #2175

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

Merged
merged 6 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- fix: Respect given release if no dist is given during SDK init (#2163)
- Bump: @sentry/javascript dependencies to 6.19.2 (#2175)

## 3.3.5

Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
"react-native": ">=0.56.0"
},
"dependencies": {
"@sentry/browser": "6.17.9",
"@sentry/cli": "^1.72.0",
"@sentry/core": "6.17.9",
"@sentry/hub": "6.17.9",
"@sentry/integrations": "6.17.9",
"@sentry/react": "6.17.9",
"@sentry/tracing": "6.17.9",
"@sentry/types": "6.17.9",
"@sentry/utils": "6.17.9",
"@sentry/browser": "6.19.2",
"@sentry/cli": "^1.74.2",
"@sentry/core": "6.19.2",
"@sentry/hub": "6.19.2",
"@sentry/integrations": "6.19.2",
"@sentry/react": "6.19.2",
"@sentry/tracing": "6.19.2",
"@sentry/types": "6.19.2",
"@sentry/utils": "6.19.2",
"@sentry/wizard": "^1.2.17"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "6.17.9",
"@sentry-internal/eslint-plugin-sdk": "6.17.9",
"@sentry/typescript": "^5.20.0",
"@sentry-internal/eslint-config-sdk": "6.19.2",
"@sentry-internal/eslint-plugin-sdk": "6.19.2",
"@sentry/typescript": "^5.20.1",
"@types/jest": "^26.0.15",
"@types/react": "^16.9.49",
"@types/react-native": "^0.66.11",
Expand Down
5 changes: 3 additions & 2 deletions sample/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ Sentry.init({
tracesSampleRate: 1.0,
// Sets the `release` and `dist` on Sentry events. Make sure this matches EXACTLY with the values on your sourcemaps
// otherwise they will not work.
release: '[email protected]+1',
dist: `1`,
// release: '[email protected]+1',
// dist: `1`,
Comment on lines +62 to +63
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jennmueng do you remember why did we hard-coded the release and dist in the samples? that makes our sample symbolication not work automatically.

Copy link
Member

Choose a reason for hiding this comment

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

@marandaneto That was just to provide an example of the option being used I think

attachStacktrace: true,
});

const Stack = createStackNavigator();
Expand Down
44 changes: 22 additions & 22 deletions src/js/integrations/reactnativeerrorhandlers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { eventFromException } from "@sentry/browser";
import { getCurrentHub } from "@sentry/core";
import { Integration, Severity } from "@sentry/types";
import { addExceptionMechanism, getGlobalObject, logger } from "@sentry/utils";
import { eventFromException } from '@sentry/browser';
import { getCurrentHub } from '@sentry/core';
import { Integration, Severity } from '@sentry/types';
import { addExceptionMechanism, getGlobalObject, logger } from '@sentry/utils';

import { ReactNativeClient } from "../client";
import { ReactNativeClient } from '../client';

/** ReactNativeErrorHandlers Options */
interface ReactNativeErrorHandlersOptions {
Expand All @@ -25,7 +25,7 @@ export class ReactNativeErrorHandlers implements Integration {
/**
* @inheritDoc
*/
public static id: string = "ReactNativeErrorHandlers";
public static id: string = 'ReactNativeErrorHandlers';

/**
* @inheritDoc
Expand Down Expand Up @@ -79,16 +79,16 @@ export class ReactNativeErrorHandlers implements Integration {
/* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */
const {
polyfillGlobal,
} = require("react-native/Libraries/Utilities/PolyfillFunctions");
} = require('react-native/Libraries/Utilities/PolyfillFunctions');

// Below, we follow the exact way React Native initializes its promise library, and we globally replace it.
const Promise = require("promise/setimmediate/es6-extensions");
const Promise = require('promise/setimmediate/es6-extensions');

// As of RN 0.67 only done and finally are used
require("promise/setimmediate/done");
require("promise/setimmediate/finally");
require('promise/setimmediate/done');
require('promise/setimmediate/finally');

polyfillGlobal("Promise", () => Promise);
polyfillGlobal('Promise', () => Promise);
/* eslint-enable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */
}
/**
Expand All @@ -99,7 +99,7 @@ export class ReactNativeErrorHandlers implements Integration {
disable: () => void;
enable: (arg: unknown) => void;
// eslint-disable-next-line import/no-extraneous-dependencies,@typescript-eslint/no-var-requires
} = require("promise/setimmediate/rejection-tracking");
} = require('promise/setimmediate/rejection-tracking');

const promiseRejectionTrackingOptions: PromiseRejectionTrackingOptions = {
onUnhandled: (id, rejection = {}) => {
Expand All @@ -112,7 +112,7 @@ export class ReactNativeErrorHandlers implements Integration {
// eslint-disable-next-line no-console
console.warn(
`Promise Rejection Handled (id: ${id})\n` +
"This means you can ignore any previous messages of the form " +
'This means you can ignore any previous messages of the form ' +
`"Possible Unhandled Promise Rejection (id: ${id}):"`
);
},
Expand Down Expand Up @@ -141,21 +141,21 @@ export class ReactNativeErrorHandlers implements Integration {
private _checkPromiseAndWarn(): void {
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies
const Promise = require("promise/setimmediate/es6-extensions");
const Promise = require('promise/setimmediate/es6-extensions');

const _global = getGlobalObject<{ Promise: typeof Promise }>();

if (Promise !== _global.Promise) {
logger.warn(
"Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page."
'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'
);
} else {
logger.log("Unhandled promise rejections will be caught by Sentry.");
logger.log('Unhandled promise rejections will be caught by Sentry.');
}
} catch (e) {
// Do Nothing
logger.warn(
"Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page."
'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.'
);
}
}
Expand All @@ -176,7 +176,7 @@ export class ReactNativeErrorHandlers implements Integration {
if (shouldHandleFatal) {
if (handlingFatal) {
logger.log(
"Encountered multiple fatals in a row. The latest:",
'Encountered multiple fatals in a row. The latest:',
error
);
return;
Expand All @@ -189,7 +189,7 @@ export class ReactNativeErrorHandlers implements Integration {

if (!client) {
logger.error(
"Sentry client is missing, the error event might be lost.",
'Sentry client is missing, the error event might be lost.',
error
);

Expand All @@ -201,16 +201,16 @@ export class ReactNativeErrorHandlers implements Integration {

const options = client.getOptions();

const event = await eventFromException(options, error, {
const event = await eventFromException(error, {
originalException: error,
});
}, options.attachStacktrace);

if (isFatal) {
event.level = Severity.Fatal;

addExceptionMechanism(event, {
handled: false,
type: "onerror",
type: 'onerror',
});
}

Expand Down
Loading