Socket
Socket
Sign inDemoInstall

@antora/logger

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/logger - npm Package Compare versions

Comparing version 3.0.0-alpha.8 to 3.0.0-alpha.9

26

lib/logger.js

@@ -9,3 +9,2 @@ 'use strict'

const {
destination: buildDest,
levels: { labels: levelLabels, values: levelValues },

@@ -15,2 +14,3 @@ symbols: { streamSym },

} = require('pino')
const SonicBoom = require('sonic-boom')

@@ -29,5 +29,9 @@ const closedLogger = { closed: true }

const dest = Object.assign(rootLogger, closedLogger)[streamSym].stream || rootLogger[streamSym]
if (dest instanceof EventEmitter && typeof dest.end === 'function' && (dest._buf || !(dest.fd in standardStreams))) {
finalizers.push(once(dest, 'close').catch(() => undefined))
dest.end()
if (dest instanceof EventEmitter && typeof dest.end === 'function') {
if (!(dest.fd in standardStreams)) {
finalizers.push(once(dest, 'close').catch(() => undefined))
dest.end()
} else if (dest._buf) {
finalizers.push(new Promise((resolve) => fs.write(dest.fd, dest._buf, () => resolve((dest._buf = '')))))
}
}

@@ -46,14 +50,12 @@ }

if (typeof (destination || (destination = {})).write !== 'function') {
const { file, append = true, bufferSize, ...destOpts } = destination
const { file, bufferSize, ...destOpts } = destination
if (bufferSize != null) destOpts.minLength = bufferSize
if (file && !(dest = standardStreams[file])) {
dest = expandPath(file, { dot: baseDir })
try {
fs.mkdirSync(ospath.dirname(dest), { recursive: true })
if (!append) fs.unlinkSync(dest)
} catch {}
} else if (process.env.NODE_ENV !== 'test') {
colorize = true
} else if (prettyPrint) {
dest = dest || 2
if (process.env.NODE_ENV !== 'test') colorize = true
}
destination = buildDest(Object.assign({ sync: true }, destOpts, { dest: dest || (prettyPrint ? 2 : 1) }))
destOpts.dest = dest || 1
destination = new SonicBoom(Object.assign({ mkdir: true, sync: true }, destOpts))
}

@@ -60,0 +62,0 @@ close()

{
"name": "@antora/logger",
"version": "3.0.0-alpha.8",
"version": "3.0.0-alpha.9",
"description": "The logger for Antora.",

@@ -19,4 +19,5 @@ "license": "MPL-2.0",

"@antora/expand-path-helper": "~2.0",
"pino": "~6.11",
"pino-pretty": "~5.1"
"pino": "~6.13",
"pino-pretty": "~6.0",
"sonic-boom": "~2.1"
},

@@ -38,3 +39,3 @@ "engines": {

],
"gitHead": "2e5695bea11fb5719989c329c97e66d36e29659f"
"gitHead": "a504d6889819b548e8a5416a7194cbb6f9a93e93"
}
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