@electric-sql/pglite
0.5.17 · 19 Nov 2026Apache-2.044.2M / weekRepositoryHomepagenpmAtom feed
Upgrading @electric-sql/pglite From 0.2.6 to 0.5.17
53 releases in betweennotes for 10
Release by release
- Fixed
Upgrade to PostgreSQL 18.7
- Fixed
- Fixed
Export
pglite.wasm,initdb.wasmandpglite.dataso they can be imported by package path (e.g.@electric-sql/pglite/pglite.wasm), and document Nitro/Nuxt support. - Fixed
Parse
infinityand-infinityindate,timestampandtimestamptzvalues asInfinityand-Infinityinstead ofInvalid Date, and serialize them back toinfinityand-infinity. - Fixed
Escape embedded double quotes in
identifiertemplate helper so identifiers containing"produce valid SQL - Fixed
Serialize query descriptions and wait for database initialization so concurrent operations return the correct parameter and result metadata.
- Fixed
Reset the stream callback after execProtocolRawStream so later execProtocolRaw/execProtocolRawSync calls are not routed to it
- Fixed
- Fixed
Reject with
TransactionAbortedErrorwhen committing an aborted transaction rolls it back instead of silently resolving. - Fixed
Reduce initdb memory usage by passing a smaller WebAssembly.Memory object during initialization'
- Fixed
- Fixed
Only build the
pglite.wasm,initdb.wasmandpglite.dataURLs when PGlite has to load them. PassingpgliteWasmModule,initdbWasmModuleandfsBundlenow works in bundles whereimport.meta.urlis undefined, such as an esbuild IIFE build. - Fixed
Use PROXYFS instead of dumping the data dir from the scratch PGlite used for initdb when the data dir is in memory.
- Fixed
Do not copy parsers on each query
- Fixed
- New
Added support for node-postgres through createPgConfig()
- New
Added MemfsFrontendFS which allows other filesystems be implemented on top of a MEMFS. Example: added Memfs2OpfsFS which is backed by an OPFS fs.
- Fixed
close()now waits for queries, execs and transactions that were issued before it, so they complete instead of failing withCannot read properties of undefinedafter teardown.
- New
- Fixed
Fix custom filesystems not receiving times set with
FS.utime. Emscripten'sFS.utimecallssetattrwithatimeandmtime, but theBaseFilesystembridge only handled the oldertimestampfield, soutimeswas never called on OPFS AHP or any otherBaseFilesystem. Files restored from a tarball kept the time they were written instead of the time stored in the tarball. - Fixed
Run initdb with
TZ=UTC, like the backend, so a new database getstimezone = 'UTC'inpostgresql.conf. Before, initdb wrote the host's zone as a fixed offset without daylight saving (e.g.Etc/GMT+5for America/New_York), sotimestamptzinput without an offset was stored at a different instant on each non-UTC machine. - Fixed
Start under the Node.js permission model (
node --permission). Emscripten's NODEFS read the fs open flags withprocess.binding('constants'), which Node always denies in that mode, sonew PGlite()threwERR_ACCESS_DENIEDeven formemory://. The bundled build now reads them fromrequire('fs').constants, which holds the same values. - Fixed
Fix files restored from a tarball getting a January 1970 modification time.
loadTarpassed the tar header's time to Emscripten'sFS.utimein seconds, butFS.utimetakes milliseconds. This affected every new database (initdb's data dir is restored from a tarball) and everyloadDataDir. With the Node filesystem the files on disk got those dates too.
- Fixed
- Fixed
Bug fix: check ready before close
- Fixed
Update submodule
- Fixed
Fix premature ReadyForQuery responses after extended-query errors, preventing PostgreSQL clients from desynchronizing before Sync.
- Fixed
- Fixed
Bug fix: wait for running queries to finish before doing a data dir dump
- Fixed
Wait for queries to finish before closing PGlite instance. See #1128
- Fixed
Fix a windowed
live.query(one givenoffsetandlimit) leaking itslive_query_<id>_get_total_countprepared statement onunsubscribe. Onlylive_query_<id>_getwas deallocated, so the count statement survived every teardown while its backing view was dropped, accumulating dangling prepared statements for the lifetime of the database.
- Fixed
3 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.