Skip to content

Fix circular dependencies in core and cmpapi - #22

Open
sevriugin wants to merge 2 commits into
masterfrom
fix/circular-dependencies-core-cmpapi
Open

sevriugin wants to merge 2 commits into
masterfrom
fix/circular-dependencies-core-cmpapi

Conversation

@sevriugin

Copy link
Copy Markdown

Break the runtime require cycles that bundlers such as Metro flag as "Require cycle ... can result in uninitialized values":

Both changes are internal only and preserve the public API. Adds a regression test in core and cmpapi that fails on any circular dependency in the compiled CommonJS output.

(cherry picked from commit 0293895)

8bit-echo and others added 2 commits October 8, 2026 13:42
Break the runtime require cycles that bundlers such as Metro flag as "Require cycle ... can result in uninitialized values":

- core: use `import type` for type-only imports and import values from
  their source module instead of a barrel (fixes InteractiveAdvertisingBureau#390).
- cmpapi: EventListenerQueue no longer imports GetTCDataCommand at module
  evaluation time; GetTCDataCommand registers itself on load (fixes InteractiveAdvertisingBureau#348).

Both changes are internal only and preserve the public API. Adds a
regression test in core and cmpapi that fails on any circular dependency
in the compiled CommonJS output.

(cherry picked from commit 0293895)
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.

Cyclical dependency warning Circular dependencies with TypeScript

2 participants