Dashboard-2 v1.21.0 release breaks existing Datastore behavior

I have just upgraded to Dashboard-2 v1.21.0, and it seems to have changed the datastore behavior (from replace to merge, as described in #1465). Also, when saving a string, the datastore now returns it as a buffer.

While the merge option is a very welcome improvement, it breaks some of my existing ui-nodes, who store their latest data snapshot, and assume that datastore.save is replacing the previous snapshot. I have updated my nodes (to call a datastore clear before the save).

Just mentioning this as an FYI to dashboard-node developers who may encounter similar issues.

1 Like

It should have been backward compatible, what was the issue caused by the change? Were you reliant upon previously sent properties being cleared on new messages coming in?

I am saving the current data snapshot of the node. After the datastore change, the new save adds new properties and updates existing ones correctly, but does not remove from the store properties which are no longer in the data.