Repository navigation
fix: validate asynchronous array children - #95
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ArrayType.of()currently invokes childcheck()methods duringcheckAsync(), so async child rules can be skipped and an invalid array can be reported as valid. Dispatch structural array rules through child async checks for scalar arrays, tuples, shaped objects and nested arrays, including scalar entries already supported by nested-array schemas.Preserve indexed field paths, nested error results and priority/required guards. Wrap each child call so a later synchronous checker throw does not detach an earlier rejection. Retain synchronous rule/message ordering within the new array traversal while preserving the existing factory-before-rule order of direct async field checks.
Validation: the 33-case regression fixture has 25 failures and eight passes on the original source. The candidate passes all 207 tests on Node 16.20.2, 18.20.8, 20.20.2 and 22.22.3; lint and CJS/ESM builds pass on all four, with byte-identical emitted files. An independent private tarball consumer passes all 627 Form/Table cases in both Chromium and Firefox and the RSuite TypeScript check. That consumer removes three old synthetic array-validation workarounds from test setup while retaining their ownership, cleanup and callback assertions; the corresponding fixture migration is required when RSuite adopts the future release.
Package version remains 2.4.3. Release preparation and RSuite adoption follow separately.