Repository navigation
fix(core): isolate loader configuration between worker threads - #888
Merged
Brooooooklyn merged 3 commits intoOct 24, 2026
Merged
Brooooooklyn merged 3 commits into
Brooooooklyn merged 3 commits into
Conversation
This was referenced Oct 23, 2026
Brooooooklyn
approved these changes
Oct 24, 2026
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.
After the parent transforms a file, a worker cannot select a different
tsconfig. The native addon shares configuration and resolver caches across threads.Give each JavaScript thread its own loader context. Native asynchronous transforms use their caller's context, including configuration selected from that thread's
process.env. An asynchronous transform selects its configuration when the caller submits it.module.register()receives the selected configuration and dependency mode. Registration freezes both settings, so later changes cannot make CommonJS and ESM use different settings.Rust embedders use
OxcTransformer::capture_context()before queuing work andCapturedLoaderContext::with()inside the task. Each scoped call restores the task thread's prior context after completion or panic.Fixes #884.