@vuedx/shared
Advanced tools
Comparing version 0.6.1-insiders-1610883378.0 to 0.6.1-insiders-1610891537.0
@@ -10,2 +10,3 @@ 'use strict'; | ||
const uuid = require('uuid'); | ||
const util = require('util'); | ||
@@ -204,4 +205,4 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
return; | ||
if (typeof payload === 'string') { | ||
payload = new Error(payload); | ||
if (!(payload instanceof Error)) { | ||
payload = new Error(util.inspect(payload, true, 3, false)); | ||
} | ||
@@ -208,0 +209,0 @@ void Sentry.captureException(payload, { |
@@ -53,3 +53,3 @@ /// <reference types="vscode" /> | ||
collect(key: string, value: Record<string, any>): void; | ||
error(payload: string | Error): void; | ||
error(payload: any | Error): void; | ||
private static _instance?; | ||
@@ -56,0 +56,0 @@ static get instance(): Telemetry; |
@@ -6,2 +6,3 @@ import Path from 'path'; | ||
import { v4 } from 'uuid'; | ||
import { inspect } from 'util'; | ||
@@ -195,4 +196,4 @@ function isNotNull(value) { | ||
return; | ||
if (typeof payload === 'string') { | ||
payload = new Error(payload); | ||
if (!(payload instanceof Error)) { | ||
payload = new Error(inspect(payload, true, 3, false)); | ||
} | ||
@@ -199,0 +200,0 @@ void captureException(payload, { |
{ | ||
"name": "@vuedx/shared", | ||
"version": "0.6.1-insiders-1610883378.0", | ||
"version": "0.6.1-insiders-1610891537.0", | ||
"main": "dist/index.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.esm.js", |
@@ -5,2 +5,3 @@ import * as Sentry from '@sentry/node' | ||
import { v4 as uuid } from 'uuid' | ||
import { inspect } from 'util' | ||
@@ -124,6 +125,6 @@ interface Options { | ||
error(payload: string | Error): void { | ||
error(payload: any | Error): void { | ||
if (this.optOut) return | ||
if (typeof payload === 'string') { | ||
payload = new Error(payload) | ||
if (!(payload instanceof Error)) { | ||
payload = new Error(inspect(payload, true, 3, false)) | ||
} | ||
@@ -130,0 +131,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62997
914