Skip to content

Fix root references through shared objects - #362

Open
flcrom wants to merge 2 commits into
ravionhq:mainfrom
flcrom:fix-shared-root-references
Open

flcrom wants to merge 2 commits into
ravionhq:mainfrom
flcrom:fix-shared-root-references

Conversation

@flcrom

@flcrom flcrom commented Sep 30, 2026

Copy link
Copy Markdown

Restore root references after the other object aliases. Otherwise a shared object replaced by a shorter-path representative loses its already-restored reference back to the root.

Adds regression tests for both property orders and dedupe settings, array roots and legacy metadata. The affected cases fail before the fix.

Tested on Node 22: full suite (92 passed, 1 existing skip, 1 todo), TypeScript build and repository benchmark. Also checked shared children through arrays, Maps and Sets using the built package.

Fixes #361

@flcrom
flcrom requested a review from Skn0tt as a code owner September 30, 2026 15:52
@greptile-apps

greptile-apps Bot commented Sep 30, 2026

Copy link
Copy Markdown

PR author is not in the allowed authors list.

@flcrom

flcrom commented Oct 10, 2026

Copy link
Copy Markdown
Author

Bumping this in case it got lost. Happy to update if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parse(stringify(v)) returns null for a reference back to the root when the object holding it is shared

1 participant