unstale

npm / @electric-sql/pglite

@electric-sql/pglite

What changed in @electric-sql/pglite 0.3 to 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.

6 breaking14 new APIs and options2 performance5 behavior and defaults29 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

@electric-sql/pglite 0.546 changes

Breaking changes 5

  • Date, timestamp, and timestamptz values representing infinity parse as Infinity or -Infinity instead of Invalid Date, and serialize back to infinity or -infinity.

    0.5.16release notes

  • Committing an aborted transaction now rejects with TransactionAbortedError instead of silently resolving.

    0.5.15release notes

  • initdb now runs with TZ=UTC, so a new database gets timezone = 'UTC' in postgresql.conf instead of the host's zone as a fixed offset.

    0.5.12release notes

  • PGlite no longer sets process.exitCode, so using it will not alter the process exit code.

    0.5.8release notes

  • Other extensions moved to their own npm packages.

    0.5.0release notes

New APIs and options 9

  • The WASM file can now be imported by package path.

    0.5.16release notes

  • The data file can now be imported by package path.

    0.5.16release notes

  • The WASM file can now be imported by package path.

    0.5.16release notes

  • Added support for node-postgres through createPgConfig().

    0.5.13release notes

  • Allows other filesystems to be implemented on top of a MEMFS.

    0.5.13release notes

  • Additional core symbols are exported from the main WASM module, enabling the plpgsql_check extension to use them.

    0.5.9release notes

  • Results now expose the command derived from the CommandComplete command tag, enabling pg-compatible adapters to report it without re-parsing SQL.

    0.5.5release notes

  • Results now expose the per-statement count from the CommandComplete command tag, enabling pg-compatible adapters to report it without re-parsing SQL.

    0.5.5release notes

  • Adds pg_stat_statements.tar.gz to the main package.

    0.5.2release notes

Performance 2

  • Initialization uses a smaller WebAssembly.Memory object to reduce initdb memory usage.

    0.5.15release notes

  • Parsers are no longer copied on each query.

    0.5.14release notes

Behavior and default changes 3

  • The bundled build now reads filesystem open flags from require('fs').constants, allowing new PGlite() to run under Node.js's permission model, including with memory://.

    0.5.12release notes

  • Upgraded to PostgreSQL 18.6, which may affect database behavior available to developers.

    0.5.9release notes

  • Upgraded to Postgres 18.3, which may affect the database capabilities available to developers.

    0.5.0release notes

Fixes and other changes 27

  • The stream callback is reset afterward so later execProtocolRaw or execProtocolRawSync calls are not routed to it.

    0.5.16release notes

  • The template helper escapes embedded double quotes so identifiers containing " produce valid SQL.

    0.5.16release notes

  • Query descriptions are serialized and database initialization is awaited so concurrent operations return correct parameter and result metadata.

    0.5.16release notes

  • Passing this option now works in bundles where import.meta.url is undefined, because the pglite.data URL is built only when PGlite has to load it.

    0.5.14release notes

  • Passing this option now works in bundles where import.meta.url is undefined, because the initdb.wasm URL is built only when PGlite has to load it.

    0.5.14release notes

  • Passing this option now works in bundles where import.meta.url is undefined, because the pglite.wasm URL is built only when PGlite has to load it.

    0.5.14release notes

  • close() now waits for previously issued queries, execs, and transactions so they complete instead of failing after teardown.

    0.5.13release notes

  • Custom filesystems now receive atime and mtime values through the BaseFilesystem bridge, so utimes is called and restored file timestamps are preserved.

    0.5.12release notes

  • Tar header times are now passed to FS.utime in milliseconds, fixing January 1970 modification times for restored files in new databases and loadDataDir.

    0.5.12release notes

  • Prevents premature ReadyForQuery responses after extended-query errors, avoiding PostgreSQL client desynchronization before Sync.

    0.5.11release notes

  • Checks readiness before closing.

    0.5.11release notes

  • Data directory dumps now wait for running queries to finish.

    0.5.10release notes

  • Unsubscribing from a windowed live query now deallocates its total-count prepared statement, preventing dangling statements from accumulating.

    0.5.10release notes

  • Closing a PGlite instance now waits for queries to finish.

    0.5.10release notes

  • Fixes convert_to.

    0.5.7release notes

  • The second options argument is now applied when calling PGlite.create(undefined, options).

    0.5.6release notes

  • Fixes were made for process.exitCode.

    0.5.6release notes

  • Operations through transaction handles are rejected after the transaction has closed.

    0.5.5release notes

  • Uses positional %N$L format specifiers when inlining parameters, preventing incorrect bindings for out-of-order or repeated placeholders.

    0.5.5release notes

  • On a fresh database, the inner initdb instance no longer inherits the provided filesystem, avoiding contention for VFS resources.

    0.5.5release notes

  • Closing a PGlite instance preserves the host process's existing exit code instead of resetting it to 0.

    0.5.5release notes

  • Retained parser state is reset after a malformed backend message, allowing later queries to recover.

    0.5.5release notes

  • PGlite detects the Node environment via process.type, allowing its filesystem code path to work in Electron main and utility processes while excluding Electron web contexts.

    0.5.4release notes

  • Parsing and raw results handling were improved.

    0.5.3release notes

  • Fixes serialization of arrays of BigInts.

    0.5.2release notes

  • Fixes setting and restoring the process exit code.

    0.5.2release notes

  • Allows untyped parameters to be serialized.

    0.5.2release notes

@electric-sql/pglite 0.46 changes

Breaking changes 1

New APIs and options 2

  • Initial memory size can now be set.

    0.4.3release notes

  • You can now pass the initdb.wasm asset for bundlers that need it.

    0.4.2release notes

Behavior and default changes 2

Fixes and other changes 1

  • Fixes artifact caching so artifacts are not downloaded multiple times.

    0.4.5release notes

@electric-sql/pglite 0.34 changes

New APIs and options 3

Fixes and other changes 1

  • Trigger identifiers in the live extension now use schema.oid and table.oid.

    0.3.14release notes