@arsonar/common
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -20,3 +20,3 @@ "use strict"; | ||
} | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser'; | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser' || process.arch === undefined; | ||
function getLogLevel() { | ||
@@ -202,3 +202,4 @@ if (isBrowser) { | ||
}; | ||
if (!getEnv().SONAR_LOG_JSON) { | ||
console.log('b', isBrowser); | ||
if (!getEnv().SONAR_LOG_JSON && !isBrowser && typeof require === 'function') { | ||
defaultOpts.transport = { | ||
@@ -205,0 +206,0 @@ target: require.resolve('@arsonar/common/pino-pretty-transport.js'), |
@@ -14,3 +14,3 @@ import pino from 'pino'; | ||
} | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser'; | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser' || process.arch === undefined; | ||
function getLogLevel() { | ||
@@ -196,3 +196,4 @@ if (isBrowser) { | ||
}; | ||
if (!getEnv().SONAR_LOG_JSON) { | ||
console.log('b', isBrowser); | ||
if (!getEnv().SONAR_LOG_JSON && !isBrowser && typeof require === 'function') { | ||
defaultOpts.transport = { | ||
@@ -199,0 +200,0 @@ target: require.resolve('@arsonar/common/pino-pretty-transport.js'), |
{ | ||
"name": "@arsonar/common", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"main": "dist/cjs", | ||
@@ -40,3 +40,3 @@ "module": "dist/esm", | ||
}, | ||
"gitHead": "b0d4b775b5725d0ad1196614559a38f413828105" | ||
"gitHead": "0d9228db59933da62db6aa20cbb9042380d7f0fe" | ||
} |
@@ -16,3 +16,3 @@ import pino, { Level } from 'pino' | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser' | ||
const isBrowser = (typeof process === 'undefined') || process.title === 'browser' || process.arch === undefined | ||
function getLogLevel () { | ||
@@ -148,3 +148,4 @@ if (isBrowser) { | ||
} | ||
if (!getEnv().SONAR_LOG_JSON) { | ||
console.log('b', isBrowser) | ||
if (!getEnv().SONAR_LOG_JSON && !isBrowser && typeof require === 'function') { | ||
defaultOpts.transport = { | ||
@@ -151,0 +152,0 @@ target: require.resolve('@arsonar/common/pino-pretty-transport.js'), |
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
331806
5598