Closed marchant closed 4 years ago
Agreed, how about parent: RawValueToObjectConverter then RawEmbeddedValueToObjectConverter and 1. RawForeignValueToObjectConverter ?
This merged the latest in #master to get sync capabilities in the deserializer, and it needs https://github.com/montagejs/mr/pull/146 to work, which is itself additional to the npm3 work, so both PR go hand in hand
montage tests pass, also tested with a montage data improved version of shop-demo (which wasn't working without these changes as it's the first use of a main.datareel folder that contains all data related assets) as well as Popcorn master. Please review again.
Some test fails as it needs https://github.com/montagejs/mr/pull/146, I didn't change package.json, so it still points to "18.0.0-rc1" where https://github.com/montagejs/mr/pull/146 needs to be merged on
An error with DataService
deserialization bubbled up some inconsistencies.
DataService._childServices
is designed to be a Set
, per the documentation. However, DataService.deserializeSelf
set the value to an array.
DataService.deserializedFromSerialization
called DataService.addChildServices
with DataService._childServices
. As mentioned above, DataService._childServices
is an Array
if the serialization includes child services, but is a Set
if the value is allowed to lazy load.
I am unable to write to marchant/montagejs so I pushed fixes to my own repo for these issues for your review: https://github.com/tejaede/montage/commit/982991277699a6f9280ee27995647cdab3686b7f
The fixes are:
DataService.childServices
is always a setDataService.addChildServices
so the argument can be either a Set
or an Array
cc: @marchant
There's a problem running karma on travis, we need to fix this independently of this PR, merging.
To merge after /feature/npm3