Skip to content

Releases: aichaos/rivescript-js

2.2.1 - Nov 23 2022

24 Nov 07:12
Choose a tag to compare
  • Bugfix: number tags <add>, <sub>, <mult> or <div> were not working on new variables (returning an error like "could not 'add' non-numeric user variable" because the variable was 'undefined'). This is now fixed and undefined variables evaluate as zero to be modified by these tags.

2.2.0 - Oct 1 2021

02 Oct 03:56
Choose a tag to compare

This release includes various bugfixes and features from the GitHub community.

There is a new algorithm for handling the nestable tags (such as <get>, <set>, <bot>, and other variable getter/setter tags)
and it works with <call> tags, too! Thanks, @lee-orr! (PR #377)

+ *
- <set value=<call>add_hello <star></call>>
  ^ The answer is: <get value>.

> object add_hello javascript
    return "hello:" + args[0];
< object
  • Bugfix: missing 'let' in for loop (#340)
  • If an error is raised within an object macro, include the error in the
    bot's response (#341)
  • Fix a truthiness check for whether bot/env vars are 'undefined' (#350)
  • Fix the _ word wildcard not working when multiple are in the same
    trigger (#356)
  • Add example: json-server-async (#207)
  • An option to treat user inputs as case-sensitive instead of always
    lowercasing them (#246/#378)
  • Various Dependabot dependency updates.

2.1.0 - March 13 2020

14 Mar 00:24
Choose a tag to compare

2.1.0 - Mar 13 2020

  • The RiveScript shell.js script is now installed as a command line program
    when you npm install rivescript. Call it like riveshell /path/to/brain
    or, if installed locally, npx riveshell /path/to/brain (PR #330)
  • TypeScript definition fixes.

2.0.0 - February 25 2019

26 Feb 05:24
Choose a tag to compare

2.0.0: The Async/Await Update

This is a major new version of RiveScript. It adds async/await support and
makes the API asynchronous everywhere. It also decaffeinates the code,
migrating it from CoffeeScript back to native ES2015+ with modern syntax.

See the Upgrading-v2 document for information about what's
new and how to upgrade your code.

v2.0.0 last minute changes:

  • Fix a bug where <reply> in +Trigger wasn't being formatted properly
    (lowercased, etc.) so matching was difficult.
  • Add a Redis driver for an example User Variable Session Manager that
    stores variables directly to the cache, and an eg/redis example bot
    that demonstrates it.
  • Write documentation for final v2.0.0 launch.

2.0.0-beta.1 - Jan 16 2019

  • Republish to npm after updating TypeScript definitions.
  • Move release status to "beta"

Before 2.0.0 final release there should be at least one User Variable Session
Driver implemented (likely Redis) to verify the session interface is working
as intended.

2.0.0-alpha.6 - Jul 9 2018

  • Make loadFile() and loadDirectory() backwards compatible so "simple" bots
    won't need to change anything to upgrade, but will get deprecation warnings
    instead. ("Simple" bots used loadFile() or loadDirectory() in conjunction
    with replyAsync(), and didn't use any other functions that changed).

2.0.0-alpha.5 - Jul 7 2018

  • Fix <botstar> not working at all.
  • Make loadFile() and loadDirectory() promise-based.
  • Add the User Variable Session Manager Interface and break backwards
    compatibility on all methods that use user variables (e.g.
    getUservar(), lastMatch(), etc.)

2.0.0-alpha.3 - June 23 2018

  • Fix a runtime error when <input> is used in a trigger.
  • Reformatted the unit tests to use ES2015 multi-line string literals.

2.0.0-alpha.2 - June 16 2018

  • Decaffeinate the source code from CoffeeScript back into native JavaScript.
  • Add async/await support into the reply process, which enables support for
    a lot of new async features, including use of <call> tags in
    *Condition checks and for replacing the user variable session manager
    with one backed by a database.
  • Deprecated: replyAsync().

1.19.0 - March 4 2018

04 Mar 21:25
Choose a tag to compare


  • 1.19.0 2018-03-04
    • Add the new ?Keyword command to work around the problem that Unicode
      text wouldn't match properly with optional wildcards. For example,
      + [*] 你好 [*] wasn't able to match messages containing the word "你好"
      in the same way as it would if the keyword were using only ASCII symbols.
      Now, the command ? 你好 will allow you to match that keyword anywhere in
      a user's message. (PR #256)

1.18.0 - Nov 27 2017

27 Nov 21:23
Choose a tag to compare


  • 1.18.0 2017-11-27
    • Fix an infinite loop when using a number as a substitution (PR #206)
    • Optimize substitution algorithm (including person substitutions) to be
      more performant when you have a large set of substitutions defined (PR #208)
    • Add support for defining a global concatenation option when constructing
      the RiveScript object. This will set the default concat mode when
      parsing files that didn't define their own local mode (PR #209)
    • Add API function lastTriggers(username) to retrieve the full set of
      triggers that were last matched for that user. For example, if some triggers
      redirected to others, all the triggers that were touched will be
      returned by this function (PR #217)
    • Remove dependency on jQuery for loading files in a web environment and
      instead use a standard XMLHttpRequest (PR #251)

1.17.2 - Jan 19 2017

19 Jan 16:55
Choose a tag to compare


  • 1.17.2 2017-01-19
    • Fix <call> tags not working inside of the @Redirect command and the
      inline redirect {@} tag. Note that only synchronous object macros that
      return a string response are allowed in these, just like in *Condition
      commands (PR #203)

1.17.1 - December 8 2016

08 Dec 21:55
Choose a tag to compare


  • 1.17.1 2016-12-08
    • Fix sorting algorithm for triggers with %Previous, making their sort order
      deterministic and correct regardless of the order they appeared in the
      source file (PR #194)
    • Fix the function prototype for getVariable to only accept the name
      parameter for a bot variable. Previously it was accepting (username, name)
      which was incorrect because bot variables are global and have no relation
      to a particular username.

1.17.0 - October 11 2016

11 Oct 19:23
Choose a tag to compare


  • 1.17.0 2016-10-11
    • Fix accidental double-piped wildcards caused by missing arrays (PR #176).
    • Fix tags like {uppercase} in the BEGIN block from affecting object macros
      before they could be called (bug #178).
    • In the parser, include the current topic in some common error messages, such
      as syntax errors, single-character lines and unknown commands (bug #140).
    • Allow forceCase to apply to topics too, both in the > topic command and
      in the {topic=...} tag (bug #158).
    • In case of deep recursion while scanning topic inheritance trees, the error
      now includes the current topic that it gave up on (bug #167).

1.16.0 - September 6 2016

06 Sep 18:00
Choose a tag to compare


  • 1.16.0 2016-09-06
    • Add TypeScript declaration files (PR #162).
    • Add a --watch option to shell.js to automatically reload the bot's
      brain when the source files change (PR #160).
    • Fix the json-server example not giving errors correctly (passing invalid
      data into the RiveScript library and potentially raising an exception
      from within there; bug #165).