[dev] Make yarn launch prefer local plugin source code#2330
Merged
Conversation
ava-silver
marked this pull request as ready for review
May 21, 2026 13:51
🎉 All green!🧪 All tests passed 🔗 Commit SHA: e7bc8e1 | Docs | Datadog PR Page | Give us feedback! |
Drarig29
approved these changes
May 21, 2026
yarn launch prefer local plugin source code
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 and why?
yarn launchshould execute plugin command source when running with the development condition. After the bundling migration, plugin resolution tried the package root bundle before the command submodule, so local source changes could be bypassed when a staledist/bundle.jsexisted.yarn launch:distshould exercise the packaged CLI bundle instead of TypeScript-compileddist/cli.js, so it now runspackages/datadog-ci/dist/bundle.jsdirectly.How?
Prefer
@datadog/datadog-ci-plugin-<scope>/commands/<command>before the self-contained package bundle in the plugin loader. The submodule export resolves tosrcunder--conditions=developmentand todistin normal/package usage. Keep the root bundle as a fallback for bundled/plugin packages without submodule exports.Normalize dynamic imports of CommonJS command wrappers so packaged
dist/commands/*wrappers exposePluginCommandconsistently during bundled/e2e execution.Documented the difference between
yarn launchandyarn launch:distinCONTRIBUTING.md, including the bundle build commands needed for dist-mode testing.Added regression tests that verify command submodules win over self-contained bundles and that CommonJS default-export wrapper shapes are unwrapped.
Review checklist