Repository navigation
fix: preserve symbols in intermediate patch paths - #1369
Open
Aryangupta-05 wants to merge 1 commit into
Open
Aryangupta-05 wants to merge 1 commit into
Aryangupta-05 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Refs #1367 (case B).
produceWithPatchescan generate a nested path containing a symbol, but replaying it throwsTypeError: Cannot convert a Symbol value to a string. Intermediate path traversal coerces symbols with"" + pbefore looking up the property.Keep symbol path segments intact, alongside strings and numbers. Six regression cases cover objects, immerable classes with non-enumerable symbol properties, forward/inverse replay, distinct symbols with the same description, and both auto-freeze settings. The original state and class prototype are checked as well.
Validation on Windows with Node 24.22.1:
784c86b) with the reported TypeError.yarn test: 4,219 source tests and 3,668 production-build tests passed (8 existing skips in each run); build and Flow passed.yarn coverageandyarn test:perfpassed.This addresses symbol traversal in case B only. Map-key preservation in #1312, patch-value cloning in #1354, and the Set identity question in case C are separate.
AI assistance: Codex investigated, implemented, reviewed, and ran the checks for this patch.