Version 5.0.4 #1818
Version 5.0.4
#1818
Replies: 1 comment 6 replies
-
@jamonholmgren thank you again for your maintenance of this project! Unfortunately soon after the release I've discovered a regression related to snapshot preprocessing, for which I've introduced PR #1822. Sadly the way snapshot preprocessors are implemented is quite flaky and makes these corner cases hard to detect. I've tested this as thoroughly as I could, both on our production project and with tests. Hopefully a quick patch can be released to prevent regressions for any users of the package. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This patch-level release fixes three issues with node reconciliation. Thanks to @adamkovalsky for the PR!
getReconcilationType
method toBaseNode
, which returns the type which should be used for reconcilating the node. This is normally the node'stype
, but in the case ofsnapshotProcessor
it is overridden to be thesnapshotProcessor
type. This is necessary so that the union typereconcile
can correctly reconcile the "current" node first if it's possible. This fixes Reconciliation of a snapshotPreprocessor wrapped in a union can fail #1791.snapshotProcessor
type'sisValidSnapshot
andis
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 snapshotProcessor preProcessor wrongly called with undefined when wrapped with maybe #1777.areSame
utility to first check that the provided value is a valid snapshot before callingisMatchingSnapshotId
, 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!
This discussion was created from the release Version 5.0.4.
Beta Was this translation helpful? Give feedback.
All reactions