fix: wipe dist/ext on build and check completeness in CI - #4042
Open
manwithacat wants to merge 1 commit into
Open
fix: wipe dist/ext on build and check completeness in CI#4042manwithacat wants to merge 1 commit into
manwithacat wants to merge 1 commit into
Conversation
build:ext never deleted dist/ext, so renamed extensions (hx-optimistic -> hx-pending, hx-compat -> htmx-2-compat) left orphans in the 4.0.0 tarball and 404'd on the CDN. Clean the output dir, add a src/ext vs dist/ext completeness check, run it after bun run build, and document --tag next / --prerelease on the release checklist. Closes bigskysoftware#4041
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.
Description
build:extcopiedsrc/ext/*.jsintodist/extbut never wiped the directory. After a rename, the old basename stayed in the published tarball.On 4.0.0 that shows up as:
https://cdn.jsdelivr.net/npm/htmx.org@4.0.0/dist/ext/hx-optimistic.min.js→ 404 (hx-optimisticwas renamed tohx-pendingin rename hx-optimistic to hx-pending #3958; only an orphan.mapshipped)dist/ext/hx-compat.*with nosrc/ext/hx-compat.jsThis PR does not change runtime behaviour. It makes
dist/exta pure function ofsrc/extand fails CI if a future rename leaves leftovers.Corresponding issue: #4041
Changes:
rm -rf dist/extat the start ofbuild:extsrc/scripts/check_dist.py— everysrc/ext/*.jshas.js+.min.js; no dist basename that is not in src; every.maphas a matching.jsdistjob:check:dist:test, thenbun run build, thencheck:distdev/RELEASE.md: runcheck:distafter build;npm publish --tag nextwhile 2.x is npmlatest;--prereleaseon GitHub when the version contains-dist/is not in this PR. The next release build with the newbuild:extwill drop the orphans from the tarball. A changelog line on that release (hx-optimistic→hx-pending, old CDN path 404s) would help consumers.Not asking to move npm
latestoff 2.x.Testing
The new CI
distjob is the full-build gate (bun run buildthencheck:dist). Runtime tests are unchanged.Checklist
four-devfor htmx 4 source)npm run test) — not applicable; this change is the dist build/check path, covered bycheck:dist:testand the new CI job