build(cli): decouple cli tests from upstream builds#1402
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (8)
Players (3)
Skins (17)
UI Components (25)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (7)
Skins (14)
UI Components (20)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (9)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
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
Fix two pieces of asymmetry around how the CLI participates in repo-wide tasks.
1.
@videojs/cli#testno longer depends on^buildThe root
turbo.jsonapplies"test": { "dependsOn": ["^build"] }to every package. Because@videojs/clihassiteas aworkspace:*dep (needed for its own build, which callscopy-docsagainstsite/dist/docs), testing the CLI used to trigger a fullsitebuild and its entire dep graph.But the CLI tests don't actually consume any built artifact:
packages/cli/vitest.config.tsaliases@/utils/installation/*tosite/src/...(source, notdist).packages/cli/src/commands/tests/docs.test.tsmocks../../utils/docs.js, so the bundled docs inpackages/cli/docs/are never read.Added a package-level
packages/cli/turbo.jsonthat overridestest.dependsOnto[], accurately reflecting what the test task actually needs.Verified: with
site/distabsent,pnpm test:clipasses all 47 CLI tests and the turbo dry-run showsDependencies =(empty) for@videojs/cli#test.2. Root
testmirrorsbuild:packages/build:cliThe root scripts previously had an asymmetry:
Updated to mirror the build split:
Test plan
pnpm test:clipasses (47/47) with no priorsitebuildturbo run test --filter=@videojs/cli --dryshows emptyDependenciesfor@videojs/cli#testturbo run test --filter='./packages/*' --filter='!@videojs/cli' --dryno longer lists@videojs/cliin scopehttps://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 testruns package tests excluding@videojs/cli, and addspnpm test:clito run CLI tests explicitly.Adds
packages/cli/turbo.jsonto override Turbo’s defaulttest.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.