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@electric-sql/pglite 0.546 changes
Breaking changes 5
Date, timestamp, and timestamptz values representing infinity parse as
Infinityor-Infinityinstead ofInvalid Date, and serialize back toinfinityor-infinity.Committing an aborted transaction now rejects with TransactionAbortedError instead of silently resolving.
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.
PGlite no longer sets process.exitCode, so using it will not alter the process exit code.
Other extensions moved to their own npm packages.
New APIs and options 9
The WASM file can now be imported by package path.
The data file can now be imported by package path.
The WASM file can now be imported by package path.
Added support for node-postgres through createPgConfig().
Allows other filesystems to be implemented on top of a MEMFS.
Additional core symbols are exported from the main WASM module, enabling the plpgsql_check extension to use them.
Results now expose the command derived from the CommandComplete command tag, enabling pg-compatible adapters to report it without re-parsing SQL.
Results now expose the per-statement count from the CommandComplete command tag, enabling pg-compatible adapters to report it without re-parsing SQL.
Adds pg_stat_statements.tar.gz to the main package.
Performance 2
Initialization uses a smaller WebAssembly.Memory object to reduce initdb memory usage.
Parsers are no longer copied on each query.
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://.
Upgraded to PostgreSQL 18.6, which may affect database behavior available to developers.
Upgraded to Postgres 18.3, which may affect the database capabilities available to developers.
Fixes and other changes 27
The stream callback is reset afterward so later
execProtocolRaworexecProtocolRawSynccalls are not routed to it.The template helper escapes embedded double quotes so identifiers containing
"produce valid SQL.Query descriptions are serialized and database initialization is awaited so concurrent operations return correct parameter and result metadata.
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.
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.
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.
close() now waits for previously issued queries, execs, and transactions so they complete instead of failing after teardown.
Custom filesystems now receive atime and mtime values through the BaseFilesystem bridge, so utimes is called and restored file timestamps are preserved.
Tar header times are now passed to FS.utime in milliseconds, fixing January 1970 modification times for restored files in new databases and loadDataDir.
Prevents premature ReadyForQuery responses after extended-query errors, avoiding PostgreSQL client desynchronization before Sync.
Checks readiness before closing.
Data directory dumps now wait for running queries to finish.
Unsubscribing from a windowed live query now deallocates its total-count prepared statement, preventing dangling statements from accumulating.
Closing a PGlite instance now waits for queries to finish.
Fixes convert_to.
The second options argument is now applied when calling PGlite.create(undefined, options).
Fixes were made for process.exitCode.
Operations through transaction handles are rejected after the transaction has closed.
Uses positional
%N$Lformat specifiers when inlining parameters, preventing incorrect bindings for out-of-order or repeated placeholders.On a fresh database, the inner initdb instance no longer inherits the provided filesystem, avoiding contention for VFS resources.
Closing a PGlite instance preserves the host process's existing exit code instead of resetting it to 0.
Retained parser state is reset after a malformed backend message, allowing later queries to recover.
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.
Parsing and raw results handling were improved.
Fixes serialization of arrays of BigInts.
Fixes setting and restoring the process exit code.
Allows untyped parameters to be serialized.
@electric-sql/pglite 0.46 changes
Breaking changes 1
Background workers are disabled.
New APIs and options 2
Initial memory size can now be set.
You can now pass the initdb.wasm asset for bundlers that need it.
Behavior and default changes 2
The checkpointer is disabled.
The default database, user and role are now all postgres.
Fixes and other changes 1
Fixes artifact caching so artifacts are not downloaded multiple times.
@electric-sql/pglite 0.34 changes
New APIs and options 3
Adds support for the Apache AGE graph database extension.
Added the pg_uuidv7 extension.
Added the pgTAP extension.
Fixes and other changes 1
Trigger identifiers in the live extension now use schema.oid and table.oid.