@ultimat3/db 22.6.1 → 22.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/pglite.ts +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/db",
3
- "version": "22.6.1",
3
+ "version": "22.7.0",
4
4
  "description": "Postgres access, transactions, migrations and drift detection",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@ultimat3/core": "22.6.1"
34
+ "@ultimat3/core": "22.7.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@electric-sql/pglite": ">=0.5.0"
package/src/pglite.ts CHANGED
@@ -299,6 +299,10 @@ export function createPgliteClient(options: PgliteOptions = {}): PgliteClient {
299
299
  (driver) => driver.close(),
300
300
  () => undefined,
301
301
  );
302
+ // A closed PGlite's WASM heap (~0.5 GB) is returned only when the collector finds it, and
303
+ // a test worker that opens one per file held two or three dead ones at a time. One full
304
+ // collection at close hands it back before the next file boots its own.
305
+ if (pending !== undefined) Bun.gc(true);
302
306
  },
303
307
  };
304
308
  }