@launchtray/hatch-util
Advanced tools
Comparing version 0.1.8 to 0.1.9
{ | ||
"files": { | ||
"libraries/hatch-util/CHANGELOG.json": "45e817db2a8457d0239a09f1596b19750ac5d04a", | ||
"libraries/hatch-util/CHANGELOG.md": "9ea76d4625096d864158c031549b48fed9115d67", | ||
"libraries/hatch-util/package.json": "851b44e8b6ed2be7e957dffcbac8e6b5517ba5ed", | ||
"libraries/hatch-util/CHANGELOG.json": "356738924a5a88f3c196e449ac19aaf73998821e", | ||
"libraries/hatch-util/CHANGELOG.md": "586c8f58fdd0f8a7dad3d42710e044f8fac9afc1", | ||
"libraries/hatch-util/package.json": "3409a0a2738a9b2763ad57133d93f4bc2cef23ee", | ||
"libraries/hatch-util/src/CompletableFuture.ts": "e08e2f763c96c4362f17df0dae9c0897ec550a8e", | ||
@@ -12,3 +12,3 @@ "libraries/hatch-util/src/ConsoleLogger.ts": "5539e296824fe8c8b148d17516e9284ce0a87d44", | ||
"libraries/hatch-util/src/SentryMonitor.ts": "6f06b1fb54e9b26200e66fe2898f76d5c9534b43", | ||
"libraries/hatch-util/src/SentryReporter.ts": "f6f3c29734d4579697b6d80198947665ccc2ca85", | ||
"libraries/hatch-util/src/SentryReporter.ts": "721b223c2e5d9389ec09df66105c98edd39b7689", | ||
"libraries/hatch-util/src/delay.ts": "09ebc89d0d62c0f4915aac6b6069eac0e6b43ec4", | ||
@@ -15,0 +15,0 @@ "libraries/hatch-util/src/index.ts": "0e14c056b6a1f54e45bdee30bcfc4d402aec9fa9", |
@@ -5,2 +5,14 @@ { | ||
{ | ||
"version": "0.1.9", | ||
"tag": "@launchtray/hatch-util_v0.1.9", | ||
"date": "Wed, 05 Aug 2020 21:27:25 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Remove console clutter" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "0.1.8", | ||
@@ -7,0 +19,0 @@ "tag": "@launchtray/hatch-util_v0.1.8", |
# Change Log - @launchtray/hatch-util | ||
This log was last generated on Wed, 22 Jul 2020 06:33:22 GMT and should not be manually modified. | ||
This log was last generated on Wed, 05 Aug 2020 21:27:25 GMT and should not be manually modified. | ||
## 0.1.9 | ||
Wed, 05 Aug 2020 21:27:25 GMT | ||
### Patches | ||
- Remove console clutter | ||
## 0.1.8 | ||
@@ -6,0 +13,0 @@ Wed, 22 Jul 2020 06:33:22 GMT |
import { Options } from '@sentry/types'; | ||
import { Action, ErrorReporter } from './ErrorReporter'; | ||
import { SentryMonitor } from './SentryMonitor'; | ||
import { Logger } from './Logger'; | ||
export default class SentryReporter implements ErrorReporter { | ||
private readonly sentry; | ||
private readonly initialized; | ||
private readonly logger; | ||
private readonly initialized?; | ||
private initializedWarningShown; | ||
constructor(sentry: SentryMonitor, options: Options); | ||
constructor(sentry: SentryMonitor, logger: Logger, options: Options); | ||
captureAction(action: Action, prevState: any): void; | ||
@@ -10,0 +12,0 @@ captureException(exception: Error): void; |
@@ -5,5 +5,5 @@ "use strict"; | ||
class SentryReporter { | ||
constructor(sentry, options) { | ||
constructor(sentry, logger, options) { | ||
this.sentry = sentry; | ||
this.initialized = false; | ||
this.logger = logger; | ||
this.initializedWarningShown = false; | ||
@@ -17,3 +17,3 @@ if (options && options.dsn) { | ||
} | ||
console.log('Error reporting initialized: ' + this.initialized); | ||
this.logger.info('Error reporting initialized:', this.initialized); | ||
} | ||
@@ -35,8 +35,8 @@ captureAction(action, prevState) { | ||
catch (error) { | ||
console.error('Error reporting action: ' + error.message); | ||
this.logger.error('Error reporting action:', error.message); | ||
} | ||
} | ||
else if (!this.initializedWarningShown) { | ||
else if (this.initialized == null && !this.initializedWarningShown) { | ||
this.initializedWarningShown = true; | ||
console.error('Error reporting actions: Sentry not initialized'); | ||
this.logger.error('Error reporting actions: Sentry not initialized'); | ||
} | ||
@@ -53,3 +53,3 @@ } | ||
catch (error) { | ||
console.error('Error reporting exception: ' + error.message); | ||
this.logger.error('Error reporting exception: ' + error.message); | ||
} | ||
@@ -56,0 +56,0 @@ } |
{ | ||
"name": "@launchtray/hatch-util", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Utilities used by several other hatch modules", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import {Breadcrumb, Options, Severity} from '@sentry/types'; | ||
import {Action, ErrorReporter} from './ErrorReporter'; | ||
import {SentryMonitor} from './SentryMonitor'; | ||
import {Logger} from './Logger'; | ||
export default class SentryReporter implements ErrorReporter { | ||
private readonly initialized: boolean = false; | ||
private readonly initialized?: boolean; | ||
private initializedWarningShown: boolean = false; | ||
constructor(private readonly sentry: SentryMonitor, options: Options) { | ||
constructor(private readonly sentry: SentryMonitor, private readonly logger: Logger, options: Options) { | ||
if (options && options.dsn) { | ||
@@ -16,3 +17,3 @@ this.sentry.init({dsn: options.dsn, integrations: options.integrations}); | ||
} | ||
console.log('Error reporting initialized: ' + this.initialized); | ||
this.logger.info('Error reporting initialized:', this.initialized); | ||
} | ||
@@ -34,7 +35,7 @@ | ||
} catch (error) { | ||
console.error('Error reporting action: ' + error.message); | ||
this.logger.error('Error reporting action:', error.message); | ||
} | ||
} else if (!this.initializedWarningShown) { | ||
} else if (this.initialized == null && !this.initializedWarningShown) { | ||
this.initializedWarningShown = true; | ||
console.error('Error reporting actions: Sentry not initialized'); | ||
this.logger.error('Error reporting actions: Sentry not initialized'); | ||
} | ||
@@ -51,3 +52,3 @@ } | ||
} catch (error) { | ||
console.error('Error reporting exception: ' + error.message); | ||
this.logger.error('Error reporting exception: ' + error.message); | ||
} | ||
@@ -54,0 +55,0 @@ } |
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
43383
861