Skip to content

fix(site): add astro check CI and reduce errors/hints#1109

Open
decepulis wants to merge 7 commits intomainfrom
fix/site-astro-check-errors
Open

fix(site): add astro check CI and reduce errors/hints#1109
decepulis wants to merge 7 commits intomainfrom
fix/site-astro-check-errors

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Mar 24, 2026

Closes #1110

Summary

Reduces astro check from 125 errors / 49 hints to 4 errors / 20 hints, and adds astro check as a CI gate.

Type error fixes (125 → 4)

  • Bump tsconfig lib ES2020 → ES2022 (enables replaceAll, Intl.ListFormat)
  • Update vi.fn generics to Vitest 3+ syntax (66 errors)
  • Convert utilReferenceModel.js and componentReferenceModel.js to TypeScript (18 errors)
  • Fix api-docs-builder for typescript-api-extractor renames and TS 6 changes (10 errors)
  • Update demo code for current @videojs/html and @videojs/react APIs (9 errors)
  • Install @types/jsdom, fix iron-session/marked/routing type mismatches (8 errors)
  • Fix stale 'mux-video' renderer → 'hls' in MuxUploaderPanel (2 errors)
  • @ts-expect-error only 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 with createPlayer().PlayerController types. Tracked in #1111.

Hint cleanup (49 → 20)

  • Remove unused imports, variables, and props across site components
  • Remove unused parseNames function from build-ejected-skins
  • Prefix unused test fixture params with _
  • Remove ...props rest spread from 12 SocialProofLogos components

Remaining 20 hints are all unfixable with comments explaining why:

  • import * as ts style suggestions (8) — idiomatic TS compiler API pattern
  • Deprecated lucide brand icons (6) — will replace when lucide v1.0 drops
  • define:vars not visible to type checker (2) — language-tools#711
  • JSON-LD is:inline (1) — expected for structured data (astro#3544)
  • Frontmatter return hides usage (3) — astro check can't see reads inside return

CI: astro check as a hard gate

Verified

Test plan

🤖 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_PASSWORD is missing), which could surface new failures in CI or deployments if configuration is incomplete.

Overview
Adds a new astro-check GitHub Actions job that builds packages, generates site content, and runs pnpm astro check --minimumSeverity warning as a required CI gate.

Reduces astro check noise 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-error annotations for known tooling/type mismatches.

Updates a few runtime-related behaviors: session seal/unseal now hard-require SESSION_COOKIE_PASSWORD, and the Mux uploader flow switches renderer output from mux-video to hls.

Written by Cursor Bugbot for commit 917a214. This will update automatically on new commits. Configure here.

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>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 917a214
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69c315e18bf582000aa7e3f5
😎 Deploy Preview https://deploy-preview-1109--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.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Mar 24, 2026 10:53pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

CI Failure Diagnosis

