Skip to content

Releases: haltcase/logger-neue

v3.1.1

Choose a tag to compare

@haltcase haltcase released this 06 Jul 05:23
BUG FIXES
  • use namespace import for cjs dependency (fe07c12)

v3.1.0

Choose a tag to compare

@haltcase haltcase released this 06 Jul 05:20

logger-neue can now be used with native ES module imports in supported versions of Node (12.17+ and 14+).

FEATURES
  • add esm entry point (ddd5b37)
  • add named export for default factory function (a84f1e7)

v3.0.0

Choose a tag to compare

@haltcase haltcase released this 14 Jun 04:42

With this release, logger-neue will now be an even lighter package. Its two largest dependencies (chalk & fs-extra) have been replaced and removed, respectively. Install size will decrease from around 371kB to about 107kB.

BREAKING CHANGES
  • invalid style names in level descriptors will now cause errors to be thrown.
  • chalk has many features not used in logger-neue and has been removed in favor of
    the much smaller colorette. breakage is possible but should be minimal.
  • support for node < 8 has been dropped.
FEATURES
  • throw on invalid style names (3b8072c)
  • replace chalk with colorette (c14c280)
  • require node >= 8 (9e030b9)
PERFORMANCE
  • drop fs-extra dependency (bcc2866)

v2.2.0

Choose a tag to compare

@haltcase haltcase released this 04 Jan 05:51
FEATURES
  • add padding template variable, use as default (e7b1bed)

v2.1.0

Choose a tag to compare

@haltcase haltcase released this 03 Jan 05:55
FEATURES
  • add pre events and support preventing logs (d57130d)

v2.0.1

Choose a tag to compare

@haltcase haltcase released this 17 May 22:27

This release fixes an issue that published out of date files to npm.

v2.0.0

Choose a tag to compare

@haltcase haltcase released this 23 Apr 16:26

v2.0.0 is a significant release — logger-neue has been entirely rewritten in strict TypeScript. On top of an improved API and providing a stronger developer experience with its included type definitions, several minor potential bugs were fixed during the rewrite.

Since this is a major release, there are several breaking changes:

  • Minimum supported Node version of 6

  • import usage

    The default export is now a function rather than the LoggerNeue class — which is now a separate named export if you need it.

    import loggerNeue, { LoggerNeue } from 'logger-neue'
    
    const log = loggerNeue()
    const log2 = new LoggerNeue()

    However be aware that these are not exactly equivalent for TypeScript users. The function is a wrapper around the class that serves to provide more accurate type definitions based on the level descriptors you provide at construction time.

    const log = loggerNeue({
      levels: {
        greet: [0, 'red']
      }
    })
    
    // you'll get type hints on this!
    log.greet('hi!')
  • ES5 / commonjs require

    ES5 / commonjs users will need to use the .default property when
    requireing:

    const loggerNeue = require('logger-neue').default
  • level descriptors

    When defining new levels using object syntax, the property formerly known as colors is now called style to better reflect that chalk styles other than colors such as underline and bold are also accepted.

FEATURES
BREAKING CHANGES
  • colors in level descriptor objects is now known as style.
  • the default export is no longer a class, but instead is a function. The class is now a named export.
  • non-ES module / TS users must use require('logger-neue').default.
  • support for Node < 6 has been dropped.