Repository navigation
fix: partial/required on tuple sequences (#1480) - #1590
Merged
Merged
Conversation
Contributor
|
Leaping into action... |
# Conflicts: # ark/schema/structure/structure.ts # ark/type/__tests__/keywords/partial.test.ts # ark/type/__tests__/keywords/required.test.ts
Member
|
looks like this got fixed in #1653 in the meantime 😅 so I merged main in and just kept your tests since they cover a couple extra cases. thanks and sorry for the delay! |
4 tasks done
ssalbdivad
added a commit
that referenced
this pull request
Oct 1, 2026
Bumps all publishable packages and documents the changes merged since 2.2.6: - fix `this[]` in self-referential object types (#1618, fixes #1406, @yharaskrik) - parse string.date.epoch.parse input as milliseconds (#1669, @breken-ai) - keep uppercase UUIDs valid in string.uuid JSON Schema (#1670, @breken-ai) - render nested bigints correctly in error messages (#1626, fixes #1477, @chatman-media) - release unused parse ids from the global registry (#1673, fixes #1584 for equivalent types, @isaacwasserman) - fix crashes on Hermes and Turbopack (#1674, fixes #1645 and #1643) #1590 only adds tests, so it has no changelog entry. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Fixes #1480
partial()andrequired()had no runtime effect on tuple sequences — only named properties were transformed. Type inference already handled tuples correctly via TS nativePartial/Required, but the schema-level sequence was unchanged.Adds
optionalize()andrequire()methods toSequenceNodethat convert between prefix/defaultable/optional element kinds. Defaultables get stripped to plain optionals (partial) or prefix (required). Forrequired()this matches existing behavior where object defaults are stripped. Forpartial()this is necessary because the sequence model requires defaultables to precede optionals, so prefix elements can't become optional without also converting defaultables.Sequences with postfix elements bail out since optionals+postfix is invalid in the sequence model.
.tassertion for defaultable tuples skipped due to #1160.mainbranchpnpm prCheckspassing