Skip to content

Releases: derbyjs/racer

v0.9.14

24 Mar 17:38
Compare
Choose a tag to compare
  • #278 - Be more defensive for delayed doc unload being triggered twice
    • Delayed doc unload was introduced in racer@0.9.12, published a few days ago, to fix a memory leak introduced by a PR from July of last year.

v0.9.13

20 Mar 23:15
Compare
Choose a tag to compare
  • #277 - Fix reference to this in _maybeUnloadDoc inner function
    • Fixes regression with unload event listeners using the pass from model.pass in racer@0.9.12, which will be marked as deprecated in NPM

v0.9.12

20 Mar 21:48
Compare
Choose a tag to compare
  • #276 - Fix memory leak when unfetching doc with pending ops (@ericyhwang)
    • This is a fix for a memory leak introduced 2019-07-04 in racer@0.9.7
    • The leak mostly affected server (Node) models, since browser models have a default unloadDelay of 1 second that makes the condition less likely to be met.

v0.9.11

29 Feb 00:51
Compare
Choose a tag to compare
  • #274 - [fix] Copy query expression to guard against subsequent in-place edits to input expression (@mskeving)

v0.9.8

13 Aug 21:12
Compare
Choose a tag to compare
  • 5be55c6 - perf: Switch from unmaintained deep-is library to fast-deep-equal (@nateps)
    • Performance profiling showed that computing large arrays diffs was very slow, with a lot of the time spent in deep-is due to a isArguments check and sorting object keys.
    • Also, deep-is has some interesting bugs when the arguments' types don't match, such as deepIs(1, []) returning true.
    • fast-deep-equal is much faster, more correct, and has a thorough suite of tests and performance benchmarks.
  • #267 - fix: Prevent issue when removing refs while processing them (@lesliekimm)

v0.9.7

24 Jul 21:10
Compare
Choose a tag to compare

Fixes

  • #266 - Do not garbage collect a doc if it has pending ops in Share (@jeremymcintyre)
  • Memory leak fixes for cases where a collection is entirely unloaded from the Model:
  • #256 - Don't create redundant ops in Model#_setDiffDeep (@zmillman)
    • Formerly, using Model#setDiffDeep on a path with a non-object value like a string would always result in an op being issued, even if the value was the same.
    • Now, it will behave as Model#setDiff in those cases, doing a strict === comparison before setting.

Internal dev updates

0f64bd6 - Update dev-dependencies (@nateps)

  • coveralls 2 -> 3
  • mocha 2 -> 6
  • istanbul -> nyc (coverage)

v0.9.6

12 Jul 18:57
Compare
Choose a tag to compare

#263 - This release adds alternative signatures for Model#start and Model#on that don't use var-args.

The changes are backwards-compatible, and there are no current plans to remove the legacy signatures. New code should use the new signatures where possible.

  1. Model#start now supports a new array format for input paths:
model.start(outPath, inPath1, inPath2, ..., fn);  // Old
model.start(outPath, [inPath1, inPath2, ...], fn); // New
  1. Model#on has a new {useEventObjects: boolean} option. If true, it calls the listener with an Event object and the wildcard-captured segments as an array:
// Old
model.on('change', 'foo.**', (captures..., value, previous, passed) => {
});
// New
model.on('change', 'foo.**', {useEventObjects: true}, (changeEvent, captures) => {
  const {type, value, previous, passed} = changeEvent;
});

v0.9.5

04 Jul 00:46
Compare
Choose a tag to compare
  • #262 - Implement async: true option for model.start() (@nateps)
    • This is an experimental performance option for Model#start.
      • When a reactive function's inputs change, by default the function gets immediately and synchronously evaluated, updating the output data.
      • This new async: true option defers function evaluation until the next tick, which also lets it dedupe multiple input changes that happen in the same event loop.
    • In general, the evaluation delay means async: true should only be used in Derby components, and only when the controller does not directly read from the output path via e.g. Model#get.
      • Normally, when controller code changes a reactive function input, it can then immediately read the reactive function output and see the effects of the change to the input.
      • With async: true, the reactive function's output will continue to have the old value until the next event loop.
      • Chained reactive functions in components can use async: true, as long as the controller doesn't directly read any values downstream of the async: true functions.

v0.9.4

05 Jun 22:47
Compare
Choose a tag to compare
  • #251 - Fix typo in Doc.js: lenth -> length (@distracteddev)
    • This fixes a logging issue with debugMutations on, where a locally-issued mutation on a remote collection would only get logged with its collection+id, when it should have also included the subpath under the doc.
  • #259 - Dedupe queries when calling model.unbundle (@ericyhwang)
    • This allows model.unbundle to be called multiple times, with fetch/subscribe counting incrementing appropriately each time.
  • #260 - Add Model#_getOrCreateQuery method (@ericyhwang)
    • Mostly an internally-facing change, which allows Query subclasses to be created without code duplication.