Skip to content

Releases: StreetStrider/console-ultimate

4.1.0

09 Jun 23:17
Compare
Choose a tag to compare

TS release.

4.0.0

12 Nov 22:48
Compare
Choose a tag to compare

ESM release.

3.0.0

22 Aug 20:31
Compare
Choose a tag to compare
  • Fully Node-compatible API. So console-ultimate can replace console globally.
  • Nicely looking log, info, warn, error. They are colored, so more distinctive in terminal.
    Also some unicode decorations included.
  • Better stack traces and overall error formatting. Stack trace is cleared from internal entries (console.error, console.trace).
  • Nice grouping (console.group) with visual indentation and pseudographics.
  • console.table with adequate table width, including ansi-colored things, nice borders and colors.
  • FP-friendly loggers that can passthrough value, so they can be used in pipes (.then, .map etc…).
  • All other stuff, like console.count and console.time.
  • Deprecated methods are also supported for compability (console.debug, console.dirxml).

v2.0.0

13 May 13:25
Compare
Choose a tag to compare

Some breaking changes was made:

  • console.time uses hi-res time by default. can be turned off in features.
  • console.dir now supports output to custom stream (like log, warn, and others do). Options was changed.
  • colors now respect tty.
  • console.trace upgraded with better stack traces.

v1.0.0: pre-release 3

28 Mar 20:40
Compare
Choose a tag to compare
v1.0.0: pre-release 3 Pre-release
Pre-release

Per-feature gates are moved to options.features. All features are enabled by default. All features can be disabled by assigning false to options.features:

var console = Console(null, null, {
  features: false
});

Additional features will be switched off, basic Node features (like timers, but not log & dir) will be noop-ed.

Certain features can be disabled:

var console = Console(null, null, {
  features:
  {
    count: false
  }
});

v1.0.0: pre-release 1

27 Mar 19:01
Compare
Choose a tag to compare
v1.0.0: pre-release 1 Pre-release
Pre-release

Everything Node-specific is implemented (at least, on basic level).

  • console.trace, console.assert, and examples.
  • styling.prefix to enable/disable prefixes for all functions, enabled by default.

v0.3.0: timers

23 Mar 23:13
Compare
Choose a tag to compare

This release mainly introduces timers.

  • console.time & console.timeEnd as in Node.
  • Timer feature can be turned off, but for compability reasons it's not removed from object, but replaced with noop-functions.
  • console.time.retrieve works like timeEnd but does not output result, instead returns it, allowing to use it later.
  • console.time.end as semantical alias for console.timeEnd.
  • It is possible to turn on hi-res timer (uses process.hrtime):
var console = Console(null, null,
{
    timer:
    {
        hrtime: true
    }
});
  • This module implementation of timeEnd deletes used timer ref, but Node's does not (7cff79f). If anyone will need «broken» Node's implementation (which allow to timeEnd one timer multiple times), open issue.

What's else:

  • Fixed doubling of console.count output (902fd21).
  • Added several examples focused on certain features. Can be found in examples/.
  • Minor customization defaults improvements (af29673).

v0.2.0

19 Mar 13:48
Compare
Choose a tag to compare

A bunch of improvements to move console to «ultimate» state a little closer.

What's:

  • console.colors is an instance of cli-color now.
  • console's .log, .info, .warn, .error are customizable:
    • prefixes
    • colors
    • output streams: stdout or stderr
var console = Console(null, null, {
  styling: {
    log: {
      prefix: ' * ',
      color: console.colors.green,
      stream: 'stdout' // can be 'stderr' or 'stdout'
    }
  }
});
  • console.clear: clears output streams.
  • console.count: counts own calls.
  • console.debug: simple alias of .log.
  • feature gates for .debug, .count, .clear:
var console = Console(null, null, {
  styling: true,

  count: true,
  clear: true
  // debug: false
});

v0.1.0

15 Mar 17:31
Compare
Choose a tag to compare

First release with Console object concept.

What's:

  • console's .log, .info, .warn, .error all compatible with Node' ones. Colors is used for .info, .warn, .error. In next releases coloring will be controlled by option flags.
  • console.dir compatible with Node's one. It's also supports extra flags, like:
console.dir(object, 5);
// where number 5 is `depth` → { depth: 5 }

console.dir(object, 'showHidden', 1, 'colors');
// for turning hidden attributes display, with depth = 1 and colors enabled
// → { showHidden: true, depth: 1, colors: true }
  • Console constructor works like Node's one, by passing streams, streams are optional and defaults to process [ stdout, stderr ] pair. Console is UC, i.e. universal constructor and can be invoked as simple function, without new keyword.