Repository navigation
Conversation
Convert Symbol path components only for error-message formatting while preserving raw path and key identities in structured failures. AI assistance: OpenAI Codex.
FanWu-ai
marked this pull request as ready for review
October 11, 2026 21:53
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.
Validating a Map with a Symbol key and an invalid value throws a native
TypeErrorwhile formattingpath.join('.'), beforeStructErrorcan be returned. This also makesis()throw instead of returningfalsefor that invalid value.Convert only Symbol path components to text when constructing the message. Keep the original Symbol identities in failure paths and keys, and preserve existing formatting for ordinary path components. Add eight tests covering structured errors, boolean validation, nested paths, custom messages and valid-map compatibility.
Validation on Linux / Node 24.19.0 and 22.19.0:
npm test: 225 tests; final: 233 tests on both runtimes. Builds and source/test type checks pass.npm run lintpasses.git diff --checkpasses; no dependency or lockfile changes.The reused dependency tree retains the previously documented
expect@29.7resolution permitted by@types/expect's wildcard, compatible with the repository's TypeScript 4 toolchain. No new downgrade was made; a fresh unpinned CI install may resolve differently. Other runtime/platform and hosted results are not claimed.This differs from #1135's Symbol-value printing change; it fixes Symbol components of error paths. Prepared and tested with OpenAI Codex assistance; no human review is claimed.