Skip to content

fix: preserve compound ancestry when filtering an empty node ID - #261

Open
Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-20261125-77d1-graphlib-empty-parent
Open

Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-20261125-77d1-graphlib-empty-parent

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Filtering out a compound node named "" currently recreates it when its children are attached to the filtered graph. Treat only undefined as an absent parent so children move to the nearest retained ancestor, or the graph root. Adds regressions for both cases and for retaining the empty-named parent.

Validation: 284 Jest tests pass, plus package build, TypeScript checking, and ESLint on Windows / Node 24.22.0. The pre-existing Windows ESM smoke test fails on the unchanged base with ERR_UNSUPPORTED_ESM_URL_SCHEME; only that test was excluded from this run (tracked separately in #258).

Developed with AI assistance; the regressions were reproduced on the unchanged base before applying the fix.

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.

1 participant