Rename memdb VFS option to memory and bump package version#1
Rename memdb VFS option to memory and bump package version#1haroonwaves wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e8e5c9328
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| vfs: 'opfs-sahpool', | ||
| }); | ||
| } else if (vfsType === 'memdb') { | ||
| } else if (vfsType === 'memory') { |
There was a problem hiding this comment.
Keep legacy
memdb configs working or fail fast
Changing the VFS discriminator to memory here means existing configs that still send vfs.type = 'memdb' no longer take the in-memory branch and instead fall through to the OPFS path in openDatabase (OpfsDb/COOP-COEP check in the else). For untyped JS consumers or persisted configs from prior releases, upgrading can silently switch storage semantics from ephemeral memory to persistent OPFS (or start throwing header errors), which is a regression that should be handled via aliasing or an explicit validation error.
Useful? React with 👍 / 👎.
| { | ||
| "name": "@haroonwaves/sqlite-wasm-easy", | ||
| "version": "0.2.5", | ||
| "version": "0.2.6", |
There was a problem hiding this comment.
Bump minor version for the breaking VFS rename
This change intentionally introduces a backwards-incompatible API rename (memdb to memory) but only bumps the package from 0.2.5 to 0.2.6. Consumers using a range like ^0.2.5 will receive this as a routine patch update even though it can break runtime behavior, so this should be released as a new minor version (for pre-1.0, 0.3.0) or kept backward-compatible.
Useful? React with 👍 / 👎.
Motivation
memoryfor clearer public API and consistency across code and docs.Description
'memdb'to'memory'insrc/types/index.tssoVFSTypenow includesmemory.src/worker/sqliteWorker.tsto use'memory'for initialization and:memory:DB creation.README.md,QUICKSTART.md, andPROJECT_SUMMARY.mdto usememoryin examples and configuration snippets.0.2.5to0.2.6inpackage.json.Testing
npm run typecheckand the TypeScript check succeeded.npm run lintand ESLint completed without errors.rg -n "memdb|0.2.5"to confirm no remainingmemdboccurrences and no stale references were found.Codex Task