NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1200 most downloaded on npm
Elegant Console Wrapper
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.1 years
Nearly every release is documented
notes for 54 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
93 releases · first in 2018
Calculate box width with the title width
One column per quarter.
Remove all message lines from stack
Calculate box width without escape sequence chars
@clack/prompts (#332)Revert "build: update exports for node16 typescript resolution"
node16 typescript resolution" (2065136)Patch string-width for node 14 support
string-width for node 14 support (421c663)node16 typescript resolution (18bc852)fancy: Fallback when Intl is unavailable
prompt: Configurable cancel strategy
cause (#308)require condition for browser builds (#243)select type return value type (#238)formatTree utility (#223)cause (#308)select type return value type (#238)types: Partial style options for box
fancy: Add node 14 compatibility
box: Fix preset naming for singleThick
singleThick (#201)Correct and improve return types for single and multi select prompts
consola.box (#193)consola/utils subpath export (#199)consola.box (#193)consola/utils subpath export (#199)Support fancy option for createConsola and improve docs
fancy option for createConsola and improve docs (#177)/basic, /core and /browser subpath exports (#178)`mockTypes`: Mock on options.typs
utils: Use default stream.write for workers support
Thank you everyone for trusting and using Consola 🐨 ❤️
Thank you everyone for trusting and using Consola 🐨 ❤️
This is the first stable version for consola v3, with a new codebase, typescript rewrite, fewer dependencies (no more chalk and dayjs bundled), first-class ESM support, new consola.prompt() and lots of other improvements!
<img width="760" alt="image" src="https://user-images.githubusercontent.com/5158436/231029244-abc79f48-ca16-4eaa-b592-7abd271ecb1f.png">
Consola v3 tries to be backward compatible as much as possible for the main interface. For a proper upgrade, switch to named exports.
// ESM
import { consola, createConsola } from "consola";
// CommonJS
const { consola, createConsola } = require("consola");
logLevel to 1 in test environments (#134)createConsola and named exports (ef6e5e5)consola.prompt util (#170)consola.fail log level (#153)formatOptions and other options to reporters (d77286a)consola.trace (#151).raw to mocked functions (987dadc)CONSOLA_LEVEL to the defaults (#129)global to globalThis (bd03098)globalThis usage (4e7b909)json and winston reporters (5af0e99)consola.options without duplication (2d31ef4)_lastLog object (cabd04f)async option (edd1bb9)LogTypeLiteral and logtype types to LogType (da1bc73)start() color and icon (5a01d53)Object.assign (c03268a)logLevel to 1 in test environments (#134)createConsola and named exports (ef6e5e5)consola.prompt util (#170)consola.fail log level (#153)formatOptions and other options to reporters (d77286a)consola.trace (#151).raw to mocked functions (987dadc)CONSOLA_LEVEL to the defaults (#129)global to globalThis (bd03098)global to globalThis (8c3ef77)globalThis caching (4e7b909)json and winston reporters (5af0e99)consola.options without duplication (2d31ef4)_lastLog object (cabd04f)async option (edd1bb9)LogTypeLiteral and logtype types to LogType (da1bc73)index.node.ts for main build (b92d23b)dist/index.* for bw compatibility (98e300f)Object.assign (c03268a)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Add isRaw flag only for wrapped calls (23b1184), closes nuxt/nuxt.js#8752
skip logObj check for wrapped calls (fixes #109)
types: use union type for ConsolaLogObject.type
### Features * improve spam throttle
### Features * remove level boundary check
### Bug Fixes * silent log level does not work
new LogLevel enum is not exported properly #95
types: add missing typescript definitions for reporters
typescript: remove cjs export (fixes #88)
types: const consola = require('consola') type is wrong
* consola: use options.stderr
browser: add support of formatted strings
docs: mention importing from src
add missing typescript declaration for level, stdout and stderr
Count repeated times before the next log
Count repeated times before the next log (197a6b3)
Prevent console spamming by throttling same log
This:
Will be rendered as:
: with tag and normal log (8250d5a)browser: hide : with tag and normal log
: with tag and normal log (8250d5a)The initial version of browser reporter was not fancier enough. Now it is! We also hide the time so the output is less verbose:
The initial version of browser reporter was not fancier enough. Now it is! We also hide the time so the output is less verbose:
The basic reporter is often used in CI environments when they append log time themselves. Thus we now omit time. Also ordering is changed for more readability:
When there is no space or terminal width is smaller than 80 characters, type and time will be hidden:
transpile browser dist to ES5 (1f81eea) (nuxt/nuxt.js#5743)
browser: use console.warn when possible
expose constructor and reporters
types: allow passing extra arguments
formatting: fix formatting when multiple back-quotes
ts: revert export consola ts declarations
ts: export consola ts declarations (#42) (a884773) (@matchai)
chore(build): Use the --no-map flag (#41) (@egoist)
--no-map flag (#41) (@egoist)Nothing published for this version
### Bug Fixes * bundle std-env and entrypoint
Nothing published for this version
fancy: highlight keywords with grave accent char
consola: return this in setReporters
types: add some of the missing types
bypass webpack for lazy required version of winston
Nothing published for this version
json-reporter: add a default value to the constructor
### Bug Fixes - expose typescript typings
use basic reporter only for ci and test environments
### Bug Fixes - fancy: honor logObj.icon
Your coding agent can read these notes before it upgrades. Set up the MCP server →