Releases: derbyjs/racer
Releases · derbyjs/racer
v0.9.14
- #278 - Be more defensive for delayed doc unload being triggered twice
- Delayed doc unload was introduced in [email protected], published a few days ago, to fix a memory leak introduced by a PR from July of last year.
v0.9.13
- #277 - Fix reference to
this
in_maybeUnloadDoc
inner function- Fixes regression with unload event listeners using the
pass
frommodel.pass
in [email protected], which will be marked as deprecated in NPM
- Fixes regression with unload event listeners using the
v0.9.12
- #276 - Fix memory leak when unfetching doc with pending ops (@ericyhwang)
- This is a fix for a memory leak introduced 2019-07-04 in [email protected]
- 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
v0.9.8
- 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.
- Performance profiling showed that computing large arrays diffs was very slow, with a lot of the time spent in deep-is due to a
- #267 - fix: Prevent issue when removing refs while processing them (@lesliekimm)
v0.9.7
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:
- #248 - Fix memory leak in CollectionCounter (@michael-brade)
- #250 - Fix memory leak in Queries (@michael-brade)
- #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.
- Formerly, using
Internal dev updates
0f64bd6 - Update dev-dependencies (@nateps)
- coveralls 2 -> 3
- mocha 2 -> 6
- istanbul -> nyc (coverage)
v0.9.6
#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.
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
Model#on
has a new{useEventObjects: boolean}
option. If true, it calls the listener with anEvent
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
- #262 - Implement
async: true
option formodel.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 theasync: true
functions.
- This is an experimental performance option for
v0.9.4
- #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.
- This fixes a logging issue with
- #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.
- This allows
- #260 - Add
Model#_getOrCreateQuery
method (@ericyhwang)- Mostly an internally-facing change, which allows Query subclasses to be created without code duplication.