👷 Ensure test apps use peerDependencies for @datadog/* packages#4491
Merged
thomas-lebeau merged 2 commits intomainfrom Apr 16, 2026
Merged
👷 Ensure test apps use peerDependencies for @datadog/* packages#4491thomas-lebeau merged 2 commits intomainfrom
thomas-lebeau merged 2 commits intomainfrom
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: dd2ceb5 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
507aaed to
fbe0a2e
Compare
- Add `checkTestAppPackage` to `check-packages.ts` that iterates over `test/apps/*` and fails if any `@datadog/*` package appears in `dependencies` instead of `peerDependencies` - Extend the `PackageJson` interface with `dependencies`
fbe0a2e to
dd2ceb5
Compare
BeltranBulbarellaDD
approved these changes
Apr 16, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
Test apps that list
@datadog/*packages independenciescauseyarn installto resolve them from the registry instead of using local workspace versions. This leads to dirty git trees after building (updated lockfiles, unexpected resolutions) and makes builds non-reproducible. The convention is to usepeerDependenciesso local packages are only installed at build time viabuild-test-apps.see also: #4387
Changes
check-packagesrule that enforcespeerDependenciesfor@datadog/*packages in test apps.nuxt-appfromdependenciestopeerDependenciesfor@datadog/*packages.Test instructions
yarn node scripts/check-packages.ts— should pass.@datadog/*package todependenciesin any test app'spackage.json—check-packagesshould fail with a clear error.yarn build:apps --app nuxt-app— should not leave the directory dirty.Checklist