Repository navigation
feat(drizzle): add a bytes() blob column that needs no Buffer - #8
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.0 Changelog **Release Date**: November 2026 **Release Type**: Minor **Branch**: `release/0.2.0` --- ## Overview Adds `bytes()`, a Drizzle blob column that holds a plain `Uint8Array`, so browser apps can store binary data through Drizzle without a `Buffer` polyfill. The release also adds a design document and fuller npm keywords. Nothing else changed at runtime, and the wasm module is the same build as v0.1.0. --- ## ✨ Features ### `bytes()` blob column for Drizzle ([#8](#8)) `@cldmv/sqlite-wasm/drizzle` now exports `bytes()`, a blob column whose value is a `Uint8Array`: ```js import { bytes } from "@cldmv/sqlite-wasm/drizzle"; import { integer, sqliteTable } from "drizzle-orm/sqlite-core"; export const files = sqliteTable("files", { id: integer("id").primaryKey(), data: bytes("data").notNull() }); ``` Drizzle's own `blob()` modes call Node's `Buffer`, which browsers don't have, so using them in a page or worker needs a polyfill. `bytes()` never touches `Buffer`. Blobs already come back from the database, and through the worker client, as `Uint8Array`, so it passes values straight through. It stores a `blob`, so drizzle-kit generates the same column as `blob("data")`. It is covered in Node, CommonJS and `dist/`, through the worker client, and in Chromium with no `Buffer` defined. ## 📚 Documentation - **NEW:** [docs/DESIGN.md](https://github.com/CLDMV/lib-sqlite-wasm/blob/master/docs/DESIGN.md) ([#9](#9)): how the library is built and why, covering the toolchain, the source-archive build, the C ↔ JS VFS contract, the storage drivers, WAL without shared memory, locking, the worker client, multi-tab sharing and the Drizzle driver. - **README:** a section on `bytes()`, and the `Buffer` caveat now points to it. - **NEW:** [docs/changelog/v0/v0.2.0.md](https://github.com/CLDMV/lib-sqlite-wasm/blob/v0.2.0/docs/changelog/v0/v0.2.0.md) — this changelog. ## 🔧 CI & tooling - **npm keywords** ([#11](#11)): expanded from five to 26 so the package turns up for searches such as sqlite3, OPFS, local-first, full-text search and Drizzle ORM. ## 🔧 Dependencies _No dependency updates_ --- ## Upgrade notes - No breaking changes. Drop-in for v0.1.0. - Apps that installed a `Buffer` polyfill only for Drizzle blob columns can switch those columns to `bytes()` and drop the polyfill. The stored data is the same `blob`, so no migration is needed. <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%** · `5d1134b` · 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
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors