Skip to content

Releases: canjs/can-define

Add support for value and oldValue in events

08 Aug 18:50
Compare
Choose a tag to compare

Dispatched events now have a value that represents the new value, and an oldValue for the old value.

defineMap.listenTo("prop", (ev) => {
  console.log("New value", ev.value, "Old value", ev.oldValue);
});

Fix warning code

17 Jul 02:35
Compare
Choose a tag to compare

This updates and fixes the conditions for warning when type, default, and a zeroArg getter with no setter is present. Also removes false positive warnings for situations when type is still use, for example with a setter present.

related to:
#468
#469

Zero-argument getter warning updates

11 Jul 21:55
Compare
Choose a tag to compare

This release fixes two issues - It warns when you have type or Type with a zero argument getter and also fixes Default to warn even when the the default value is falsey (previously it only warned when default had non-falsey values)

(Updated) Tests using canReflect.getName in assertions fail in IE11

07 Jun 18:18
Compare
Choose a tag to compare

Test failed due to canReflect.getName returning a certain value fail in IE11 because of how we name functions differently in IE11. With this fix, the tests use regular expressions to make the assertions less strict.

Updated More test with RegEx

Issue #461

Tests using canReflect.getName in assertions fail in IE11

05 Jun 21:07
Compare
Choose a tag to compare

Test failed due to canReflect.getName returning a certain value fail in IE11 because of how we name functions differently in IE11. With this fix, the tests use regular expressions to make the assertions less strict.

Issue #461

Trying to set a getter that doesn't take `lastSet` throws an unhelpful error

31 May 20:32
Compare
Choose a tag to compare

When a getter had zero-arguments, it threw an unhelpful error: Error: can-reflect.setValue - Can not set value. With this fix, an improved warning has been added to give users a better idea of what they've done wrong.

#367

Warn on mutations done at unsafe times

29 May 21:41
Compare
Choose a tag to compare

Observable data should not be set while getters are running. With this update, users will be warned in development mode in cases where this is happening.
#454

[3.x Legacy] Fix @@can.offKeyValue / DefineList bug in v1.5.8

29 May 21:43
Compare
Choose a tag to compare

All handlers for a named property were being torn down if @@can.offKeyValue was called on a DefineList. With this release, only the supplied handler is removed.

QUNIT2 upgrade

28 May 18:14
Compare
Choose a tag to compare

This updates the tests to use [email protected].

#452

[3.x Legacy] Fix @@can.offKeyValue in DefineList for named properties

24 May 04:37
Compare
Choose a tag to compare

Listeners on named properties in DefineLists weren't unbinding correctly when using canReflect.offKeyValue() to unbind. (removeEventListener/unbind/off were not affected by this issue). This release provides a fix to that issue.