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

@docusaurus/logger

Package Overview
Dependencies
Maintainers
6
Versions
1093
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/logger - npm Package Compare versions

Comparing version 2.0.0-beta.14 to 2.0.0-beta.15

14

lib/index.js

@@ -47,5 +47,11 @@ "use strict";

}
function stringify(msg) {
if (String(msg) === '[object Object]') {
return JSON.stringify(msg);
}
return String(msg);
}
function info(msg, ...values) {
console.info(`${chalk_1.default.cyan(chalk_1.default.bold('[INFO]'))} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`);

@@ -55,3 +61,3 @@ }

console.warn(chalk_1.default.yellow(`${chalk_1.default.bold('[WARNING]')} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`));

@@ -61,3 +67,3 @@ }

console.error(chalk_1.default.red(`${chalk_1.default.bold('[ERROR]')} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`));

@@ -67,3 +73,3 @@ }

console.log(`${chalk_1.default.green(chalk_1.default.bold('[SUCCESS]'))} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`);

@@ -70,0 +76,0 @@ }

{
"name": "@docusaurus/logger",
"version": "2.0.0-beta.14",
"version": "2.0.0-beta.15",
"description": "An encapsulated logger for semantically formatting console messages.",

@@ -32,3 +32,3 @@ "main": "./lib/index.js",

},
"gitHead": "c4824a8937d8f1aa0806667749cbc74058e2b294"
"gitHead": "9a8acb2a87250368427ad80258350d630e7ae2f5"
}

@@ -8,3 +8,3 @@ /**

import chalk, {Chalk} from 'chalk';
import chalk, {type Chalk} from 'chalk';

@@ -56,2 +56,9 @@ type InterpolatableValue = string | number | (string | number)[];

function stringify(msg: unknown): string {
if (String(msg) === '[object Object]') {
return JSON.stringify(msg);
}
return String(msg);
}
function info(msg: unknown): void;

@@ -66,3 +73,3 @@ function info(

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -82,3 +89,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -99,3 +106,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -115,3 +122,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -118,0 +125,0 @@ }`,

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