Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Version 1.0.0

Latest

Choose a tag to compare

@stefcameron stefcameron released this 15 Apr 23:51
· 81 commits to master since this release

Enhancements

  • yllr.make() now accepts any non-undefined value as a context.
  • Contextual yllr object now has a context():string method that returns the specified context.
  • New yllr.onFail() handler (also on contextual yllr objects) allows failed check behavior to be customized (e.g. to result in a failed assertion in NodeJS which produces a nice stack trace).
  • New yllr.tokenize() is used to defer token substitution in tokenized messages so that custom failure handlers don't have to worry about having to understand how to substitute tokens in messages.

Bug Fixes

  • Only the first occurrence of a token would be replaced with its associated value. All occurrences are now replaced with its value.

Breaking Changes

  • When instantiating a new error resulting from a failed check, the error constructor is no longer called with tokens. The expected signature is now function(message:String, context:*) and message contains substituted token values.

Other Changes

  • Updated all package dependencies to comply with npm3 peer dependency changes.
  • Added karma:globaldebug grunt target for debugging unit tests in the global deployment scenario.