Open grofit opened 10 years ago
@grofit When it comes to plugins this is getting tricky. To get the dependency chain right peerDependencies
must be used instead of asking the developer to install knockout
separately. From you code example I guess that's something either old or due to aforementioned problem.
This is actually a double knockout issue, it was mentioned and diagnosed elsewhere but there was no simple fix: https://github.com/knockout/knockout/issues/1624
Thanks for the details. If I were to agree on using 2 instances of KO in (i.e.) nodejs then ko.hasPrototype
would need to change to use a string based type check. That would fix this issue. But I still believe that plugins should use peerDependencies
, as it's the case for Grunt, for instance.
Yeah I use peerDependencies to sidestep the issue in my scenario
I was just testing out some stuff in nodejs and if I were to do:
It is outputting all the functions etc rather than just the raw object without observables. I notice that this project does not seem to have a package.json and other forks have added this, however it has Steve Sanderson's name on it so I thought it would be best to put down in here.
I have tried just using it without adding to the ko model i.e:
and then using the mapping variable for the mapping jobs, but that gives same result. I am using one of the 11 versions of node, but everything else is working fine (validation and the custom ko.mapping.merge library).