@sentry/utils
Advanced tools
Comparing version 5.7.0 to 5.7.1
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export declare function forget(promise: Promise<any>): void; | ||
export declare function forget(promise: PromiseLike<any>): void; | ||
//# sourceMappingURL=async.d.ts.map |
@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function forget(promise) { | ||
promise.catch(function (e) { | ||
promise.then(null, function (e) { | ||
// TODO: Use a better logging mechanism | ||
@@ -10,0 +10,0 @@ console.error(e); |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
/** | ||
@@ -2,0 +3,0 @@ * Checks whether given value's type is one of a few Error or Error-like |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -2,0 +3,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
import { Event, Integration } from '@sentry/types'; | ||
@@ -2,0 +3,0 @@ /** Internal */ |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -2,0 +3,0 @@ var is_1 = require("./is"); |
@@ -14,13 +14,13 @@ /** A simple queue that holds promises. */ | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns The original promise. | ||
*/ | ||
add(task: Promise<T>): Promise<T>; | ||
add(task: PromiseLike<T>): PromiseLike<T>; | ||
/** | ||
* Remove a promise to the queue. | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns Removed promise. | ||
*/ | ||
remove(task: Promise<T>): Promise<T>; | ||
remove(task: PromiseLike<T>): PromiseLike<T>; | ||
/** | ||
@@ -36,4 +36,4 @@ * This function returns the number of unresolved promises in the queue. | ||
*/ | ||
drain(timeout?: number): Promise<boolean>; | ||
drain(timeout?: number): PromiseLike<boolean>; | ||
} | ||
//# sourceMappingURL=promisebuffer.d.ts.map |
@@ -20,3 +20,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns The original promise. | ||
@@ -34,4 +34,4 @@ */ | ||
.then(function () { return _this.remove(task); }) | ||
.catch(function () { | ||
return _this.remove(task).catch(function () { | ||
.then(null, function () { | ||
return _this.remove(task).then(null, function () { | ||
// We have to add this catch here otherwise we have an unhandledPromiseRejection | ||
@@ -46,3 +46,3 @@ // because it's a new Promise chain. | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns Removed promise. | ||
@@ -79,3 +79,3 @@ */ | ||
}) | ||
.catch(function () { | ||
.then(null, function () { | ||
resolve(true); | ||
@@ -82,0 +82,0 @@ }); |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export declare class SyncPromise<T> implements Promise<T> { | ||
declare class SyncPromise<T> implements PromiseLike<T> { | ||
private _state; | ||
@@ -13,15 +13,14 @@ private _handlers; | ||
toString(): string; | ||
[Symbol.toStringTag]: string; | ||
/** JSDoc */ | ||
static resolve<T>(value: T | PromiseLike<T>): Promise<T>; | ||
static resolve<T>(value: T | PromiseLike<T>): PromiseLike<T>; | ||
/** JSDoc */ | ||
static reject<T = never>(reason?: any): Promise<T>; | ||
static reject<T = never>(reason?: any): PromiseLike<T>; | ||
/** JSDoc */ | ||
static all<U = any>(collection: Array<U | PromiseLike<U>>): Promise<U[]>; | ||
static all<U = any>(collection: Array<U | PromiseLike<U>>): PromiseLike<U[]>; | ||
/** JSDoc */ | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>; | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>; | ||
/** JSDoc */ | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>; | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): PromiseLike<T | TResult>; | ||
/** JSDoc */ | ||
finally<TResult>(onfinally?: (() => void) | null): Promise<TResult>; | ||
finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult>; | ||
/** JSDoc */ | ||
@@ -38,2 +37,3 @@ private readonly _resolve; | ||
} | ||
export { SyncPromise }; | ||
//# sourceMappingURL=syncpromise.d.ts.map |
@@ -22,3 +22,2 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this._handlers = []; | ||
this[Symbol.toStringTag] = '[object SyncPromise]'; | ||
/** JSDoc */ | ||
@@ -119,3 +118,3 @@ this._resolve = function (value) { | ||
}) | ||
.catch(reject); | ||
.then(null, reject); | ||
}); | ||
@@ -122,0 +121,0 @@ }); |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export declare function forget(promise: Promise<any>): void; | ||
export declare function forget(promise: PromiseLike<any>): void; | ||
//# sourceMappingURL=async.d.ts.map |
@@ -6,3 +6,3 @@ /** | ||
export function forget(promise) { | ||
promise.catch(function (e) { | ||
promise.then(null, function (e) { | ||
// TODO: Use a better logging mechanism | ||
@@ -9,0 +9,0 @@ console.error(e); |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
/** | ||
@@ -2,0 +3,0 @@ * Checks whether given value's type is one of a few Error or Error-like |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
/** | ||
@@ -2,0 +3,0 @@ * Checks whether given value's type is one of a few Error or Error-like |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
import { Event, Integration } from '@sentry/types'; | ||
@@ -2,0 +3,0 @@ /** Internal */ |
@@ -0,1 +1,2 @@ | ||
/// <reference lib="dom" /> | ||
import { isString } from './is'; | ||
@@ -2,0 +3,0 @@ /** |
@@ -14,13 +14,13 @@ /** A simple queue that holds promises. */ | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns The original promise. | ||
*/ | ||
add(task: Promise<T>): Promise<T>; | ||
add(task: PromiseLike<T>): PromiseLike<T>; | ||
/** | ||
* Remove a promise to the queue. | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns Removed promise. | ||
*/ | ||
remove(task: Promise<T>): Promise<T>; | ||
remove(task: PromiseLike<T>): PromiseLike<T>; | ||
/** | ||
@@ -36,4 +36,4 @@ * This function returns the number of unresolved promises in the queue. | ||
*/ | ||
drain(timeout?: number): Promise<boolean>; | ||
drain(timeout?: number): PromiseLike<boolean>; | ||
} | ||
//# sourceMappingURL=promisebuffer.d.ts.map |
@@ -19,3 +19,3 @@ import { SentryError } from './error'; | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns The original promise. | ||
@@ -33,4 +33,4 @@ */ | ||
.then(function () { return _this.remove(task); }) | ||
.catch(function () { | ||
return _this.remove(task).catch(function () { | ||
.then(null, function () { | ||
return _this.remove(task).then(null, function () { | ||
// We have to add this catch here otherwise we have an unhandledPromiseRejection | ||
@@ -45,3 +45,3 @@ // because it's a new Promise chain. | ||
* | ||
* @param task Can be any Promise<T> | ||
* @param task Can be any PromiseLike<T> | ||
* @returns Removed promise. | ||
@@ -78,3 +78,3 @@ */ | ||
}) | ||
.catch(function () { | ||
.then(null, function () { | ||
resolve(true); | ||
@@ -81,0 +81,0 @@ }); |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export declare class SyncPromise<T> implements Promise<T> { | ||
declare class SyncPromise<T> implements PromiseLike<T> { | ||
private _state; | ||
@@ -13,15 +13,14 @@ private _handlers; | ||
toString(): string; | ||
[Symbol.toStringTag]: string; | ||
/** JSDoc */ | ||
static resolve<T>(value: T | PromiseLike<T>): Promise<T>; | ||
static resolve<T>(value: T | PromiseLike<T>): PromiseLike<T>; | ||
/** JSDoc */ | ||
static reject<T = never>(reason?: any): Promise<T>; | ||
static reject<T = never>(reason?: any): PromiseLike<T>; | ||
/** JSDoc */ | ||
static all<U = any>(collection: Array<U | PromiseLike<U>>): Promise<U[]>; | ||
static all<U = any>(collection: Array<U | PromiseLike<U>>): PromiseLike<U[]>; | ||
/** JSDoc */ | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>; | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>; | ||
/** JSDoc */ | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>; | ||
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): PromiseLike<T | TResult>; | ||
/** JSDoc */ | ||
finally<TResult>(onfinally?: (() => void) | null): Promise<TResult>; | ||
finally<TResult>(onfinally?: (() => void) | null): PromiseLike<TResult>; | ||
/** JSDoc */ | ||
@@ -38,2 +37,3 @@ private readonly _resolve; | ||
} | ||
export { SyncPromise }; | ||
//# sourceMappingURL=syncpromise.d.ts.map |
@@ -21,3 +21,2 @@ import { isThenable } from './is'; | ||
this._handlers = []; | ||
this[Symbol.toStringTag] = '[object SyncPromise]'; | ||
/** JSDoc */ | ||
@@ -118,3 +117,3 @@ this._resolve = function (value) { | ||
}) | ||
.catch(reject); | ||
.then(null, reject); | ||
}); | ||
@@ -121,0 +120,0 @@ }); |
{ | ||
"name": "@sentry/utils", | ||
"version": "5.7.0", | ||
"version": "5.7.1", | ||
"description": "Utilities for all Sentry JavaScript SDKs", | ||
@@ -19,3 +19,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "5.7.0", | ||
"@sentry/types": "5.7.1", | ||
"tslib": "^1.9.3" | ||
@@ -22,0 +22,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
318429
4098
+ Added@sentry/types@5.7.1(transitive)
- Removed@sentry/types@5.7.0(transitive)
Updated@sentry/types@5.7.1