Skip to content

Releases: fpereiro/recalc

5.1.2

04 Aug 07:37
Compare
Choose a tag to compare
  • Upgrade teishi v5.0.3 -> v5.1.0

5.1.1

17 Jun 19:02
Compare
Choose a tag to compare
  • When adding items to r.addLog, we now copy args, so that if it is modified later, we will preserve their original contents at the moment that the logging entry was done.

5.1.0

25 Feb 21:17
Compare
Choose a tag to compare
  • Replace r.logpush with r.addLog. r.addLog merely receives the log object and pushes it to r.log, so it's handier to modify it to either stop or change the behavior of logging.

5.0.4

03 Dec 12:07
Compare
Choose a tag to compare
  • Fix a typo in a readme link.
  • Fix a typo in the code that didn't affect functionality (r.count.l -> r.count.r).

5.0.3

17 Nov 11:57
Compare
Choose a tag to compare
  • Fix typos in documentation and error message regarding forbidden ids passed to B.respond.

5.0.2

09 Jul 13:13
Compare
Choose a tag to compare
  • When passing a responder id to a from entry of an event, also add the id of the event that matched the responder, in the form responderId/eventId. This disambiguates which execution of a responder called an event when said responder is matched multiple times.

5.0.1

02 Jul 12:25
Compare
Choose a tag to compare
  • Add missing information about args in r.call.
  • Fix misleading typo in example about async responders.

5.0.0

26 Jun 12:48
Compare
Choose a tag to compare
  • Renaming of the main operations: r.say -> r.call, r.listen -> r.respond, r.listeners -> r.responders, lfun -> rfun.
  • Change default path matching: the paths of event and responder must match completely.
  • responder match function:
    • Arguments passed to match function in a responder have been reversed: the object with the event's verb and path goes now first, the responder goes second.
    • Extra arguments passed to event are now also passed to match function.
  • If r.call encounters an error, it will only pass the context to r.error only if it received one.
  • r.compare has reversed the order of arguments: eventItem, then responderItem.
  • Eliminate r.random; use incrementing ids (instead of random ids) for both events and responders (the latter only when an id is not specified by the user). This allows for easier debugging.
  • Passing ids to r.respond of the form Rd... or Ld... (where d are digits) is now forbidden.
  • r.log:
    • r.log will now also include information on which responders were matched. For example, if an event with id E1 matches a responder with id R1, R1 will contain an entry in r.log with a from field E1. This allows to track not just events, but also responders.
    • If an event is called by a responder (and x is passed to B.call), the log entry for the event will have the from field pointing to the responder's id (x.responder.id will be used if it's present; otherwise, x.from will be used). The information of the event that matched the responder will also be on the log. If before a chain was represented as E1 -> E2 (going through R1), now it will be expressed as E1 -> R1 -> E2.
  • Upgrade dale v6.0.1 -> v6.0.2, teishi v5.0.2 -> v5.0.3.

4.1.0

06 Feb 13:40
Compare
Choose a tag to compare
  • Bugfix: when passing an integer as an id to a listener, convert it to string so that it can be then passed as part of x.from without triggering an error.
  • Bugfix: if passing a falsy value for an id field (either 0 or an empty string), use it instead of generating a random id.
  • All functions now use r.error (which defaults to teishi.clog) to handle errors.
  • r.prod can now be set to true to enable production mode (validations are skipped).
  • Listeners of equal priority are now run by oldest first, to avoid execution sequences of unspecified order. The index property (an integer) was added to listeners for this purpose, plus the variable r.count to keep the count of how many listeners were added already.
  • Allow for disabled flag in listener to turn it off temporarily (without having to forget it).
  • Add benchmarking at the end of the test suite.
  • Internal change: remove unnecessary argument iteration in r.mill.

4.0.3

26 Nov 15:03
Compare
Choose a tag to compare
  • Upgrade dependencies: dale v6.0.0 -> v6.0.1, teishi v5.0.1 -> teishi v5.0.2