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

Bump: @sentry/javascript dependencies to 6.19.2 #2175

Merged
merged 6 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 17 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@ module.exports = {
root: true,
env: {
node: true,
"react-native/react-native": true,
'react-native/react-native': true,
},
extends: ["@sentry-internal/sdk"],
plugins: ["@sentry-internal/sdk"],
extends: ['@sentry-internal/sdk'],
plugins: ['@sentry-internal/sdk'],
parserOptions: {
project: "./tsconfig.json",
project: './tsconfig.json',
},
settings: {
version: "detect", // React version. "detect" automatically picks the version you have installed.
version: 'detect', // React version. "detect" automatically picks the version you have installed.
},
overrides: [
{
// Typescript Files
files: ["*.ts", "*.tsx"],
extends: ["plugin:react/recommended"],
plugins: ["react", "react-native"],
files: ['*.ts', '*.tsx'],
extends: ['plugin:react/recommended'],
plugins: ['react', 'react-native'],
rules: {
"@typescript-eslint/typedef": [
"error",
'@typescript-eslint/typedef': [
'error',
{ arrowParameter: false, variableDeclarationIgnoreFunction: true },
],
},
},
{
// Test Files
files: ["*.test.ts", "*.test.tsx", "*.test.js", "*.test.jsx"],
files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.test.jsx'],
rules: {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
// Scripts
files: ["scripts/*"],
files: ['scripts/*'],
parserOptions: {
ecmaVersion: 2015,
},
rules: {
"no-console": "off",
'no-console': 'off',
},
},
],
rules: {
// Bundle size isn't too much of an issue for React Native.
"@sentry-internal/sdk/no-async-await": "off",
'@sentry-internal/sdk/no-async-await': 'off',
},
};
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
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
presets: ['module:metro-react-native-babel-preset'],
};
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
8 changes: 4 additions & 4 deletions react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ module.exports = {
dependency: {
platforms: {
ios: {
sharedLibraries: ["libz"]
sharedLibraries: ['libz']
},
android: {
packageInstance: "new RNSentryPackage()"
packageInstance: 'new RNSentryPackage()'
}
},
hooks: {
postlink:
"node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android",
'node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android',
postunlink:
"node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android --uninstall"
'node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android --uninstall'
}
}
};
12 changes: 6 additions & 6 deletions sample/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import ReduxScreen from './screens/ReduxScreen';
import {store} from './reduxApp';
import {SENTRY_INTERNAL_DSN} from './dsn';

const reactNavigationInstrumentation = new Sentry.ReactNavigationInstrumentation(
{
const reactNavigationInstrumentation =
new Sentry.ReactNavigationInstrumentation({
routeChangeTimeoutMs: 500, // How long it will wait for the route change to complete. Default is 1000ms
},
);
});
Sentry.init({
// Replace the example DSN below with your own DSN:
dsn: SENTRY_INTERNAL_DSN,
Expand Down Expand Up @@ -60,8 +59,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
6 changes: 1 addition & 5 deletions sample/src/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import {
View,
} from 'react-native';
import {StackNavigationProp} from '@react-navigation/stack';
import {
CommonActions,
useNavigation,
useNavigationState,
} from '@react-navigation/native';
import {CommonActions} from '@react-navigation/native';

import * as Sentry from '@sentry/react-native';

Expand Down
2 changes: 1 addition & 1 deletion sample/utils/fetchEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Event} from '@sentry/types';
import fetch from 'node-fetch';

const domain = 'sentry.io';
const eventEndpoint = `/api/0/projects/sentry-sdks/sentry-react-native/events/`;
const eventEndpoint = '/api/0/projects/sentry-sdks/sentry-react-native/events/';

interface ApiEvent extends Event {
/**
Expand Down
10 changes: 5 additions & 5 deletions scripts/version-bump.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const replace = require("replace-in-file");
const replace = require('replace-in-file');

const pjson = require("../package.json");
const pjson = require('../package.json');

replace({
files: ["src/js/version.ts"],
files: ['src/js/version.ts'],
from: /\d+\.\d+.\d+(?:-\w+(?:\.\w+)?)?/g,
to: pjson.version,
})
.then((changedFiles) => {
console.log("Modified files:", changedFiles.join(", "));
console.log('Modified files:', changedFiles.join(', '));
})
.catch((error) => {
console.error("Error occurred:", error);
console.error('Error occurred:', error);
});
24 changes: 12 additions & 12 deletions src/js/backend.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { BrowserBackend } from "@sentry/browser/dist/backend";
import { BaseBackend, NoopTransport } from "@sentry/core";
import { BrowserOptions, Transports } from "@sentry/react";
import { Event, EventHint, Severity, Transport } from "@sentry/types";
import { BrowserBackend } from '@sentry/browser/dist/backend';
import { BaseBackend, NoopTransport } from '@sentry/core';
import { BrowserOptions, Transports } from '@sentry/react';
import { Event, EventHint, Severity, Transport } from '@sentry/types';
// @ts-ignore LogBox introduced in RN 0.63
import { Alert, LogBox, YellowBox } from "react-native";
import { Alert, LogBox, YellowBox } from 'react-native';

import { ReactNativeOptions } from "./options";
import { NativeTransport } from "./transports/native";
import { NATIVE } from "./wrapper";
import { ReactNativeOptions } from './options';
import { NativeTransport } from './transports/native';
import { NATIVE } from './wrapper';

/** The Sentry ReactNative SDK Backend. */
export class ReactNativeBackend extends BaseBackend<BrowserOptions> {
Expand All @@ -22,10 +22,10 @@ export class ReactNativeBackend extends BaseBackend<BrowserOptions> {
// YellowBox deprecated and replaced with with LogBox in RN 0.63
if (LogBox) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
LogBox.ignoreLogs(["Require cycle:"]);
LogBox.ignoreLogs(['Require cycle:']);
} else {
// eslint-disable-next-line deprecation/deprecation
YellowBox.ignoreWarnings(["Require cycle:"]);
YellowBox.ignoreWarnings(['Require cycle:']);
}

void this._initNativeSdk();
Expand Down Expand Up @@ -110,8 +110,8 @@ export class ReactNativeBackend extends BaseBackend<BrowserOptions> {
private _showCannotConnectDialog(): void {
if (__DEV__ && this._options.enableNativeNagger) {
Alert.alert(
"Sentry",
"Warning, could not connect to Sentry native SDK.\nIf you do not want to use the native component please pass `enableNative: false` in the options.\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details."
'Sentry',
'Warning, could not connect to Sentry native SDK.\nIf you do not want to use the native component please pass `enableNative: false` in the options.\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.'
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/js/client.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BaseClient } from "@sentry/core";
import { BaseClient } from '@sentry/core';

import { ReactNativeBackend } from "./backend";
import { ReactNativeOptions } from "./options";
import { NATIVE } from "./wrapper";
import { ReactNativeBackend } from './backend';
import { ReactNativeOptions } from './options';
import { NATIVE } from './wrapper';

/**
* The Sentry React Native SDK Client.
Expand Down
4 changes: 2 additions & 2 deletions src/js/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Breadcrumb, Package } from "@sentry/types";
import { Breadcrumb, Package } from '@sentry/types';

import { ReactNativeOptions } from "./options";
import { ReactNativeOptions } from './options';

export type NativeAppStartResponse = {
isColdStart: boolean;
Expand Down
26 changes: 13 additions & 13 deletions src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export {
EventStatus,
Thread,
User,
} from "@sentry/types";
} from '@sentry/types';

export {
addGlobalEventProcessor,
Expand All @@ -32,14 +32,14 @@ export {
setUser,
startTransaction,
withScope,
} from "@sentry/core";
} from '@sentry/core';

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

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

export {
Expand All @@ -50,14 +50,14 @@ export {
Profiler,
useProfiler,
withProfiler,
} from "@sentry/react";
} from '@sentry/react';

import * as Integrations from "./integrations";
import { SDK_NAME, SDK_VERSION } from "./version";
import * as Integrations from './integrations';
import { SDK_NAME, SDK_VERSION } from './version';

export { ReactNativeBackend } from "./backend";
export { ReactNativeOptions } from "./options";
export { ReactNativeClient } from "./client";
export { ReactNativeBackend } from './backend';
export { ReactNativeOptions } from './options';
export { ReactNativeClient } from './client';

export {
init,
Expand All @@ -69,8 +69,8 @@ export {
nativeCrash,
flush,
close,
} from "./sdk";
export { TouchEventBoundary, withTouchEventBoundary } from "./touchevents";
} from './sdk';
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';

export {
ReactNativeTracing,
Expand All @@ -81,6 +81,6 @@ export {
ReactNativeNavigationInstrumentation,
RoutingInstrumentation,
ReactNavigationTransactionContext,
} from "./tracing";
} from './tracing';

export { Integrations, SDK_NAME, SDK_VERSION };
Loading