A shallow clone (computed via lodash's clone
function) of the original node.
Used when a copy of the original node is needed after the original has already
been mutated by the update
method.
The YAML data structure the updater is operating on.
After computing the required starting nodes, we go over each updated node and try to match it with an old corresponding node:
We mutate the old node because we need to preserve all node references, as it is required for preserving anchors and aliases.
Generated using TypeDoc
The serializer preserves comments and styling by using an updater system. We first use the
yaml
library to create a node representing the updated value and then to parse the original source into a document whose nodes will be used to preserve the required information.