Skip to content

fix: remove missing video player icon assets and fail build on downlo… - #668

Merged
PaulBoye-py merged 1 commit into
betafrom
fix/remove-missing-player-icons
Oct 3, 2026
Merged

PaulBoye-py merged 1 commit into
betafrom
fix/remove-missing-player-icons

Conversation

@PaulBoye-py

Copy link
Copy Markdown
Collaborator

Description

Follow-up to my review comment on #665.

During the build, scripts/copy-assets.ts downloads two icon files from unpkg (dist/fonts/cloudinary_icon_for_black_bg.svg and dist/fonts/cloudinary_icon_for_white_bg.svg). These files don't exist for any player version, and the script didn't check the response, so it saved unpkg's "Not found" page as the SVG files. The published 6.19.3 package ships these files too: example.

On beta, package.json also exports these icons at dist/cloudinary_icon_*.svg, a path where they are never written, which publint reports as 4 errors.

This pull request:

  • Removes the icon downloads. The player's icons are already included in its CSS, so nothing depends on these files.
  • Removes the 4 icon paths from exports and from preconstruct.exports.extra.
  • Makes downloadFile fail the build when a download doesn't return 200 (or hits a network error), instead of saving the error page as the asset. This protects the player CSS from the same problem.

These exports only existed on beta and never pointed to real files, so this isn't a breaking change.

Issue Ticket Number

No separate issue. Raised in the #665 review.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Fix or improve the documentation
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

Testing

  • Clean build: dist/ contains only cld-video-player.css plus the JavaScript and type files, with no fonts/ folder.
  • publint: 0 errors (previously 4).
  • Simulated a missing file: the build stops with Failed to download … HTTP 404 and exit code 1, and no file is written.
  • Unit tests pass (16/16), the library and scripts typecheck, and the Next.js 16 test app builds.
  • feat: upgrade Cloudinary video player from v1 to v4 #665 applies cleanly on top of this change (it only touches the PLAYER_VERSION line in the same file).

…ad errors

The build downloaded dist/fonts/cloudinary_icon_for_*.svg from unpkg, but
those files don't exist for any player version, so the 404 response body
was written to disk as the SVGs. The package exports also pointed to
dist/cloudinary_icon_*.svg, which never existed (4 publint errors).

Remove the icon downloads and their export paths (the icons are inlined
in the player CSS), and make copy-assets fail when a download returns a
non-200 response instead of writing the error page as the asset.
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
next-cloudinary Ready Ready Preview Oct 1, 2026 4:55pm UTC

Request Review

@PaulBoye-py PaulBoye-py mentioned this pull request Oct 1, 2026
@PaulBoye-py
PaulBoye-py merged commit 5a2385f into beta Oct 3, 2026
7 checks passed
@PaulBoye-py
PaulBoye-py deleted the fix/remove-missing-player-icons branch October 3, 2026 08:13

This branch was successfully deployed

1 active deployment
Preview — 9eb75a36 Deployed Oct 1, 2026 by vercel[bot]
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.

1 participant