Skip to content

v0.2.0 — flat output layout

Choose a tag to compare

@brainkim brainkim released this 25 Jul 15:26
· 75 commits to main since this release

Changed (BREAKING)

  • Flat output layout — Modules now publish at the package root (<pkg>/index.js) instead of nested under src/. 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 like cdn.jsdelivr.net/npm/<pkg>/index.js. Executables stay under bin/, 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 contained src/.
  • --save paths — Root package.json now points at ./dist/<entry>.* (was ./dist/src/<entry>.*). Old saved paths migrate automatically on the next --save run.
  • Node 20 floor — Build target raised from node18 to node20 (Node 18 is EOL since April 2025); libuild itself now requires Node >=20.10.0.

Added

  • .tsx entry points — Top-level .tsx files in src/ are discovered as entry points. esbuild and the declaration generator honor the project's tsconfig jsx/jsxImportSource settings (or /** @jsx */ pragmas); declarations fall back to jsx: preserve. Fixes #6.

Fixed

  • UMD build corrupted sibling entries — The UMD wrapper was applied to every .js file in the output directory; it now wraps only the UMD output file.
  • --save dropped the import condition from the . export — Missing conditions are now filled in from the main entry. Fixes #7.
  • --save bin 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/bin entry flavor, unused parameters).

Migration for downstream packages: bump @b9g/libuild to ^0.2.0, run libuild build --save, republish. No source changes needed.