File Type What failed
site/package.json link Lockfile out of date — @types/jsdom@^28.0.1 was added to site/package.json but pnpm-lock.yaml was not regenerated. Run pnpm install and commit the updated lockfile.

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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 24, 2026

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 23.63 kB
/video (default + hls) 153.73 kB
/video (minimal) 23.48 kB
/video (minimal + hls) 153.70 kB
/audio (default) 21.77 kB
/audio (minimal) 21.78 kB
/background 6.75 kB
Media (5)
Entry Size
/media/background-video 1.03 kB
/media/container 1.59 kB
/media/dash-video 236.13 kB
/media/hls-video 131.53 kB
/media/simple-hls-video 12.47 kB
Players (3)
Entry Size
/video/player 6.47 kB
/audio/player 6.46 kB
/background/player 6.46 kB
Skins (16)
Entry Type Size
/video/minimal-skin.css css 3.25 kB
/video/skin.css css 3.31 kB
/video/minimal-skin js 22.69 kB
/video/minimal-skin.tailwind js 23.11 kB
/video/skin js 22.83 kB
/video/skin.tailwind js 23.10 kB
/audio/minimal-skin.css css 2.37 kB
/audio/skin.css css 2.37 kB
/audio/minimal-skin js 21.01 kB
/audio/minimal-skin.tailwind js 21.31 kB
/audio/skin js 21.03 kB
/audio/skin.tailwind js 21.26 kB
/background/skin.css css 117 B
/background/skin js 1.13 kB
/base.css css 157 B
/shared.css css 86 B
UI Components (21)
Entry Size
/ui/alert-dialog 2.17 kB
/ui/alert-dialog-close 1.63 kB
/ui/alert-dialog-description 1.58 kB
/ui/alert-dialog-title 1.53 kB
/ui/buffering-indicator 1.81 kB
/ui/captions-button 1.80 kB
/ui/controls 1.59 kB
/ui/fullscreen-button 1.81 kB
/ui/mute-button 1.82 kB
/ui/pip-button 1.81 kB
/ui/play-button 1.83 kB
/ui/playback-rate-button 1.85 kB
/ui/popover 2.55 kB
/ui/poster 1.73 kB
/ui/seek-button 1.85 kB
/ui/slider 1.61 kB
/ui/thumbnail 1.90 kB
/ui/time 1.64 kB
/ui/time-slider 2.12 kB
/ui/tooltip 2.37 kB
/ui/volume-slider 2.22 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 19.23 kB
/video (default + hls) 149.79 kB
/video (minimal) 19.26 kB
/video (minimal + hls) 149.70 kB
/audio (default) 16.04 kB
/audio (minimal) 16.11 kB
/background 3.13 kB
Media (4)
Entry Size
/media/background-video 476 B
/media/dash-video 236.18 kB
/media/hls-video 131.66 kB
/media/simple-hls-video 12.53 kB
Skins (14)
Entry Type Size
/video/minimal-skin.css css 3.25 kB
/video/skin.css css 3.31 kB
/video/minimal-skin js 19.18 kB
/video/minimal-skin.tailwind js 22.41 kB
/video/skin js 19.14 kB
/video/skin.tailwind js 22.44 kB
/audio/minimal-skin.css css 2.37 kB
/audio/skin.css css 2.37 kB
/audio/minimal-skin js 16.00 kB
/audio/minimal-skin.tailwind js 18.43 kB
/audio/skin js 15.98 kB
/audio/skin.tailwind js 18.38 kB
/background/skin.css css 90 B
/background/skin js 272 B
UI Components (18)
Entry Size
/ui/alert-dialog 2.81 kB
/ui/buffering-indicator 2.29 kB
/ui/captions-button 2.31 kB
/ui/controls 2.30 kB
/ui/fullscreen-button 2.32 kB
/ui/mute-button 2.29 kB
/ui/pip-button 2.31 kB
/ui/play-button 2.30 kB
/ui/playback-rate-button 2.32 kB
/ui/popover 3.37 kB
/ui/poster 2.15 kB
/ui/seek-button 2.32 kB
/ui/slider 3.30 kB
/ui/thumbnail 2.68 kB
/ui/time 1.98 kB
/ui/time-slider 2.83 kB
/ui/tooltip 3.02 kB
/ui/volume-slider 2.76 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (6)
Entry Size
. 4.97 kB
/dom 8.69 kB
/dom/media/custom-media-element 1.81 kB
/dom/media/dash 235.79 kB
/dom/media/hls 131.11 kB
/dom/media/simple-hls 11.97 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.32 kB
/html 700 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.25 kB
/events 227 B
/function 261 B
/object 119 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 10.13 kB
/playback-engine 10.01 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.

…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>
@decepulis decepulis marked this pull request as ready for review March 24, 2026 20:05
@decepulis decepulis changed the title fix(site): resolve astro check type errors (125 → 0) fix(site): add astro check CI gate and reduce errors from 125 to 4 Mar 24, 2026
@decepulis decepulis changed the title fix(site): add astro check CI gate and reduce errors from 125 to 4 fix(site): add astro check CI gate and reduce errors/hints Mar 24, 2026
@decepulis decepulis changed the title fix(site): add astro check CI gate and reduce errors/hints fix(site): add astro check CI and reduce errors/hints Mar 24, 2026
…tions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Chore: Clean Up Site Types and Add Astro Check CI Workflow

1 participant