Remove Tailwind CSS dependency and download during benchmarks#258
Open
bartveneman wants to merge 9 commits into
Open
Remove Tailwind CSS dependency and download during benchmarks#258bartveneman wants to merge 9 commits into
bartveneman wants to merge 9 commits into
Conversation
- Remove tailwindcss devDependency (dragged in tmp CVE, deprecated glob@7 and inflight) - Replace tailwind CSS fixtures in benchmark and arena tests with bootstrap-utilities equivalents - Remove tailwindcss from dependabot ignore list - Add vite@^8.0.16 as direct devDependency to resolve vite CVEs via vitest - Upgrade vitest and @vitest/coverage-v8 to 4.1.9 - Pin actions/upload-artifact and actions/download-artifact to SHA hashes in dependency-diff workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
… package Instead of depending on tailwindcss as an npm package (which drags in the vulnerable tmp dependency), download just the two CSS files needed for benchmarks and tests from unpkg at runtime. - Add vitest.setup.ts with ensureTailwindFixtures() that fetches tailwind.css and tailwind.min.css from unpkg into node_modules/tailwindcss/dist/ on first run; subsequent runs skip the download if files already exist - Wire globalSetup into vitest.config.ts - Call ensureTailwindFixtures() at the top of benchmark/index.ts - Revert arena.test.ts and benchmark back to original tailwind paths - Remove tailwindcss from knip ignoreDependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
The tailwind fixtures are only used in the benchmark now; no need to keep arena growth checks tied to a downloaded fixture file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
…tup.ts The download is only needed by the benchmark script, not by vitest. Inline the fetch logic directly in benchmark/index.ts and remove the vitest globalSetup wiring that had no remaining purpose. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
Contributor
|
| 📦 Package | 📋 Versions |
|---|---|
| postcss | 2 versions
|
| tinybench | 2 versions
|
| @babel/parser | 2 versions
|
| @babel/types | 2 versions
|
| @babel/helper-string-parser | 2 versions
|
| @babel/helper-validator-identifier | 2 versions
|
| @napi-rs/wasm-runtime | 2 versions
|
| @rolldown/binding-wasm32-wasi | 2 versions
|
| get-tsconfig | 2 versions
|
| tinyglobby | 2 versions
|
| @oxc-project/types | 3 versions
|
| nanoid | 2 versions
|
| rolldown | 2 versions
|
| @rolldown/binding-android-arm64 | 2 versions
|
| @rolldown/binding-darwin-arm64 | 2 versions
|
| @rolldown/binding-darwin-x64 | 2 versions
|
| @rolldown/binding-freebsd-x64 | 2 versions
|
| @rolldown/binding-linux-arm-gnueabihf | 2 versions
|
| @rolldown/binding-linux-arm64-gnu | 2 versions
|
| @rolldown/binding-linux-arm64-musl | 2 versions
|
| @rolldown/binding-linux-ppc64-gnu | 2 versions
|
| @rolldown/binding-linux-s390x-gnu | 2 versions
|
| @rolldown/binding-linux-x64-gnu | 2 versions
|
| @rolldown/binding-linux-x64-musl | 2 versions
|
| @rolldown/binding-openharmony-arm64 | 2 versions
|
| @rolldown/binding-win32-arm64-msvc | 2 versions
|
| @rolldown/binding-win32-x64-msvc | 2 versions
|
💡 To find out what depends on a specific package, run: pnpm -r why example-package
🎉 Package Size Decrease
| 📦 Package | 📏 Base Size | 📏 Source Size | 📈 Size Change |
|---|---|---|---|
| @projectwallace/css-parser | 40.7 kB | 40.7 kB | -20 B |
oxfmt reformatted arena.test.ts after the tailwind test removals left a stray blank line. Also removed `cache: pnpm` from the audit job in test.yml — pnpm audit reads only the lock file and never populates the store, so setup-node's post-step cache save was failing with a path validation error and marking the job as failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
…ator Instead of downloading tailwind.css from unpkg, generate a ~1.6 MB stylesheet programmatically using 10 selectors, 10 properties and 10 values. The generator produces all 1000 base combinations (every selector × property × value), then multiplies through 5 pseudo-class variants and 5 responsive breakpoints — 36,000 single-declaration rules total. This matches tailwind's structural density (many short utility rules per KB) while removing the external dependency entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
bootstrap was only used in benchmark/index.ts as a CSS fixture. Same pattern as tailwind: fetch from unpkg at first run, skip if already present. Removes bootstrap from devDependencies, knip ignoreDependencies, and the dependabot ignore list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
Bootstrap is no longer installed, so readFileSync on its dist files fails in CI. The synthetic utility CSS generator already covers large-file arena growth testing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR removes the Tailwind CSS package as a dev dependency and instead downloads it dynamically during benchmark execution. This reduces the package's dependency footprint while maintaining the ability to benchmark against real-world CSS files.
Key Changes
src/arena.test.tsthat verified arena growth behavior with Tailwind CSS filesbenchmark/index.tsto automatically download Tailwind CSS v2.2.19 (both minified and non-minified versions) from unpkg during benchmark setuptailwindcssfrompackage.jsondevDependenciestailwindcssfromknip.jsonunused dependencies listtailwindcssfrom.github/dependabot.ymlignore list@vitest/coverage-v8andvitestto v4.1.9, addedvitev8.0.16actions/upload-artifactandactions/download-artifactto specific commit hashes for reproducibilityImplementation Details
The benchmark now downloads Tailwind CSS files on-demand before running benchmarks, creating the necessary directory structure if it doesn't exist. This approach:
https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4