Skip to content

Rename memdb VFS option to memory and bump package version#1

Closed
haroonwaves wants to merge 1 commit intomainfrom
codex/rename-memdb-to-memory-and-create-pr
Closed

Rename memdb VFS option to memory and bump package version#1
haroonwaves wants to merge 1 commit intomainfrom
codex/rename-memdb-to-memory-and-create-pr

Conversation

@haroonwaves
Copy link
Owner

Motivation

  • Standardize the in-memory VFS option name to memory for clearer public API and consistency across code and docs.
  • Ensure TypeScript types, worker runtime, and documentation are aligned to avoid runtime or typing mismatches.
  • Bump the package version to publish the backwards-incompatible name change.

Description

  • Updated the VFS union type from 'memdb' to 'memory' in src/types/index.ts so VFSType now includes memory.
  • Updated runtime checks in src/worker/sqliteWorker.ts to use 'memory' for initialization and :memory: DB creation.
  • Replaced documentation references in README.md, QUICKSTART.md, and PROJECT_SUMMARY.md to use memory in examples and configuration snippets.
  • Bumped package version from 0.2.5 to 0.2.6 in package.json.

Testing

  • Ran npm run typecheck and the TypeScript check succeeded.
  • Ran npm run lint and ESLint completed without errors.
  • Searched repository with rg -n "memdb|0.2.5" to confirm no remaining memdb occurrences and no stale references were found.

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@haroonwaves haroonwaves closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant