@airbrake/node
Advanced tools
Comparing version 2.1.7 to 2.1.8
@@ -12,3 +12,3 @@ "use strict"; | ||
} | ||
notice.context.os = os.type() + "/" + os.release(); | ||
notice.context.os = "".concat(os.type(), "/").concat(os.release()); | ||
notice.context.architecture = os.arch(); | ||
@@ -15,0 +15,0 @@ notice.context.hostname = os.hostname(); |
@@ -7,6 +7,6 @@ "use strict"; | ||
if (https.request) { | ||
https.request = http_1.wrapRequest(https.request, airbrake); | ||
https.request = (0, http_1.wrapRequest)(https.request, airbrake); | ||
} | ||
if (https.get) { | ||
https.get = http_1.wrapRequest(https.get, airbrake); | ||
https.get = (0, http_1.wrapRequest)(https.get, airbrake); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { BaseNotifier, INotice, IOptions } from '../../browser'; | ||
import { BaseNotifier, INotice, IOptions } from '@airbrake/browser'; | ||
import { Scope, ScopeManager } from './scope'; | ||
@@ -3,0 +3,0 @@ export declare class Notifier extends BaseNotifier { |
@@ -32,3 +32,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -56,4 +56,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
exports.Notifier = void 0; | ||
// import { BaseNotifier, INotice, IOptions } from '@airbrake/browser'; | ||
var browser_1 = require("../../browser"); | ||
var browser_1 = require("@airbrake/browser"); | ||
var node_1 = require("./filter/node"); | ||
@@ -168,4 +167,4 @@ var scope_1 = require("./scope"); | ||
try { | ||
var mod = require(modName + ".js"); | ||
var airbrakeMod = require("@airbrake/node/dist/instrumentation/" + modName + ".js"); | ||
var mod = require("".concat(modName, ".js")); | ||
var airbrakeMod = require("@airbrake/node/dist/instrumentation/".concat(modName, ".js")); | ||
airbrakeMod.patch(mod, this); | ||
@@ -172,0 +171,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
export declare const NOTIFIER_NAME = "airbrake-js/node"; | ||
export declare const NOTIFIER_VERSION = "2.1.7"; | ||
export declare const NOTIFIER_VERSION = "2.1.8"; | ||
export declare const NOTIFIER_URL = "https://github.com/airbrake/airbrake-js/tree/master/packages/node"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,4 +5,4 @@ "use strict"; | ||
exports.NOTIFIER_NAME = 'airbrake-js/node'; | ||
exports.NOTIFIER_VERSION = '2.1.7'; | ||
exports.NOTIFIER_VERSION = '2.1.8'; | ||
exports.NOTIFIER_URL = 'https://github.com/airbrake/airbrake-js/tree/master/packages/node'; | ||
//# sourceMappingURL=version.js.map |
@@ -9,3 +9,3 @@ import { NOTIFIER_NAME, NOTIFIER_VERSION, NOTIFIER_URL } from '../version'; | ||
} | ||
notice.context.os = os.type() + "/" + os.release(); | ||
notice.context.os = "".concat(os.type(), "/").concat(os.release()); | ||
notice.context.architecture = os.arch(); | ||
@@ -12,0 +12,0 @@ notice.context.hostname = os.hostname(); |
@@ -1,2 +0,2 @@ | ||
import { BaseNotifier, INotice, IOptions } from '../../browser'; | ||
import { BaseNotifier, INotice, IOptions } from '@airbrake/browser'; | ||
import { Scope, ScopeManager } from './scope'; | ||
@@ -3,0 +3,0 @@ export declare class Notifier extends BaseNotifier { |
@@ -31,3 +31,3 @@ var __extends = (this && this.__extends) || (function () { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -53,4 +53,3 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
}; | ||
// import { BaseNotifier, INotice, IOptions } from '@airbrake/browser'; | ||
import { BaseNotifier } from '../../browser'; | ||
import { BaseNotifier } from '@airbrake/browser'; | ||
import { nodeFilter } from './filter/node'; | ||
@@ -165,4 +164,4 @@ import { Scope, ScopeManager } from './scope'; | ||
try { | ||
var mod = require(modName + ".js"); | ||
var airbrakeMod = require("@airbrake/node/dist/instrumentation/" + modName + ".js"); | ||
var mod = require("".concat(modName, ".js")); | ||
var airbrakeMod = require("@airbrake/node/dist/instrumentation/".concat(modName, ".js")); | ||
airbrakeMod.patch(mod, this); | ||
@@ -169,0 +168,0 @@ } |
export declare const NOTIFIER_NAME = "airbrake-js/node"; | ||
export declare const NOTIFIER_VERSION = "2.1.7"; | ||
export declare const NOTIFIER_VERSION = "2.1.8"; | ||
export declare const NOTIFIER_URL = "https://github.com/airbrake/airbrake-js/tree/master/packages/node"; | ||
//# sourceMappingURL=version.d.ts.map |
export var NOTIFIER_NAME = 'airbrake-js/node'; | ||
export var NOTIFIER_VERSION = '2.1.7'; | ||
export var NOTIFIER_VERSION = '2.1.8'; | ||
export var NOTIFIER_URL = 'https://github.com/airbrake/airbrake-js/tree/master/packages/node'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@airbrake/node", | ||
"version": "2.1.7", | ||
"version": "2.1.8", | ||
"description": "Official Airbrake notifier for Node.js", | ||
@@ -23,4 +23,4 @@ "author": "Airbrake", | ||
"dependencies": { | ||
"@airbrake/browser": "^2.1.7", | ||
"cross-fetch": "^3.0.4", | ||
"@airbrake/browser": "^2.1.8", | ||
"cross-fetch": "^3.1.5", | ||
"error-stack-parser": "^2.0.4", | ||
@@ -32,6 +32,6 @@ "tdigest": "^0.1.1" | ||
"@babel/preset-env": "^7.9.0", | ||
"babel-jest": "^27.0.1", | ||
"jest": "^26.0.0", | ||
"babel-jest": "^29.3.1", | ||
"jest": "^27.3.1", | ||
"prettier": "^2.0.2", | ||
"ts-jest": "^26.0.0", | ||
"ts-jest": "^27.1.0", | ||
"tslint": "^6.1.0", | ||
@@ -38,0 +38,0 @@ "tslint-config-prettier": "^1.18.0", |
@@ -9,2 +9,4 @@ <p align="center"> | ||
[![npm version](https://img.shields.io/npm/v/@airbrake/node.svg)](https://www.npmjs.com/package/@airbrake/node) | ||
[![npm dm](https://img.shields.io/npm/dm/@airbrake/node.svg)](https://www.npmjs.com/package/@airbrake/node) | ||
[![npm dt](https://img.shields.io/npm/dt/@airbrake/node.svg)](https://www.npmjs.com/package/@airbrake/node) | ||
@@ -67,3 +69,3 @@ The official Airbrake notifier for capturing JavaScript errors in Node.js and | ||
throw new Error('Hello from Airbrake!'); | ||
} catch(err) { | ||
} catch (err) { | ||
airbrake.notify(err); | ||
@@ -98,4 +100,4 @@ } | ||
* [Express](examples/express) | ||
* [Node.js](examples/nodejs) | ||
- [Express](examples/express) | ||
- [Node.js](examples/nodejs) | ||
@@ -112,3 +114,3 @@ ## Advanced Usage | ||
startApp(); | ||
} catch(err) { | ||
} catch (err) { | ||
airbrake.notify({ | ||
@@ -133,3 +135,3 @@ error: err, | ||
error: err, | ||
context: { severity: 'warning' } | ||
context: { severity: 'warning' }, | ||
}); | ||
@@ -151,9 +153,10 @@ ``` | ||
and `session` properties. It also includes the single-element `errors` array | ||
with its `backtrace` property and associated backtrace lines. | ||
with its `backtrace` property and associated backtrace lines. | ||
The return value of the filter function determines whether or not the error | ||
notice will be submitted. | ||
* If `null` is returned, the notice is ignored. | ||
* Otherwise, the returned notice will be submitted. | ||
- If `null` is returned, the notice is ignored. | ||
- Otherwise, the returned notice will be submitted. | ||
An error notice must pass all provided filters to be submitted. | ||
@@ -191,7 +194,7 @@ | ||
const airbrake = new Notifier({ | ||
// ... | ||
keysBlocklist: [ | ||
'password', // exact match | ||
/secret/, // regexp match | ||
], | ||
// ... | ||
keysBlocklist: [ | ||
'password', // exact match | ||
/secret/, // regexp match | ||
], | ||
}); | ||
@@ -208,3 +211,3 @@ ``` | ||
// ... | ||
request: request.defaults({'proxy':'http://localproxy.com'}) | ||
request: request.defaults({ proxy: 'http://localproxy.com' }), | ||
}); | ||
@@ -221,3 +224,3 @@ ``` | ||
// ... | ||
performanceStats: false | ||
performanceStats: false, | ||
}); | ||
@@ -227,2 +230,3 @@ ``` | ||
### Filtering performance data | ||
`addPerformanceFilter` allows for filtering performance data. Return `null` in | ||
@@ -229,0 +233,0 @@ the filter to prevent that metric from being reported to Airbrake. |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
105999
1362
236
+ Added@types/node@22.10.0(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removed@types/node@22.9.2(transitive)
- Removedundici-types@6.19.8(transitive)
Updated@airbrake/browser@^2.1.8
Updatedcross-fetch@^3.1.5