Support optional dependency integrity by sdkennedy2 · Pull Request #421 · DataDog/build-plugins · GitHub
Skip to content

Support optional dependency integrity#421

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
codex/optional-deps-integrity
Jun 18, 2026
Merged

Support optional dependency integrity#421
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
codex/optional-deps-integrity

Conversation

@sdkennedy2

Copy link
Copy Markdown
Collaborator

Motivation

Published plugin packages currently sync required dependencies from internal workspaces, but the integrity command does not preserve whether a propagated dependency is optional. That makes it difficult to keep native, platform-specific packages optional when they are introduced by shared internal code.

Changes

  • Teach dependency integrity to read internal workspace optionalDependencies.
  • Propagate expected optional dependencies separately from required dependencies.
  • Keep required dependencies authoritative when the same package appears as required in one workspace and optional in another.
  • Reuse the same mismatch reporting/apply flow for both dependency sections.

QA Instructions

yarn cli integrity
git diff --check

@yoannmoinet yoannmoinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just two very small nits.

Comment thread packages/tools/src/commands/integrity/dependencies.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could it be that we would rewrite optionalDependencies: {} in case it's getting emptied?

@yoannmoinet

Copy link
Copy Markdown
Member

Maybe we could have tests, to fix the implementation too.
Now that AI makes it easy to generate, maybe it's worth doing.
Can also be done in a separate PR too.

@sdkennedy2

Copy link
Copy Markdown
Collaborator Author

Good call on the test. I'll add it 👍

Copy link
Copy Markdown
Collaborator Author

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit a2cc076 into master Jun 18, 2026
5 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the codex/optional-deps-integrity branch June 18, 2026 13:22
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.

2 participants