Skip to content

Version 5.0.4

Compare
Choose a tag to compare
@jamonholmgren jamonholmgren released this 25 Oct 16:54
· 135 commits to master since this release

This patch-level release fixes three issues with node reconciliation. Thanks to @adamkovalsky for the PR!

  • Adds a getReconcilationType method to BaseNode, which returns the type which should be used for reconcilating the node. This is normally the node's type, but in the case of snapshotProcessor it is overridden to be the snapshotProcessor type. This is necessary so that the union type reconcile can correctly reconcile the "current" node first if it's possible. This fixes #1791.
  • Fixes the snapshotProcessor type's isValidSnapshot and is methods to return a validation error and not to throw if the specified preprocessor fails, which can happen when checking if an arbitrary snapshot is valid input (e.g. when determining a union type). We can't expect preprocessors to accept any arbitrary input, so we must assume they can throw when provided with invalid snapshots. This also fixes #1777.
  • Fixes the array's areSame utility to first check that the provided value is a valid snapshot before calling isMatchingSnapshotId, to avoid the preprocessor throwing an error if the provided snapshot is invalid.

If there are any problems with this release, please file an issue or leave comments in the attached Discussion! Thanks to everyone who contributed!