Skip to content

build(cli): decouple cli tests from upstream builds#1402

Merged
decepulis merged 1 commit intomainfrom
claude/fix-cli-test-build-McXFA
Apr 22, 2026
Merged

build(cli): decouple cli tests from upstream builds#1402
decepulis merged 1 commit intomainfrom
claude/fix-cli-test-build-McXFA

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Apr 22, 2026

Summary

Fix two pieces of asymmetry around how the CLI participates in repo-wide tasks.

1. @videojs/cli#test no longer depends on ^build

The root turbo.json applies "test": { "dependsOn": ["^build"] } to every package. Because @videojs/cli has site as a workspace:* dep (needed for its own build, which calls copy-docs against site/dist/docs), testing the CLI used to trigger a full site build and its entire dep graph.

But the CLI tests don't actually consume any built artifact:

  • packages/cli/vitest.config.ts aliases @/utils/installation/* to site/src/... (source, not dist).
  • packages/cli/src/commands/tests/docs.test.ts mocks ../../utils/docs.js, so the bundled docs in packages/cli/docs/ are never read.

Added a package-level packages/cli/turbo.json that overrides test.dependsOn to [], accurately reflecting what the test task actually needs.

Verified: with site/dist absent, pnpm test:cli passes all 47 CLI tests and the turbo dry-run shows Dependencies = (empty) for @videojs/cli#test.

2. Root test mirrors build:packages / build:cli

The root scripts previously had an asymmetry:

build:packages  → --filter='./packages/*' --filter='!@videojs/cli'
build:cli       → --filter=@videojs/cli...
test            → --filter='./packages/*'           ← includes CLI

Updated to mirror the build split:

test     → --filter='./packages/*' --filter='!@videojs/cli'
test:cli → --filter=@videojs/cli

Test plan

  • pnpm test:cli passes (47/47) with no prior site build
  • turbo run test --filter=@videojs/cli --dry shows empty Dependencies for @videojs/cli#test
  • turbo run test --filter='./packages/*' --filter='!@videojs/cli' --dry no longer lists @videojs/cli in scope
  • CI green on the branch

https://claude.ai/code/session_013DksGTCAbNNHQn9scAZnxN


Note

Medium Risk
Changes Turbo task configuration and root test filters, which can alter CI/test execution scope and caching; functional code is untouched but misconfiguration could skip or reorder expected tests.

Overview
Adjusts root test orchestration so repo-wide pnpm test runs package tests excluding @videojs/cli, and adds pnpm test:cli to run CLI tests explicitly.

Adds packages/cli/turbo.json to override Turbo’s default test.dependsOn (removing ^build) for @videojs/cli, preventing CLI tests from pulling in upstream build graphs (e.g., site) when they don’t require built artifacts.

Reviewed by Cursor Bugbot for commit ed50ec7. Bugbot is set up for automated code reviews on this repo. Configure here.

CLI tests mock the bundled docs and alias site imports to source, so
they don't need `^build`. Override `test.dependsOn` to `[]` at the
package level so running `@videojs/cli#test` no longer forces a full
site build.

Also exclude `@videojs/cli` from root `pnpm test` and add a dedicated
`test:cli` script, mirroring the existing `build:packages` /
`build:cli` split.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Apr 22, 2026 0:40am

Request Review

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit ed50ec7
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69e8c1a6f07c9400083e97d4
😎 Deploy Preview https://deploy-preview-1402--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@decepulis decepulis marked this pull request as ready for review April 22, 2026 12:41
@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 28.70 kB
/video (default + hls) 161.34 kB
/video (minimal) 26.22 kB
/video (minimal + hls) 158.79 kB
/audio (default) 26.57 kB
/audio (minimal) 24.17 kB
/background 4.15 kB
Media (8)
Entry Size
/media/background-video 1.04 kB
/media/container 1.73 kB
/media/dash-video 236.54 kB
/media/hls-video 133.86 kB
/media/mux-audio 160.01 kB
/media/mux-video 159.87 kB
/media/native-hls-video 3.77 kB
/media/simple-hls-video 15.80 kB
Players (3)
Entry Size
/video/player 7.21 kB
/audio/player 5.27 kB
/background/player 3.86 kB
Skins (17)
Entry Type Size
/video/minimal-skin.css css 3.50 kB
/video/skin.css css 3.53 kB
/video/minimal-skin js 26.20 kB
/video/minimal-skin.tailwind js 26.42 kB
/video/skin js 28.70 kB
/video/skin.tailwind js 28.78 kB
/audio/minimal-skin.css css 2.54 kB
/audio/skin.css css 2.50 kB
/audio/minimal-skin js 24.17 kB
/audio/minimal-skin.tailwind js 24.35 kB
/audio/skin js 26.58 kB
/audio/skin.tailwind js 26.72 kB
/background/skin.css css 117 B
/background/skin js 1.14 kB
/base.css css 157 B
/shared.css css 88 B
/skin-element js 1.35 kB
UI Components (25)
Entry Size
/ui/alert-dialog 1022 B
/ui/alert-dialog-close 509 B
/ui/alert-dialog-description 380 B
/ui/alert-dialog-title 385 B
/ui/buffering-indicator 2.46 kB
/ui/captions-button 2.63 kB
/ui/cast-button 2.66 kB
/ui/compounds 4.14 kB
/ui/controls 2.31 kB
/ui/error-dialog 3.02 kB
/ui/fullscreen-button 2.62 kB
/ui/hotkey 1.90 kB
/ui/mute-button 2.69 kB
/ui/pip-button 2.64 kB
/ui/play-button 2.66 kB
/ui/playback-rate-button 2.68 kB
/ui/popover 1.83 kB
/ui/poster 2.26 kB
/ui/seek-button 2.65 kB
/ui/slider 1.52 kB
/ui/thumbnail 2.92 kB
/ui/time 2.52 kB
/ui/time-slider 3.92 kB
/ui/tooltip 2.02 kB
/ui/volume-slider 2.66 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 23.53 kB
/video (default + hls) 154.79 kB
/video (minimal) 21.11 kB
/video (minimal + hls) 152.52 kB
/audio (default) 19.07 kB
/audio (minimal) 17.58 kB
/background 755 B
Media (7)
Entry Size
/media/background-video 575 B
/media/dash-video 235.04 kB
/media/hls-video 132.64 kB
/media/mux-audio 158.59 kB
/media/mux-video 158.53 kB
/media/native-hls-video 2.26 kB
/media/simple-hls-video 14.36 kB
Skins (14)
Entry Type Size
/video/minimal-skin.css css 3.44 kB
/video/skin.css css 3.46 kB
/video/minimal-skin js 21.04 kB
/video/minimal-skin.tailwind js 24.53 kB
/video/skin js 23.40 kB
/video/skin.tailwind js 24.66 kB
/audio/minimal-skin.css css 2.44 kB
/audio/skin.css css 2.39 kB
/audio/minimal-skin js 17.52 kB
/audio/minimal-skin.tailwind js 20.04 kB
/audio/skin js 19.01 kB
/audio/skin.tailwind js 19.97 kB
/background/skin.css css 90 B
/background/skin js 272 B
UI Components (20)
Entry Size
/ui/alert-dialog 1.14 kB
/ui/buffering-indicator 1.83 kB
/ui/captions-button 2.07 kB
/ui/cast-button 2.07 kB
/ui/controls 1.81 kB
/ui/error-dialog 2.28 kB
/ui/fullscreen-button 2.09 kB
/ui/mute-button 2.11 kB
/ui/pip-button 2.01 kB
/ui/play-button 2.00 kB
/ui/playback-rate-button 1.94 kB
/ui/popover 1.86 kB
/ui/poster 1.69 kB
/ui/seek-button 2.14 kB
/ui/slider 2.67 kB
/ui/thumbnail 2.12 kB
/ui/time 2.11 kB
/ui/time-slider 2.43 kB
/ui/tooltip 2.18 kB
/ui/volume-slider 3.19 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (9)
Entry Size
. 4.96 kB
/dom 11.84 kB
/dom/media/custom-media-element 1.90 kB
/dom/media/dash 234.13 kB
/dom/media/google-cast 4.07 kB
/dom/media/hls 131.89 kB
/dom/media/mux 158.01 kB
/dom/media/native-hls 1.61 kB
/dom/media/simple-hls 13.73 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 695 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.92 kB
/events 319 B
/function 327 B
/object 275 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 13.33 kB
/playback-engine 13.24 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

@decepulis decepulis merged commit 6149e7f into main Apr 22, 2026
25 checks passed
@decepulis decepulis deleted the claude/fix-cli-test-build-McXFA branch April 22, 2026 12:46
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