Skip to content

Releases: Lakitna/Rulebound

Rulebound 2.0.0

Choose a tag to compare

@Lakitna Lakitna released this 18 Apr 17:55
8e478a4

Breaking changes

  • Dropped support for Rulebound config file.

    It was an overreach on Rulebound's part. You can still set the config when creating a Rulebook,
    but it will no longer auto-discover the config from a file. If you don't want to get rid of your
    config file, it's quite easy to create this functionality for yourself with
    Cosmiconfig

  • Changed the way specificity is calculated.

    This means that the enforced order of rules might be different. The new approach is a lot more
    complete, courtesy of glob-specificity

  • Rule errors no longer contain the rule that threw it.

    This used to cause massive walls of text in the console. The error still retains some data in the
    rule: rule name, severity, and description. There is also no longer styling on the stack trace,
    you can do this yourself if you need it, but it's no longer part of Rulebound.

  • Rules enforce no longer takes multiple arguments.

    If you need multiple values, use an object containing everything you need. This simplifies
    Rulebound and makes the various event handlers more consistent. Finally, it gives us a better way
    of passing the rule config to the event handler functions. The rule config is now passed as the
    second argument.

Additions

  • Rules can now be enforced in parallel Or, asynchronously to be more correct. Enable with:
    new Rulebook({ enforceParallel: true })
  • Rules can be cloned: rule.clone()
  • Rules now take an enable event If the event handler returns anything that is not true, the
    rule is skipped.
  • Rulebook is now an iterator, allowing you to loop over rules.
  • Rulebook now allows you to filter and return an array of rules.

Fixes

  • Fixes #19: Aliased rules are now enforced with proper config
  • Fixes #30: Document sorting by specificity

Rulebound 1.2.2

Choose a tag to compare

@Lakitna Lakitna released this 19 Dec 15:33

Fixed issue where default handlers would not be removed

Rulebound 1.2.1

Choose a tag to compare

@Lakitna Lakitna released this 26 Oct 17:29

Fixed imports that I bunged up. Whoops

Rulebound 1.2.0

Choose a tag to compare

@Lakitna Lakitna released this 25 Oct 19:34
c666da6

Changed

  • Exporting more types for use with Typescript
  • Rule descriptions reflow in a Markdown fashion to allow for more flexibility when writing
    descriptions.
  • Upgraded so many dependencies

Rulebound 1.1.1

Choose a tag to compare

@Lakitna Lakitna released this 28 Nov 21:43

This time publishing the correct bundle. This version is what 1.1.0 should have been.

Rulebound 1.1.0

Choose a tag to compare

@Lakitna Lakitna released this 27 Nov 19:43

Changed

  • Moved sorting of rules in rulebook from enforce() to add(). Because of this forEach() will now be in sorted order.

Rulebound 1.0.0

Choose a tag to compare

@Lakitna Lakitna released this 27 Nov 19:43

Initial release.

Added

  • README.md and CHANGELOG.md #8
  • Configuration file for user config #11
  • Event pattern for defining define, punish, and reward #6
  • Initial development

Miscelanious

  • Added intergration tests #15