build:ext copies src/ext/*.js into dist/ext but never deletes the directory first. After a rename, the old basename stays in the published tarball (or an orphan .map does).
Repro (4.0.0)
curl -I https://cdn.jsdelivr.net/npm/htmx.org@4.0.0/dist/ext/hx-optimistic.min.js
# 404
curl -I https://cdn.jsdelivr.net/npm/htmx.org@4.0.0/dist/ext/hx-pending.min.js
# 200
hx-optimistic.js was renamed to hx-pending.js in #3958. The 4.0.0 tree / npm pack still contains dist/ext/hx-optimistic.min.js.map with no matching .js. The same tree also still has a full leftover hx-compat.* set (src/ext only has htmx-2-compat.js).
Cause is mechanical: package.json build:ext is mkdir -p dist/ext && for file in src/ext/*.js … with no wipe. CI (htmx 4 CI) runs tests and src/scripts/content/check.py, but does not build dist or compare src/ext to dist/ext. dev/RELEASE.md also has no completeness check and no --prerelease for -beta / -rc tags (v4.0.0-beta3 through beta5 were published with prerelease=false; beta6 was marked correctly).
Ask
- Wipe
dist/ext at the start of build:ext so a release tarball is a pure function of src/ext.
- Add a cheap completeness check (every
src/ext/*.js has .js + .min.js; no dist basename that is not in src; every .map has a matching .js) and run it from CI after bun run build, and from the release checklist before npm publish / gh release create.
- In
dev/RELEASE.md: npm publish --tag next while 2.x remains npm latest; pass --prerelease on GitHub when the version contains -.
No runtime change. A changelog line on the next 4.x release that hx-optimistic is now hx-pending (old CDN path 404s) would help consumers. I am happy to send a four-dev PR for (1)–(3).
Not asking to move npm latest off 2.x — that policy is already documented.
build:extcopiessrc/ext/*.jsintodist/extbut never deletes the directory first. After a rename, the old basename stays in the published tarball (or an orphan.mapdoes).Repro (4.0.0)
hx-optimistic.jswas renamed tohx-pending.jsin #3958. The 4.0.0 tree / npm pack still containsdist/ext/hx-optimistic.min.js.mapwith no matching.js. The same tree also still has a full leftoverhx-compat.*set (src/extonly hashtmx-2-compat.js).Cause is mechanical:
package.jsonbuild:extismkdir -p dist/ext && for file in src/ext/*.js …with no wipe. CI (htmx 4 CI) runs tests andsrc/scripts/content/check.py, but does not build dist or comparesrc/exttodist/ext.dev/RELEASE.mdalso has no completeness check and no--prereleasefor-beta/-rctags (v4.0.0-beta3throughbeta5were published withprerelease=false;beta6was marked correctly).Ask
dist/extat the start ofbuild:extso a release tarball is a pure function ofsrc/ext.src/ext/*.jshas.js+.min.js; no dist basename that is not in src; every.maphas a matching.js) and run it from CI afterbun run build, and from the release checklist beforenpm publish/gh release create.dev/RELEASE.md:npm publish --tag nextwhile 2.x remains npmlatest; pass--prereleaseon GitHub when the version contains-.No runtime change. A changelog line on the next 4.x release that
hx-optimisticis nowhx-pending(old CDN path 404s) would help consumers. I am happy to send afour-devPR for (1)–(3).Not asking to move npm
latestoff 2.x — that policy is already documented.