fix: wipe dist/ext at the start of build:ext - #4042
Open
manwithacat wants to merge 1 commit into
Open
manwithacat wants to merge 1 commit into
manwithacat wants to merge 1 commit into
Conversation
Contributor
|
Hey @manwithacat I like the cleaning out the dist on build but don't think we need the rest of the infrastructure. Can you update that? |
build:ext copied src/ext into dist/ext but never deleted the directory, so renamed extensions left orphans in the 4.0.0 tarball (hx-optimistic after bigskysoftware#3958, leftover hx-compat). rm -rf first makes dist/ext a pure function of src/ext. Closes bigskysoftware#4041
manwithacat
force-pushed
the
fix/dist-ext-clean-and-check
branch
from
September 20, 2026 15:30
0e95e31 to
cda5e0e
Compare
Contributor
Author
|
Updated — this PR is now just The next release build will drop the leftover |
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 is just
rm -rf dist/extat the start ofbuild:ext, per @1cg. No runtime change.dist/is not in this PR; the next release build drops the orphans from the tarball.Corresponding issue: #4041
Not asking to move npm
latestoff 2.x.Testing
npm run build:extnow starts from an emptydist/ext, so only currentsrc/ext/*.jsnames are emitted.Checklist
four-devfor htmx 4 source)npm run test) — not applicable; this is a one-line build-script changeOptional follow-ups (not in this PR)
Dropped the checker, CI job, and
dev/RELEASE.mdnotes from the first version. Recording them here in case they are useful later:workflow_dispatchjob that compares committeddist/exttosrc/extwithout rebuilding. A PR-timebun run buildthen check always passes once the wipe is in, so it would not gate the published tarball. A tag check would catch “forgot to rebuilddist/before publish.” Keep any such script out ofsrc/scripts/(build:scriptscopies*.pyinto the npm package).build:editors,build:skills, andbuild:scriptsare also copy-without-clean. A singlerm -rf dist && mkdir -p distat the start ofnpm run buildwould cover them, still with no extra tooling.dev/RELEASE.md—npm buildis a typo fornpm run build. While 2.x is npmlatest, 4.x needsnpm publish --tag next.gh release create --prereleasewhen the version contains-keeps GitHub Latest on a real GA tag (v4.0.0-beta3throughbeta5were not marked prerelease).hx-optimisticwas renamed tohx-pending(rename hx-optimistic to hx-pending #3958); the old CDN path 404s.