-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from torusresearch/feat/update-deps
update deps
- Loading branch information
Showing
11 changed files
with
2,626 additions
and
2,236 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as Sentry from "@sentry/node"; | ||
import { LoglevelSentry, redactBreadcrumbData } from "@toruslabs/loglevel-sentry"; | ||
import log from "loglevel"; | ||
|
||
import redact from "./redactSentry"; | ||
|
||
const sentryDsn = process.env.SENTRY_DSN; | ||
|
||
if (sentryDsn) { | ||
Sentry.init({ | ||
dsn: sentryDsn, | ||
environment: process.env.NODE_ENV, | ||
integrations: [ | ||
// enable HTTP calls | ||
Sentry.httpIntegration({ breadcrumbs: true }), | ||
|
||
// application not responding detection. | ||
Sentry.anrIntegration({ captureStackTrace: true }), | ||
], | ||
tracesSampleRate: process.env.SENTRY_TRACES_SAMPLE_RATE ? Number(process.env.SENTRY_TRACES_SAMPLE_RATE) : 0.01, | ||
sampleRate: process.env.SENTRY_SAMPLE_RATE ? Number(process.env.SENTRY_SAMPLE_RATE) : 0.1, | ||
beforeSend(event) { | ||
return redact(event); | ||
}, | ||
beforeBreadcrumb(breadcrumb) { | ||
return redactBreadcrumbData(breadcrumb); | ||
}, | ||
}); | ||
|
||
const plugin = new LoglevelSentry(Sentry); | ||
plugin.install(log); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
import Register from "@babel/register"; | ||
import register from "@babel/register"; | ||
|
||
Register({ | ||
import currentPkg from "../package.json" assert { type: "json" }; | ||
|
||
const runtimeVersion = currentPkg.peerDependencies["@babel/runtime"]; | ||
|
||
register({ | ||
presets: [["@babel/env", { bugfixes: true }], "@babel/typescript"], | ||
plugins: [ | ||
"@babel/plugin-syntax-bigint", | ||
"@babel/plugin-transform-object-rest-spread", | ||
"@babel/plugin-transform-class-properties", | ||
["@babel/transform-runtime", { version: runtimeVersion }], | ||
"@babel/plugin-transform-numeric-separator", | ||
], | ||
sourceType: "unambiguous", | ||
extensions: [".ts", ".js"], | ||
rootMode: "upward", | ||
}); |