diff --git a/package.json b/package.json
index 2f8a8ce..a663859 100644
--- a/package.json
+++ b/package.json
@@ -16,28 +16,29 @@
"plugin.watch": "npm run plugin.watch.tsc & npm run plugin.watch.android & npm run plugin.watch.ios"
},
"devDependencies": {
- "@commitlint/cli": "^9.1.2",
- "@commitlint/config-conventional": "^9.1.2",
- "@nativescript/core": "6.3.2",
- "@sentry/browser": "^5.22.3",
- "@sentry/core": "^5.22.3",
- "@sentry/hub": "^5.22.3",
- "@sentry/integrations": "^5.22.3",
- "@sentry/minimal": "^5.22.3",
- "@sentry/types": "^5.22.3",
- "@sentry/utils": "^5.22.3",
- "@types/node": "^13.5.0",
- "@typescript-eslint/eslint-plugin": "4.0.1",
- "@typescript-eslint/parser": "4.0.1",
- "eslint": "7.8.1",
- "husky": "^4.2.5",
+ "@commitlint/cli": "^11.0.0",
+ "@commitlint/config-conventional": "^11.0.0",
+ "@nativescript/core": "7.0.13",
+ "@nativescript/types-ios": "7.0.4",
+ "@nativescript/types-android": "7.0.4",
+ "@sentry/browser": "^5.27.2",
+ "@sentry/core": "^5.27.2",
+ "@sentry/hub": "^5.27.2",
+ "@sentry/integrations": "^5.27.2",
+ "@sentry/minimal": "^5.27.2",
+ "@sentry/types": "^5.27.2",
+ "@sentry/utils": "^5.27.2",
+ "@types/node": "^14.14.6",
+ "@typescript-eslint/eslint-plugin": "4.6.0",
+ "@typescript-eslint/parser": "4.6.0",
+ "eslint": "7.12.1",
+ "husky": "^4.3.0",
"lerna": "^3.22.1",
"npm-watch": "^0.7.0",
"prompt": "^1.0.0",
"rimraf": "^3.0.2",
"stacktrace-parser": "^0.1.10",
- "tns-platform-declarations": "^6.5.15",
- "typescript": "~4.0.2"
+ "typescript": "~3.9.7"
},
"repository": {
"type": "git",
diff --git a/plugin/package.json b/plugin/package.json
index 991d7d6..5f6f664 100644
--- a/plugin/package.json
+++ b/plugin/package.json
@@ -30,15 +30,15 @@
},
"homepage": "https://github.com/Akylas/nativescript-akylas-sentry#readme",
"dependencies": {
- "@sentry/browser": "^5.22.3",
- "@sentry/core": "^5.22.3",
- "@sentry/hub": "^5.22.3",
- "@sentry/integrations": "^5.22.3",
- "@sentry/minimal": "^5.22.3",
- "@sentry/types": "^5.22.3",
- "@sentry/utils": "^5.22.3",
+ "@sentry/browser": "^5.27.2",
+ "@sentry/core": "^5.27.2",
+ "@sentry/hub": "^5.27.2",
+ "@sentry/integrations": "^5.27.2",
+ "@sentry/minimal": "^5.27.2",
+ "@sentry/types": "^5.27.2",
+ "@sentry/utils": "^5.27.2",
"@sentry/wizard": "^1.1.4",
"stacktrace-parser": "0.1.10"
},
"gitHead": "1e799d9f3a3eeb19c0fc4188be82a6cded4ea727"
-}
+}
\ No newline at end of file
diff --git a/references.d.ts b/references.d.ts
index 9544b82..7687ab6 100644
--- a/references.d.ts
+++ b/references.d.ts
@@ -1,2 +1,3 @@
-///
-///
+/* eslint-disable spaced-comment */
+///
+///
diff --git a/src/index.ts b/src/index.ts
index 0f68f50..b5c494d 100755
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,4 +1,3 @@
-const misc = require('@sentry/utils/esm/misc');
import { logger } from '@sentry/utils';
logger.disable(); // this crashes for {N} for now
export { Breadcrumb, Request, SdkInfo, Event, Exception, Response, Severity, StackFrame, Stacktrace, Status, Thread, User } from '@sentry/types';
diff --git a/src/integrations/debugsymbolicator.ts b/src/integrations/debugsymbolicator.ts
index b3bcede..171b04c 100755
--- a/src/integrations/debugsymbolicator.ts
+++ b/src/integrations/debugsymbolicator.ts
@@ -90,7 +90,8 @@ export class DebugSymbolicator implements Integration {
if (!self || hint === undefined || hint.originalException === undefined) {
return event;
}
- const error: NativescriptError = hint.originalException as any;
+ // @ts-ignore
+ const error: NativescriptError = hint.originalException;
// const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
const stack = parseErrorStack(error);
diff --git a/src/integrations/nativescripterrorhandlers.ts b/src/integrations/nativescripterrorhandlers.ts
index 39e9d74..ca67a7d 100755
--- a/src/integrations/nativescripterrorhandlers.ts
+++ b/src/integrations/nativescripterrorhandlers.ts
@@ -5,8 +5,7 @@ import { logger } from '@sentry/utils';
import { NativescriptClient } from '../client';
-import * as application from '@nativescript/core/application';
-import * as trace from '@nativescript/core/trace';
+import {Application, Trace} from '@nativescript/core';
/** NativescriptErrorHandlers Options */
export interface NativescriptErrorHandlersOptions {
@@ -53,7 +52,7 @@ export class NativescriptErrorHandlers implements Integration {
*/
private _handleUnhandledRejections(): void {
if (this._options.uncaughtErrors) {
- application.on(application.uncaughtErrorEvent, this.globalHanderEvent, this);
+ Application.on(Application.uncaughtErrorEvent, this.globalHanderEvent, this);
// const tracking = require('promise/setimmediate/rejection-tracking');
// tracking.disable();
// tracking.enable({
@@ -110,6 +109,7 @@ export class NativescriptErrorHandlers implements Integration {
// Just for a better dev experience
if (client) {
const timeout = client.getOptions().shutdownTimeout || 2000;
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
(client.flush(timeout) as Promise)
.then(() => {
// defaultHandler(error, isFatal);
@@ -129,9 +129,9 @@ export class NativescriptErrorHandlers implements Integration {
private _handleOnError(): void {
if (this._options.traceErrorHandler) {
// let handlingFatal = false;
- application.on(application.discardedErrorEvent, this.globalHanderEvent, this);
+ Application.on(Application.discardedErrorEvent, this.globalHanderEvent, this);
- trace.setErrorHandler({
+ Trace.setErrorHandler({
handlerError: this.globalHander
});
// const defaultHandler = ErrorUtils.getGlobalHandler && ErrorUtils.getGlobalHandler();
diff --git a/src/nssentry.android.ts b/src/nssentry.android.ts
index 0fe2b90..122306c 100644
--- a/src/nssentry.android.ts
+++ b/src/nssentry.android.ts
@@ -1,4 +1,4 @@
-import { android as appAndroid } from '@nativescript/core/application';
+import { Application } from '@nativescript/core';
import { Event, Response, Status } from '@sentry/types';
import { NativescriptOptions } from './backend';
import { rewriteFrameIntegration } from './sdk';
@@ -9,7 +9,7 @@ export namespace NSSentry {
export const nativeTransport = true;
export function fetchRelease() {
- const ctx = appAndroid.context as android.content.Context;
+ const ctx = Application.android.context as android.content.Context;
const packageInfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
return {
id: packageInfo.packageName,
@@ -322,7 +322,7 @@ export namespace NSSentry {
try {
io.sentry.android.core.SentryAndroid.init(
- appAndroid.context,
+ Application.android.context,
new io.sentry.core.Sentry.OptionsConfiguration({
configure(config) {
config.setLogger(new io.sentry.core.SystemOutLogger());
diff --git a/tsconfig.json b/tsconfig.json
index 2a278e0..6c75b2a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -23,8 +23,7 @@
"outDir": "./plugin",
"rootDir": "src",
"paths": {
- "nativescript-akylas-sentry": ["./src/index"],
- "*": ["./node_modules/tns-core-modules/*", "./node_modules/*"]
+ "@nativescript-community/sentry": ["./src/index"]
}
},
"include": ["src/**/*.ts", "references.d.ts", "src/references.d.ts"],