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

empower

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

empower - npm Package Versions

134

0.11.0

Diff

Changelog

Source

0.11.0 (2015-04-18)

Features
  • empower:
    • ship npm module with built bundle for browsers (e9448d3b)
twada
published 0.10.0 •

Changelog

Source

0.10.0 (2014-11-11)

twada
published 0.9.1 •

Changelog

Source

0.9.1 (2014-10-07)

Bug Fixes
  • empower: power-assert output doesn't appear in Node 0.11.x (53e882e0)
twada
published 0.9.0 •

Changelog

Source

0.9.0 (2014-09-01)

twada
published 0.8.0 •

Changelog

Source

0.8.0 (2014-08-12)

Features
  • empower:
    • modularized by browserify
    • use escallmatch module to describe target patterns (533a21a0)
    • support assertion methods with three or more arguments (d31dca86)
    • if not in patterns, do not empower assertion function itself (1d73a756)
    • option targetMethods does not required any more (8ffcc49f)
    • rename saveContextOnFail option to saveContextOnRethrow (1f6133b2)
    • rename modifyMessageOnFail option to modifyMessageOnRethrow (0c8a88f0)
Breaking Changes
  • saveContextOnFail option is renamed to saveContextOnRethrow

There is nothing to change unless you are using saveContextOnFail option.

If you are using saveContextOnFail option, change your code from the following:

empower(originalAssert, formatter, {saveContextOnFail: true})

To:

empower(originalAssert, formatter, {saveContextOnRethrow: true})

(1f6133b2)

  • modifyMessageOnFail option is renamed to modifyMessageOnRethrow

There is nothing to change unless you are using modifyMessageOnFail option.

If you are using modifyMessageOnFail option, change your code from the following:

empower(originalAssert, formatter, {modifyMessageOnFail: true})

To:

empower(originalAssert, formatter, {modifyMessageOnRethrow: true})

(0c8a88f0)

  • option targetMethods does not required any more

If you already customize enhancement pattern using targetMethods, you need to migarte. To migrate, change your code from the following:

var yourAssert = require('./your-assert');
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var options = {
    targetMethods: {
        oneArg: [
            'okay'
        ],
        twoArgs: [
            'equal',
            'customEqual'
        ]
    }
};
var assert = empower(yourAssert, formatter, options);

To:

var yourAssert = require('./your-assert');
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var options = {
    patterns: [
        'yourAssert(value, [message])',
        'yourAssert.okay(value, [message])',
        'yourAssert.equal(actual, expected, [message])',
        'yourAssert.customEqual(actual, expected, [message])'
    ]
};
var assert = empower(yourAssert, formatter, options);

(8ffcc49f)

twada
published 0.7.3 •

twada
published 0.7.2 •

twada
published 0.7.1 •

twada
published 0.7.0 •

twada
published 0.6.0 •

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