fix: restore legacy bundler compatibility - #294
Merged
Merged
Conversation
Bundler integrations written against the pre-3.5 internals expect getExports() to return a Set and register() to accept namespace setter/getter maps. The 3.5.0 shape changes otherwise fail during wrapper generation and runtime registration. Keep both old shapes behind compatibility entry points while retaining the optimized loader path for current wrappers. Refs: DataDog/dd-trace-js#10241
BridgeAR
marked this pull request as ready for review
September 9, 2026 22:11
timfish
approved these changes
Sep 10, 2026
bengl
approved these changes
Sep 10, 2026
Merged
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.
What Changed?
Restore the pre-3.5
getExports()Set result and five-argumentregister()form for existing bundler integrations. Current wrappers retain the optimized structured metadata andModuleBinderpaths.Why?
import-in-the-middle 3.5 changed two internal interfaces used by dd-trace-js's esbuild plugin. Fresh dependency resolution can otherwise fail while generating or registering wrappers.
Additional Notes
Verified with 129 unit tests, lint, type tests, e2e tests, changed-line coverage, and the dd-trace-js esbuild bundle/runtime tests.
Refs: DataDog/dd-trace-js#10241