fix(site): add astro check CI and reduce errors/hints#1109
Open
fix(site): add astro check CI and reduce errors/hints#1109
Conversation
Prompted by #1101 (TS 6 / Vitest 4 upgrade), `astro check` accumulated 125 type errors across config, tests, builder scripts, demos, and source files. This commit brings the count to zero so we can enforce it in CI. Key changes: - Bump tsconfig lib ES2020 → ES2022 (replaceAll, Intl.ListFormat) - Update vi.fn generics to Vitest 3+ syntax - Convert utilReferenceModel.js and componentReferenceModel.js to .ts - Fix api-docs-builder for TAE and TS 6 API changes - Update demo code for current @videojs/html and @videojs/react APIs - Install @types/jsdom, fix iron-session/marked/routing type mismatches - Add @ts-expect-error where Astro type-checker can't model runtime behavior (Vite 6/8 plugin mismatch, Astro slot-to-prop transform) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
CI Failure Diagnosis
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Runs `astro check` on PRs to surface type regressions without blocking merges. Uses `continue-on-error: true` so failures show as yellow warnings instead of red failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (5)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (4)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (6)
🏷️ @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 |
…in CI Remove unused imports, variables, and props across site components. Add explanatory comments for unfixable hints (define:vars, JSON-LD, deprecated lucide icons, frontmatter return). Generate api-docs and ejected-skins before astro check in CI so results match local. Use --minimumSeverity warning to hide remaining hints in CI output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Job-level continue-on-error still shows as red X in PR checks. Step-level makes the step show as warning but the job passes green. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Package typecheck is already a hard failure — astro check should be too. The 4 remaining errors are a package type bug (#1111) and will clear once that's resolved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Closes #1110
Summary
Reduces
astro checkfrom 125 errors / 49 hints to 4 errors / 20 hints, and addsastro checkas a CI gate.Type error fixes (125 → 4)
replaceAll,Intl.ListFormat)vi.fngenerics to Vitest 3+ syntax (66 errors)utilReferenceModel.jsandcomponentReferenceModel.jsto TypeScript (18 errors)typescript-api-extractorrenames and TS 6 changes (10 errors)@videojs/htmland@videojs/reactAPIs (9 errors)@types/jsdom, fixiron-session/marked/routing type mismatches (8 errors)'mux-video'renderer →'hls'in MuxUploaderPanel (2 errors)@ts-expect-erroronly where the type checker provably can't model runtime behavior: Vite 6/8 plugin mismatch (2), Astro slot-to-prop transform (3), MuxUploader ref (1)The remaining 4 errors are a package-level type bug where premade selectors (
Selector<object, ...>) are incompatible withcreatePlayer().PlayerControllertypes. Tracked in #1111.Hint cleanup (49 → 20)
parseNamesfunction from build-ejected-skins_...propsrest spread from 12 SocialProofLogos componentsRemaining 20 hints are all unfixable with comments explaining why:
import * as tsstyle suggestions (8) — idiomatic TS compiler API patterndefine:varsnot visible to type checker (2) — language-tools#711is:inline(1) — expected for structured data (astro#3544)returnhides usage (3) — astro check can't see reads insidereturnCI:
astro checkas a hard gateastro-checkjob towebsite-tests.yml(runs on all PRs and pushes to main)api-docs,ejected-skins) before checking so CI matches local results--minimumSeverity warningto hide hints from CI outputcontinue-on-error) — same as packagetypecheckVerified
astro check— 4 errors (all Bug: Premade Selectors Incompatible with createPlayer().PlayerController Types #1111), 0 warnings, 20 hintspnpm -F site test— 333 tests passingpnpm -F site api-docs— output identical before and afterTest plan
pnpm astro checkreports only the 4 known selector errorspnpm -F site testpassesastro-checkjob runs and fails only on Bug: Premade Selectors Incompatible with createPlayer().PlayerController Types #1111 errors🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk because it adds a new CI gating job and tightens some runtime checks (e.g., session sealing now throws if
SESSION_COOKIE_PASSWORDis missing), which could surface new failures in CI or deployments if configuration is incomplete.Overview
Adds a new
astro-checkGitHub Actions job that builds packages, generates site content, and runspnpm astro check --minimumSeverity warningas a required CI gate.Reduces
astro checknoise by updating TypeScript/fixtures/tests and refactoring the API-reference model code (componentReferenceModel,utilReferenceModel) to typed TS, adjusting demo code to current@videojs/*APIs, and cleaning up unused props/imports with targeted@ts-expect-errorannotations for known tooling/type mismatches.Updates a few runtime-related behaviors: session
seal/unsealnow hard-requireSESSION_COOKIE_PASSWORD, and the Mux uploader flow switches renderer output frommux-videotohls.Written by Cursor Bugbot for commit 917a214. This will update automatically on new commits. Configure here.