Skip to content

Propagate parent and root context into wrapped parsers - #360

Open
Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261124-9130-binary-wrapper-context
Open

Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261124-9130-binary-wrapper-context

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

With useContextVars() enabled, wrapped child parsers currently cannot access $parent and $root even though nested parsers can. Pass the containing object and root to both inline and aliased wrapped parsers, then remove the temporary context properties from returned objects. Tests use a wrapped child inside a nested parent to distinguish $parent from $root, and preserve the default disabled behavior.

Validation: added regressions fail on unchanged master. Node suite: 259 passed; Chromium suite: 130 passed, 1 skipped. TypeScript build, full repository formatting check, and type-aware oxlint pass. Tested on Node 24 / Windows.

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