Fix CI typecheck cache invalidation by watson · Pull Request #444 · DataDog/build-plugins · GitHub
Skip to content

Fix CI typecheck cache invalidation#444

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
watson/fix-ci
Jul 1, 2026
Merged

Fix CI typecheck cache invalidation#444
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
watson/fix-ci

Conversation

@watson

@watson watson commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What and why?

Fixes CI typecheck failures caused by TypeScript parsing @jridgewell/remapping's invalid CJS declaration when cached generated build artifacts make the package resolve through the default export condition.

Example failure: https://github.com/DataDog/build-plugins/actions/runs/28236150739/job/84499949413

../../node_modules/@jridgewell/remapping/types/remapping.d.cts(20,141): error TS1005: '{' expected.
The command failed in workspace @dd/tests@workspace:packages/tests with exit code 2

Also broadens the CI build cache key so generated dist artifacts are invalidated when any build tooling source changes, not only rollupConfig.mjs.

How?

Adds a Yarn patch for @jridgewell/remapping@2.3.5 that rewrites the invalid export = function remapping(...) declaration into the standard declare function remapping(...); export = remapping; form.

Updates CI cache hashFiles inputs from packages/tools/src/rollupConfig.mjs to packages/tools/src/** for the plugin build caches.

@watson watson requested a review from a team as a code owner July 1, 2026 09:59
@watson watson requested review from sarenji and removed request for a team July 1, 2026 09:59

watson commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jul 1, 2026

Copy link
Copy Markdown

Patch @jridgewell/remapping's invalid CJS declaration so TypeScript can
parse it when CI resolves the package through the default export condition.

Include all build tooling sources in the build cache key so generated dist
artifacts are refreshed when declaration bundling code changes.

@sarenji sarenji left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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