Closed rjsmith closed 9 years ago
Related to issue #14
Added initial testapp for issue #21 including tests covered by this PR
Thanks, Richard. This is a pretty significant step in the evolution of this package.
Okay. There have been a number of bugfixes and improvements since the last release. You've verified that most of the changes are working with jasmine tests. I've done some acceptance testing in my app. I'm about ready to release a new version. Thoughts?
As far as I am concerned, that would be great. As the MIT license says:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND ...
Hahaha... done! Just released 0.6.17.
This PR is an attempt to solve the problem of saving update commands into the Transactions collection that contain '$' modifiers, like
$each
, as illustrated in this Jasmine test:It saves objects and arrays as JSON - stringified strings, in a {json:} sub-object, and then uses JSON.parse() if the packaged command value has a
json
field, when unpackaging the serialised command ready for execution.This should work when undo-ing Transaction documents created before this commit (they won't have the
json
sub-object, so will just read it straight out as an object).This change has been successfully tested in my own meteor-transactions test repo here: https://github.com/rjsmith/meteor-transactions-bug-repo, in particular this test