Skip to content

[APPS] Add published artifact loadability test#383

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sdkennedy2/add-published-artifact-loadability-test
May 21, 2026
Merged

[APPS] Add published artifact loadability test#383
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sdkennedy2/add-published-artifact-loadability-test

Conversation

@sdkennedy2
Copy link
Copy Markdown
Collaborator

@sdkennedy2 sdkennedy2 commented May 20, 2026

Motivation

The published @datadog/vite-plugin ESM artifact was recently corrupted by a build-time shim insertion issue. The package metadata looked valid, but dist/src/index.mjs could not be parsed or imported by Vite config loading. We need CI coverage that validates the generated publish artifacts, not only the TypeScript source and bundler behavior.

Changes

Adds an artifact-level unit test for each published Datadog bundler plugin. The test reads publishConfig.exports[\".\"], confirms the ESM, CJS, and type entries point at existing built files, syntax-checks the JavaScript entries with Node, and verifies both ESM import and CJS require work from a child process.

The test intentionally validates publishConfig.exports instead of local development exports, because workspace/local-link exports may point at TypeScript source while npm publish metadata points at generated dist files.

Also allows the local Node warning emitted when NO_COLOR and FORCE_COLOR are both present so the focused unit test remains stable in shells with NO_COLOR set.

QA Instructions

No manual QA needed; this is CI coverage for generated package artifacts.

Blast Radius

Low. This only changes test coverage and a Jest warning allowlist. Runtime package code is unchanged.

Documentation

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sdkennedy2 sdkennedy2 changed the title Add published artifact loadability test [APPS] Add published artifact loadability test May 20, 2026
@sdkennedy2
Copy link
Copy Markdown
Collaborator Author

@codex review
@cursor review

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented May 20, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 58b47cb | Docs | Datadog PR Page | Give us feedback!

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sdkennedy2 sdkennedy2 force-pushed the sdkennedy2/add-published-artifact-loadability-test branch 2 times, most recently from 0ecb93f to 9e42eec Compare May 21, 2026 14:33
@sdkennedy2 sdkennedy2 marked this pull request as ready for review May 21, 2026 14:38
@sdkennedy2 sdkennedy2 requested a review from yoannmoinet as a code owner May 21, 2026 14:38
@sdkennedy2 sdkennedy2 force-pushed the sdkennedy2/add-published-artifact-loadability-test branch from 9e42eec to 58b47cb Compare May 21, 2026 14:42
@sdkennedy2 sdkennedy2 marked this pull request as draft May 21, 2026 14:43
Copy link
Copy Markdown
Member

@yoannmoinet yoannmoinet left a comment

Choose a reason for hiding this comment

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

LGTM

@sdkennedy2 sdkennedy2 marked this pull request as ready for review May 21, 2026 15:35
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 36eb0cc into master May 21, 2026
6 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the sdkennedy2/add-published-artifact-loadability-test branch May 21, 2026 17:25
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