feat: add OPFSWriteAheadVFS storage wrapper#14
Merged
subframe7536 merged 3 commits intomainfrom Apr 19, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/subframe7536/sqlite-wasm/sessions/b2a9d08b-c4cf-49d1-a058-06339288e482 Co-authored-by: subframe7536 <78338239+subframe7536@users.noreply.github.com>
Agent-Logs-Url: https://github.com/subframe7536/sqlite-wasm/sessions/b2a9d08b-c4cf-49d1-a058-06339288e482 Co-authored-by: subframe7536 <78338239+subframe7536@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
subframe7536
April 19, 2026 07:44
View session
subframe7536
requested changes
Apr 19, 2026
Owner
subframe7536
left a comment
There was a problem hiding this comment.
exclude package-lock.json; add OPFS readwrite-unsafe support check util, note the minimal version and update relative example in readme
…son, update readme Agent-Logs-Url: https://github.com/subframe7536/sqlite-wasm/sessions/39e80190-e7fa-4a42-8312-4657d6dda0de Co-authored-by: subframe7536 <78338239+subframe7536@users.noreply.github.com>
Contributor
Author
Done in 3e813ab:
|
subframe7536
approved these changes
Apr 19, 2026
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.
Adds a new storage backend wrapping
OPFSWriteAheadVFS— a synchronous OPFS VFS with WAL2-style journaling that enables concurrent reads, faster writes, and no blocking checkpoints.Changes
src/vfs/opfs-write-ahead.ts—useOpfsWriteAheadStorage(path, options)wrappingOPFSWriteAheadVFS; uses syncwa-sqlite.wasmbuild; acceptsnTmpFiles,autoCheckpoint,backstopIntervalsrc/types/index.ts—OPFSWriteAheadVFSOptionsinterfacesrc/types/wa-sqlite.d.ts— module declaration forwa-sqlite/src/examples/OPFSWriteAheadVFS.jssrc/utils.ts— newisOpfsReadWriteUnsafeSupported()utility to detect OPFSreadwrite-unsafelocking mode support (Chromium only)tsdown.config.ts/package.json— newopfs-wabuild entry and./opfs-wapackage export.gitignore— excludepackage-lock.jsonREADME.md— usage section with caniuse link for minimal browser version, usingisOpfsReadWriteUnsafeSupportedin example, Chromium-only requirement, Worker constraint, and WAL restrictionsUsage