v0.2.0 — flat output layout
Changed (BREAKING)
- Flat output layout — Modules now publish at the package root (
<pkg>/index.js) instead of nested undersrc/. Direct CDN file URLs (jsDelivr, unpkg) serve literal paths and don't consult the exports map, so the old layout 404'd copy-paste URLs likecdn.jsdelivr.net/npm/<pkg>/index.js. Executables stay underbin/, code-splitting chunks move to_chunks/. Fixes #9. - Clean break, no compatibility layer — Literal deep URLs into previously published packages (
.../src/index.js) 404 once a package republishes with 0.2.0. Node consumers are unaffected: exports-map keys never containedsrc/. --savepaths — Root package.json now points at./dist/<entry>.*(was./dist/src/<entry>.*). Old saved paths migrate automatically on the next--saverun.- Node 20 floor — Build target raised from
node18tonode20(Node 18 is EOL since April 2025); libuild itself now requires Node >=20.10.0.
Added
.tsxentry points — Top-level.tsxfiles insrc/are discovered as entry points. esbuild and the declaration generator honor the project's tsconfigjsx/jsxImportSourcesettings (or/** @jsx */pragmas); declarations fall back tojsx: preserve. Fixes #6.
Fixed
- UMD build corrupted sibling entries — The UMD wrapper was applied to every
.jsfile in the output directory; it now wraps only the UMD output file. --savedropped theimportcondition from the.export — Missing conditions are now filled in from the main entry. Fixes #7.--savebin pointed at stale nested paths — Saved bin paths are normalized to the flat artifact locations.- npm flag filtering restored on
libuild publish— The security whitelist was silently dropped in the commander CLI rewrite; unknown or unsafe npm flags are again warned about and stripped.
Maintenance
- esbuild
^0.19→^0.28, commander 15, dependency patch bumps. - Removed dead code paths (unreachable
src/binentry flavor, unused parameters).
Migration for downstream packages: bump @b9g/libuild to ^0.2.0, run libuild build --save, republish. No source changes needed.