emberjs/ember.js — pull request #4918 by machty (2014-05-22 18:36:40+00:00)
Title: [BUGFIX] ReduceComputed.property() appends to depKeys

Maybe this is enough of an enhancement to be considered a feature, but if
you’re using a reduce / array computed, and you’d like to add additional
dependencies that should invalidate that property, you have to call
.property() on the CP and then repeat all of the previously established
dependent keys already supplied by the internal API for reduce/array computed.

This changes makes it so that calling .property() on a reduce/array CP will
append to the list of dependent keys, so that you can just write something
like:

filteredItems: function filter(‘model’, function(i) {
return i.get(‘val’) === this.get(‘filterValue’);
}).property(‘filterValue’);

rather than having to annoyingly retype ‘model’

filteredItems: function filter(‘model’, function(i) {
return i.get(‘val’) === this.get(‘filterValue’);
}).property(‘model’, ‘filterValue’);

I can’t think of a use case for array/reduce CP where you actually want to
rewrite the dep keys vs append to it but lemme know if i’m craycray.