Keep live-debugger test helpers out of shipped code by watson · Pull Request #408 · DataDog/build-plugins · GitHub
Skip to content

Keep live-debugger test helpers out of shipped code#408

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
watson/move-test-only-code-to-tests
Jun 12, 2026
Merged

Keep live-debugger test helpers out of shipped code#408
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
watson/move-test-only-code-to-tests

Conversation

@watson

@watson watson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What and why?

Keep live-debugger test-only helpers out of the shipped transform module. The syntax validation helper is only used by transform unit tests, and the optional peer dependency loader no longer needs to be exported for direct test access.

How?

Moved validateSyntax into packages/plugins/live-debugger/src/transform/index.test.ts and imported @babel/parser there directly. Made requireOptionalPeerDep private in packages/plugins/live-debugger/src/transform/index.ts while preserving the same runtime behavior through transformCode.

Validated with yarn test:unit packages/plugins/live-debugger/src/transform/index.test.ts.

Move the transform syntax validation helper into the test file that uses it so
it is no longer exported from the shipped transform module.

Also make the optional peer dependency loader private now that its behavior is
covered through the transform path rather than direct test access.
@watson watson requested review from a team and yoannmoinet as code owners June 11, 2026 05:12

watson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants