Skip to content

Cleanup noisy test output#20015

Merged
RobinMalfait merged 2 commits into
mainfrom
chore/cleanup-test-output-noise
May 6, 2026
Merged

Cleanup noisy test output#20015
RobinMalfait merged 2 commits into
mainfrom
chore/cleanup-test-output-noise

Conversation

@RobinMalfait
Copy link
Copy Markdown
Member

@RobinMalfait RobinMalfait commented May 6, 2026

This PR cleans up the noisy test output where some console.warn messages were leaking into the test output.

This also uses the src/ files instead of the dist/ files of @tailwindcss/node to get rid of a source map related warning in tests. It also means that we don't have to rebuild @tailwindcss/node when we make changes.

Test plan

  1. Existing tests pass
  2. Output is clean when running tests (vitest run --reporter=minimal)

Before:
image

After:
image

@RobinMalfait RobinMalfait requested a review from a team as a code owner May 6, 2026 08:54
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Confidence Score: 5/5

Safe to merge — all changes are scoped to test infrastructure and dev-time package resolution, with no impact on published output.

The publishConfig.exports override correctly preserves the compiled dist/ paths for consumers of the published package, and the files field already limits publish artifacts to dist/. The new require-cache.ts ESM entry is an exact copy of the existing .cts file, satisfying the updated import condition used only in the local dev environment where jiti handles execution. Test-side changes are minimal and well-scoped.

No files require special attention.

Reviews (5): Last reviewed commit: "use source files instead of dist files i..." | Re-trigger Greptile

Comment thread packages/tailwindcss/src/utilities.test.ts Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7872ebbe-03bb-4d98-ba39-cbea2bd9c78c

📥 Commits

Reviewing files that changed from the base of the PR and between 4255671 and 1cb7254.

📒 Files selected for processing (4)
  • packages/@tailwindcss-node/package.json
  • packages/@tailwindcss-node/src/require-cache.ts
  • packages/@tailwindcss-postcss/src/index.test.ts
  • packages/tailwindcss/src/utilities.test.ts

Walkthrough

The pull request modifies the @tailwindcss-node package exports configuration to reference TypeScript source files instead of built distribution files. A publishConfig section with public access was added to expose dist artifacts during publishing. A clearRequireCache function was added to provide functionality for deleting entries from Node's require cache. Tests in @tailwindcss-postcss and tailwindcss packages were updated to include console.warn spies and verify warning outputs via inline snapshots and assertions.


Comment @coderabbitai help to get the list of available commands and usage tips.

@RobinMalfait RobinMalfait force-pushed the chore/cleanup-test-output-noise branch 2 times, most recently from 193ff92 to 71bb1a4 Compare May 6, 2026 09:04
In other packages we use the src files as well and only use the dist/
files when we actually publish.

This solves an issue where we _have_ to build `@tailwindcss/node` first,
and gets rid of some of the warnings you get when running tests.
@RobinMalfait RobinMalfait force-pushed the chore/cleanup-test-output-noise branch from 71bb1a4 to 1cb7254 Compare May 6, 2026 09:10
@RobinMalfait RobinMalfait merged commit 12eb5ae into main May 6, 2026
7 checks passed
@RobinMalfait RobinMalfait deleted the chore/cleanup-test-output-noise branch May 6, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant