Patch Changes
- a290741: Reset retained protocol parser state after a malformed backend message so later queries can recover.
- 6b6f28d: Fix
PGlite.create({ fs })on a fresh database calling the provided filesystem'sinit()twice: the inner initdb instance no longer inherits the user-providedfsand always runs on its own scratch filesystem. Previously any VFS holding exclusive resources (e.g. OPFS sync access handles) failed with a contention error on first create. - 354f4ae: Fix
formatQuery(used bylive.query/live.incrementalQueryto inline parameters) emitting%NLinstead of the positional%N$Lformat specifier. A bare%NLis "min width N" and consumesformat()arguments sequentially, so placeholders that are out of textual order silently bound the wrong values, and repeated placeholders failed withtoo few arguments for format(). - 219af1e: Expose the fields node-postgres derives from the CommandComplete command tag on
Results:command(e.g.SELECT,INSERT,CREATE), androwCount(the per-statement count from the tag). The tag was already received and parsed internally to computeaffectedRows, but these values were not surfaced. Matching node-postgres'command/rowCountresult fields lets pg-compatible adapters report them without re-parsing SQL. - 20839a7: Preserve the host
process.exitCodewhen closing a PGlite instance.close()calls_emscripten_force_exit(0), whose Emscripten runtime setsprocess.exitCode = 0, clobbering any exit code the host process had already set. This mirrors the existing save/restore guards in#init()andexecProtocolRaw(), so closing a database no longer silently resets the host process's exit code. - 7e784a4: Reject operations performed through transaction handles after the transaction has closed.