refactor(web_core): allow overriding recursion depth in DataValueSchema for v0_8#1431
Merged
Merged
Conversation
josemontespg
approved these changes
May 14, 2026
Collaborator
josemontespg
left a comment
There was a problem hiding this comment.
LGTM. Should we add this change to the changelog?
Collaborator
Author
Good idea. Done. |
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.
Description
Fixes #1424
This PR allows developers to override the hard-coded recursion depth limit in
DataValueSchemawhile maintaining backward compatibility.Changes
DataValueSchemainrenderers/web_core/src/v0_8/schema/common-types.tsfrom a static constant to a factory functioncreateDataValueSchema(options?: { maxDepth?: number }).DataValueSchemaas a constant using the default limit of 5.renderers/web_core/src/v0_8/schema/common-types.test.tsto verify the recursion depth limits.Impact & Risks
DataValueSchemabehavior is unchanged, so there should be no breaking changes for existing usages.Testing
common-types.test.tsto verify default and custom depth limits.node --test dist/src/v0_8/schema/common-types.test.js.