Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appsignal/plugin-breadcrumbs-console

Package Overview
Dependencies
Maintainers
9
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsignal/plugin-breadcrumbs-console - npm Package Compare versions

Comparing version 1.1.20 to 1.1.21

7

CHANGELOG.md
# AppSignal for plugin-breadcrumbs-console changelog
## 1.1.21
### Changed
- [60b3ee1](https://github.com/appsignal/appsignal-javascript/commit/60b3ee1d6478d03062c6b9c2896623ce1036c93a) patch - Serialise circular references in console arguments, omitting the cyclic value instead of throwing an error.
- patch - Update @appsignal/javascript dependency to 1.3.20.
## 1.1.20

@@ -4,0 +11,0 @@

33

dist/cjs/index.js

@@ -39,16 +39,29 @@ "use strict";

function serializeValue(value, method) {
if (typeof value === "string") {
return value;
switch (typeof value) {
case "string":
return value;
case "undefined":
return "undefined";
default:
return JSON.stringify(value, circularReplacer());
}
else {
try {
return JSON.stringify(value);
}
function circularReplacer() {
var seenValue = [];
var seenKey = [];
return function (key, value) {
if (typeof value === "object" && value !== null) {
var i = seenValue.indexOf(value);
if (i !== -1) {
return "[cyclic value: " + (seenKey[i] || "root object") + "]";
}
else {
seenValue.push(value);
seenKey.push(key);
}
}
catch (error) {
console.error("Could not serialize \"console." + method + "\" to String.", error);
return "[Value could not be serialized]";
}
}
return value;
};
}
exports.plugin = consoleBreadcrumbsPlugin;
//# sourceMappingURL=index.js.map

@@ -36,16 +36,29 @@ var SUPPORTED_CONSOLE_METHODS = ["log", "debug", "info", "warn", "error"];

function serializeValue(value, method) {
if (typeof value === "string") {
return value;
switch (typeof value) {
case "string":
return value;
case "undefined":
return "undefined";
default:
return JSON.stringify(value, circularReplacer());
}
else {
try {
return JSON.stringify(value);
}
function circularReplacer() {
var seenValue = [];
var seenKey = [];
return function (key, value) {
if (typeof value === "object" && value !== null) {
var i = seenValue.indexOf(value);
if (i !== -1) {
return "[cyclic value: " + (seenKey[i] || "root object") + "]";
}
else {
seenValue.push(value);
seenKey.push(key);
}
}
catch (error) {
console.error("Could not serialize \"console." + method + "\" to String.", error);
return "[Value could not be serialized]";
}
}
return value;
};
}
export var plugin = consoleBreadcrumbsPlugin;
//# sourceMappingURL=index.js.map
{
"name": "@appsignal/plugin-breadcrumbs-console",
"version": "1.1.20",
"version": "1.1.21",
"main": "dist/cjs/index.js",

@@ -25,3 +25,3 @@ "module": "dist/esm/index.js",

"dependencies": {
"@appsignal/javascript": "=1.3.19"
"@appsignal/javascript": "=1.3.20"
},

@@ -28,0 +28,0 @@ "devDependencies": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc