Skip to content

Build only the debug theme scripts that the tests load - #6092

Open
Eugene (OEvgeny) wants to merge 1 commit into
mainfrom
OEvgeny/fix-debug-theme-unread-builds
Open

Eugene (OEvgeny) wants to merge 1 commit into
mainfrom
OEvgeny/fix-debug-theme-unread-builds

Conversation

@OEvgeny

Copy link
Copy Markdown
Collaborator

Follows the move to tsdown (#6071, #6079, #6088, #6091): debug-theme builds ESM, CommonJS and declaration files that nothing reads.

Changelog Entry

Not needed: development only (no-changelog), debug-theme is private.

Description

The private debug-theme package is only loaded as a script by html2 tests, but it also built ESM, CommonJS and .d.ts files, declared in its package.json, that nothing imports. This pull request builds only the 2 scripts and removes the fields that pointed at the other files.

Specific Changes

  • packages/debug-theme/tsdown.config.mts: only the 2 IIFE configs, from applyConfig() instead of the ESM config; both scripts and their source maps are byte-identical in development, production and test builds
  • packages/debug-theme/package.json: removed main, types and exports (its ./tsconfig.json pointed at a file that does not exist)
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

debug-theme is private and only loaded as a script by html2 tests: nothing
imports its ESM or CommonJS builds or reads its declaration files. Build the
2 IIFE scripts only and remove the main, types and exports fields that pointed
at the other files. Both scripts and their source maps are byte-identical.
@OEvgeny Eugene (OEvgeny) added the no-changelog No .changelog/ fragment needed (development environment or test-only change) label Nov 27, 2026
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review November 27, 2026 02:21
Copilot AI balanced review requested due to automatic review settings November 27, 2026 02:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the debug-theme build and package-metadata simplification.

No open issues 🎉

What changed in this PR

Simplifies the private debug-theme package after the tsdown migration, retaining only the two browser scripts loaded by html2 tests.

Changes:

  • Builds the development and minified production scripts directly from applyConfig(), removing unused ESM, CommonJS, and declaration builds.
  • Removes package entry-point metadata for outputs and exports that are no longer needed.
File Description
packages/​debug-theme/​tsdown.config.mts Replaces dual-format configuration with two script-only IIFE configurations.
packages/​debug-theme/​package.json Removes main, types, and exports fields from the private package.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No .changelog/ fragment needed (development environment or test-only change)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants