Skip to content

Remove Tailwind CSS dependency and download during benchmarks#258

Open
bartveneman wants to merge 9 commits into
mainfrom
claude/keen-tesla-nag6zz
Open

Remove Tailwind CSS dependency and download during benchmarks#258
bartveneman wants to merge 9 commits into
mainfrom
claude/keen-tesla-nag6zz

Conversation

@bartveneman

Copy link
Copy Markdown
Member

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

  • Removed test cases: Deleted two test cases in src/arena.test.ts that verified arena growth behavior with Tailwind CSS files
  • Dynamic Tailwind download: Added logic in benchmark/index.ts to automatically download Tailwind CSS v2.2.19 (both minified and non-minified versions) from unpkg during benchmark setup
  • Dependency cleanup:
    • Removed tailwindcss from package.json devDependencies
    • Removed tailwindcss from knip.json unused dependencies list
    • Removed tailwindcss from .github/dependabot.yml ignore list
  • Dependency updates: Updated @vitest/coverage-v8 and vitest to v4.1.9, added vite v8.0.16
  • GitHub Actions: Pinned actions/upload-artifact and actions/download-artifact to specific commit hashes for reproducibility

Implementation 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:

  • Keeps the package lighter by not including Tailwind as a permanent dependency
  • Ensures benchmarks always use a consistent version (v2.2.19)
  • Gracefully handles cases where files already exist locally
  • Fails fast with clear error messages if downloads fail

https://claude.ai/code/session_01QZMQa58PUeu1BJ2ZV57kW4

claude added 4 commits June 21, 2026 18:57
- 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
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

⚠️ Duplicate Dependencies (found: 27, threshold: 1)

📦 Package 📋 Versions
postcss
2 versions
  • root@
    • postcss@8.5.14

  • root@
    • @vitest/coverage-v8@4.1.9
      • vitest@4.1.9
        • @vitest/mocker@4.1.9
          • vite@8.0.16
            • postcss@8.5.15

tinybench
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • vitest@4.1.9
        • tinybench@2.9.0

  • root@
    • tinybench@6.0.1

@babel/parser
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • magicast@0.5.2
        • @babel/parser@7.29.3

  • root@
    • tsdown@0.22.0
      • rolldown-plugin-dts@0.25.0
        • @babel/generator@8.0.0-rc.4
          • @babel/parser@8.0.0-rc.4

@babel/types
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • magicast@0.5.2
        • @babel/parser@7.29.3
          • @babel/types@7.29.0

  • root@
    • tsdown@0.22.0
      • rolldown-plugin-dts@0.25.0
        • @babel/generator@8.0.0-rc.4
          • @babel/parser@8.0.0-rc.4
            • @babel/types@8.0.0-rc.4

@babel/helper-string-parser
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • magicast@0.5.2
        • @babel/parser@7.29.3
          • @babel/types@7.29.0
            • @babel/helper-string-parser@7.27.1

  • root@
    • tsdown@0.22.0
      • ...
        • @babel/parser@8.0.0-rc.4
          • @babel/types@8.0.0-rc.4
            • @babel/helper-string-parser@8.0.0-rc.4

@babel/helper-validator-identifier
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • magicast@0.5.2
        • @babel/parser@7.29.3
          • @babel/types@7.29.0
            • @babel/helper-validator-identifier@7.28.5

  • root@
    • tsdown@0.22.0
      • ...
        • @babel/parser@8.0.0-rc.4
          • @babel/types@8.0.0-rc.4
            • @babel/helper-validator-identifier@8.0.0-rc.4

@napi-rs/wasm-runtime
2 versions
  • root@
    • knip@6.13.0
      • oxc-parser@0.130.0
        • @oxc-parser/binding-wasm32-wasi@0.130.0
          • @napi-rs/wasm-runtime@1.1.4

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • rolldown@1.0.3
          • @rolldown/binding-wasm32-wasi@1.0.3
            • @napi-rs/wasm-runtime@1.1.5

@rolldown/binding-wasm32-wasi
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-wasm32-wasi@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-wasm32-wasi@1.0.3

get-tsconfig
2 versions
  • root@
    • knip@6.13.0
      • get-tsconfig@4.14.0

  • root@
    • tsdown@0.22.0
      • rolldown-plugin-dts@0.25.0
        • get-tsconfig@5.0.0-beta.5

tinyglobby
2 versions
  • root@
    • @vitest/coverage-v8@4.1.9
      • vitest@4.1.9
        • tinyglobby@0.2.16

  • root@
    • @vitest/coverage-v8@4.1.9
      • vitest@4.1.9
        • @vitest/mocker@4.1.9
          • vite@8.0.16
            • tinyglobby@0.2.17

@oxc-project/types
3 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @oxc-project/types@0.129.0

  • root@
    • knip@6.13.0
      • oxc-parser@0.130.0
        • @oxc-project/types@0.130.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @oxc-project/types@0.133.0

nanoid
2 versions
  • root@
    • postcss@8.5.14
      • nanoid@3.3.12

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • postcss@8.5.15
            • nanoid@3.3.14

rolldown
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • vitest@4.1.9
        • @vitest/mocker@4.1.9
          • vite@8.0.16
            • rolldown@1.0.3

@rolldown/binding-android-arm64
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-android-arm64@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-android-arm64@1.0.3

@rolldown/binding-darwin-arm64
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-darwin-arm64@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-darwin-arm64@1.0.3

@rolldown/binding-darwin-x64
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-darwin-x64@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-darwin-x64@1.0.3

@rolldown/binding-freebsd-x64
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-freebsd-x64@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-freebsd-x64@1.0.3

@rolldown/binding-linux-arm-gnueabihf
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-arm-gnueabihf@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-arm-gnueabihf@1.0.3

@rolldown/binding-linux-arm64-gnu
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-arm64-gnu@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-arm64-gnu@1.0.3

@rolldown/binding-linux-arm64-musl
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-arm64-musl@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-arm64-musl@1.0.3

@rolldown/binding-linux-ppc64-gnu
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-ppc64-gnu@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-ppc64-gnu@1.0.3

@rolldown/binding-linux-s390x-gnu
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-s390x-gnu@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-s390x-gnu@1.0.3

@rolldown/binding-linux-x64-gnu
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-x64-gnu@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-x64-gnu@1.0.3

@rolldown/binding-linux-x64-musl
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-linux-x64-musl@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-linux-x64-musl@1.0.3

@rolldown/binding-openharmony-arm64
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-openharmony-arm64@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-openharmony-arm64@1.0.3

@rolldown/binding-win32-arm64-msvc
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-win32-arm64-msvc@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-win32-arm64-msvc@1.0.3

@rolldown/binding-win32-x64-msvc
2 versions
  • root@
    • tsdown@0.22.0
      • rolldown@1.0.0
        • @rolldown/binding-win32-x64-msvc@1.0.0

  • root@
    • @vitest/coverage-v8@4.1.9
      • ...
        • vite@8.0.16
          • rolldown@1.0.3
            • @rolldown/binding-win32-x64-msvc@1.0.3

💡 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

claude added 5 commits June 21, 2026 19:05
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
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.

2 participants