@zeroxsolutions/db 9.3.3 → 9.3.4
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 9.3.4 (2026-10-07)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **db:** remove a disposable container in one forced call ([7abc4cb](https://github.com/zeroxsolutions/zeroxsolutions/commit/7abc4cb))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Claude Opus 5.5
|
|
10
|
+
- Lương Văn Tú
|
|
11
|
+
|
|
1
12
|
## 9.3.2 (2026-10-03)
|
|
2
13
|
|
|
3
14
|
This was a version bump only for @zeroxsolutions/db to align it with other projects, there were no code changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disposable-postgres.d.ts","sourceRoot":"","sources":["../../src/testing/disposable-postgres.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"disposable-postgres.d.ts","sourceRoot":"","sources":["../../src/testing/disposable-postgres.ts"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG3E,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,SAAU,CAAC;AAE5C,8FAA8F;AAC9F,MAAM,WAAW,kBAAkB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzE,EAAE,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAChC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnF,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAqBtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
1
2
|
import { PostgreSqlContainer } from '@testcontainers/postgresql';
|
|
2
3
|
import { generateDrizzleJson, generateMigration } from 'drizzle-kit/api';
|
|
3
4
|
import { drizzle } from 'drizzle-orm/postgres-js';
|
|
@@ -26,10 +27,24 @@ export async function startDisposablePostgres(schema, image) {
|
|
|
26
27
|
connectionString,
|
|
27
28
|
async stop() {
|
|
28
29
|
await client.end();
|
|
29
|
-
|
|
30
|
+
// One forced remove, which the daemon carries out as a kill and a removal together. The container's
|
|
31
|
+
// own stop sends a stop and then a remove, and on a loaded host that remove answered 409 "container is
|
|
32
|
+
// running", failing a suite whose every case had passed (testcontainers@12.1.0, Docker Desktop 29).
|
|
33
|
+
const runtime = await containerRuntime();
|
|
34
|
+
await runtime.container.getById(container.getId()).remove({ force: true, v: true });
|
|
30
35
|
},
|
|
31
36
|
};
|
|
32
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The runtime client of the testcontainers that `@testcontainers/postgresql` itself runs on. It is
|
|
40
|
+
* resolved from that package rather than declared here, so a consumer installs nothing beyond the peer it
|
|
41
|
+
* already has, and the client is the one the container was started through.
|
|
42
|
+
*/
|
|
43
|
+
function containerRuntime() {
|
|
44
|
+
const fromPostgres = createRequire(createRequire(import.meta.url).resolve('@testcontainers/postgresql'));
|
|
45
|
+
const { getContainerRuntimeClient } = fromPostgres('testcontainers');
|
|
46
|
+
return getContainerRuntimeClient();
|
|
47
|
+
}
|
|
33
48
|
/**
|
|
34
49
|
* Prints a server WARNING as one line and drops every lower severity. Left to its default, postgres.js
|
|
35
50
|
* prints each notice as a raw object, and a full-text search for a stop word alone raises two per
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeroxsolutions/db",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.4",
|
|
4
4
|
"description": "Generic Drizzle toolkit - the id column and audit timestamps a table takes, a base repository, the unit-of-work and transactional outbox impls, and the filter/sort/pagination query helpers, for PostgreSQL (postgres-js) and Cloudflare D1; ships no domain schema. Shared across ZeroXSolutions services.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|