@appsignal/javascript
Advanced tools
Comparing version 1.1.2 to 1.2.0
# Changelog | ||
## 1.2.0 | ||
- Dependency bumps | ||
- Add tags and namespace params to `appsignal.wrap()` method | ||
## 1.1.2 | ||
@@ -4,0 +8,0 @@ - Dependency bumps |
@@ -21,3 +21,3 @@ import { Breadcrumb } from "@appsignal/types"; | ||
createSpan(fn?: Function): Span; | ||
wrap(fn: Function): Promise<any>; | ||
wrap(fn: Function, tags?: {}, namespace?: string): Promise<any>; | ||
addDecorator<T extends IHook>(decorator: T): void; | ||
@@ -24,0 +24,0 @@ addOverride<T extends IHook>(override: T): void; |
@@ -98,3 +98,4 @@ "use strict"; | ||
}; | ||
Appsignal.prototype.wrap = function (fn) { | ||
Appsignal.prototype.wrap = function (fn, tags, namespace) { | ||
if (tags === void 0) { tags = {}; } | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
@@ -105,11 +106,12 @@ var e_1; | ||
case 0: | ||
_a.trys.push([0, 1, , 3]); | ||
return [2, Promise.resolve(fn())]; | ||
case 1: | ||
_a.trys.push([0, 2, , 4]); | ||
return [4, fn()]; | ||
case 1: return [2, _a.sent()]; | ||
case 2: | ||
e_1 = _a.sent(); | ||
return [4, this.sendError(e_1)]; | ||
case 2: | ||
return [4, this.sendError(e_1, tags, namespace)]; | ||
case 3: | ||
_a.sent(); | ||
return [2, Promise.reject(e_1)]; | ||
case 3: return [2]; | ||
case 4: return [2]; | ||
} | ||
@@ -116,0 +118,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.1.2"; | ||
export declare const VERSION = "1.2.0"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = "1.1.2"; | ||
exports.VERSION = "1.2.0"; | ||
//# sourceMappingURL=version.js.map |
@@ -21,3 +21,3 @@ import { Breadcrumb } from "@appsignal/types"; | ||
createSpan(fn?: Function): Span; | ||
wrap(fn: Function): Promise<any>; | ||
wrap(fn: Function, tags?: {}, namespace?: string): Promise<any>; | ||
addDecorator<T extends IHook>(decorator: T): void; | ||
@@ -24,0 +24,0 @@ addOverride<T extends IHook>(override: T): void; |
@@ -96,3 +96,4 @@ import { __assign, __awaiter, __generator, __read, __spread } from "tslib"; | ||
}; | ||
Appsignal.prototype.wrap = function (fn) { | ||
Appsignal.prototype.wrap = function (fn, tags, namespace) { | ||
if (tags === void 0) { tags = {}; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -103,11 +104,12 @@ var e_1; | ||
case 0: | ||
_a.trys.push([0, 1, , 3]); | ||
return [2, Promise.resolve(fn())]; | ||
case 1: | ||
_a.trys.push([0, 2, , 4]); | ||
return [4, fn()]; | ||
case 1: return [2, _a.sent()]; | ||
case 2: | ||
e_1 = _a.sent(); | ||
return [4, this.sendError(e_1)]; | ||
case 2: | ||
return [4, this.sendError(e_1, tags, namespace)]; | ||
case 3: | ||
_a.sent(); | ||
return [2, Promise.reject(e_1)]; | ||
case 3: return [2]; | ||
case 4: return [2]; | ||
} | ||
@@ -114,0 +116,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.1.2"; | ||
export declare const VERSION = "1.2.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export var VERSION = "1.1.2"; | ||
export var VERSION = "1.2.0"; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@appsignal/javascript", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"main": "dist/cjs/index.js", | ||
@@ -27,4 +27,4 @@ "module": "dist/esm/index.js", | ||
"dependencies": { | ||
"@appsignal/core": "^1.0.2", | ||
"tslib": "^1.11.0" | ||
"@appsignal/core": "^1.0.3", | ||
"tslib": "^1.11.1" | ||
}, | ||
@@ -34,3 +34,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "458927e140c985d4fd4ee7d1092464cb28e4f586" | ||
"gitHead": "c952f503858cbdaca8d42beff4bff479e861a0c3" | ||
} |
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
85525
1252
Updated@appsignal/core@^1.0.3
Updatedtslib@^1.11.1