Support the single argument options only config API

`Raven.config` supports calling it with only the configuration object if
you'd like the DSN to be pulled from environment variables

https://github.com/getsentry/raven-node/blob/6ce861f9f3fabdeba37013ff1d7dedc3eb6f7a80/lib/client.js#L44-L47
This commit is contained in:
Daniel Herman
2018-02-12 14:37:29 -05:00
parent 69df2727ee
commit c5f2ca04af
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ import { IncomingMessage, ServerResponse } from 'http';
import { EventEmitter } from 'events';
export const version: string;
export function config(options?: ConstructorOptions): Client;
export function config(dsn?: string | false, options?: ConstructorOptions): Client;
export function wrap<T>(func: () => T): () => T;
export function wrap<T>(options: any, func: () => T): () => T;
+4
View File
@@ -9,6 +9,10 @@ Raven.config(dsn, {
autoBreadcrumbs: false,
});
console.log(Raven.version);
Raven.config({
release: 'foobar'
});
Raven.config(dsn).install({ captureUnhandledRejections: true });
client.setContext({});
client.on('logged', () => { });