Socket
Socket
Sign inDemoInstall

pino-pretty

Package Overview
Dependencies
Maintainers
4
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-pretty - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

4

index.js

@@ -162,4 +162,4 @@ 'use strict'

if (log.type === 'Error') {
const stack = log.stack ? log.stack : String(log.stack)
if (log.type === 'Error' && log.stack) {
const stack = log.stack
line += IDENT + joinLinesWithIndentation(stack) + EOL

@@ -166,0 +166,0 @@

{
"name": "pino-pretty",
"version": "2.0.1",
"version": "2.1.0",
"description": "Prettifier for Pino log lines",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -189,6 +189,8 @@ 'use strict'

t.test('handles errors with a null stack for Error object', (t) => {
t.plan(1)
t.plan(3)
const pretty = prettyFactory()
const expectedLines = [
' null'
' type: "Error"',
' stack: null',
' some: "property"'
]

@@ -209,2 +211,3 @@ const log = pino({}, new Writable({

error.stack = null
error.some = 'property'

@@ -211,0 +214,0 @@ log.error(error)

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