Repository navigation
fix(build): ship dist/ as one file per module instead of hashed chunks - #14
Merged
Merged
Conversation
Shinrai
approved these changes
Nov 26, 2026
cldmv-bot Bot
added a commit
that referenced
this pull request
Nov 26, 2026
# `@cldmv/sqlite-wasm` v0.2.1 Changelog **Release Date**: November 2026 **Release Type**: Patch **Branch**: `release/0.2.1` --- ## Overview `dist/` is now one file per source module, in the same layout as `src/`, instead of four bundles that shared code through hashed `chunk-*.mjs` files. Every module still exists once, so `instanceof` keeps working across `@cldmv/sqlite-wasm`, `/host`, `/worker` and `/drizzle`. The public API, the import names and the wasm module are unchanged. --- ## 🐛 Bug Fixes ### `dist/` mirrors `src/` instead of hashed chunks ([#14](#14)) v0.1.0 and v0.2.0 built the four entry points with one tsup bundle and code splitting, which put the shared code into files named `chunk-<hash>.mjs`. Nothing in them said what they held, and the hashes changed on every build. The build now compiles each `src/**/*.mts` to `dist/**/*.mjs` at the same path with `tsc`, then minifies each file in place with esbuild (`keepNames`, source maps back to `src/`). Nothing is bundled: the entries share modules through plain relative imports, so there is still one copy of each class. - `./host` and `./worker` now resolve to `dist/worker/host.mjs` and `dist/worker/client.mjs`. The package's import names are the same. - The Node and browser loaders find `sqlite3.wasm` at `../sqlite3.wasm` from `dist/core/`, still the same `dist/sqlite3.wasm`. Bundlers that copy the wasm from the `new URL(..., import.meta.url)` pattern keep doing so. - tsup is no longer a dev dependency; `scripts/build-js.mjs` replaces `tsup.config.mjs`. - A test checks that `dist/` has exactly one `.mjs` per source module and no generated chunks. ## 🔧 CI & tooling - The bundle-size check measured `dist/**.mjs`, which only matches files at the top of `dist/`. It now uses `dist/**/*.mjs`, `dist/**/*.cjs` and `dist/**/*.wasm`. ## 📚 Documentation - `docs/DESIGN.md` and the README describe the per-module build. - **NEW:** [docs/changelog/v0/v0.2.1.md](https://github.com/CLDMV/lib-sqlite-wasm/blob/v0.2.1/docs/changelog/v0/v0.2.1.md) — this changelog. ## 🔧 Dependencies - Removed `tsup` (dev). Added `esbuild` (dev), used directly. --- ## Upgrade notes - No API changes. Drop-in for v0.2.0. - Code that imported files inside `dist/` by path (not through the package's exports) needs the new paths; the `chunk-*.mjs` files and `dist/host.mjs` / `dist/worker.mjs` no longer exist. <details> <summary>👥 Contributors</summary> - @Shinrai </details> --- <!-- coverage-start -->  | Metric | Coverage | |--------|----------| | Statements | 100.0% | | Branches | 100.0% | | Functions | 100.0% | | Lines | 100.0% | *Avg: **100.0%** · `218ad8e` · Node lts/** <!-- coverage-end --> <!-- co-authors --> Co-authored-by: Shinrai <[email protected]>
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors