pgsql-test 5.11.1 → 5.13.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.
package/connect.js CHANGED
@@ -79,8 +79,15 @@ const getConnections = async (cn = {}, seedAdapters = [seed_1.seed.pgpm()]) => {
79
79
  catch (error) {
80
80
  // Format the error with PostgreSQL extended fields for better debugging
81
81
  const formatted = (0, utils_1.formatPgError)(error);
82
- process.stderr.write(`[pgsql-test] Seed error (continuing):\n${formatted}\n`);
83
- // continue without teardown to allow caller-managed lifecycle
82
+ process.stderr.write(`[pgsql-test] Seed failed:\n${formatted}\n`);
83
+ try {
84
+ await teardown();
85
+ }
86
+ catch {
87
+ // Teardown of a database we are already abandoning: the seed error below
88
+ // is the actionable one, and hiding it behind a cleanup failure is worse.
89
+ }
90
+ throw new Error(`[pgsql-test] Seed failed:\n${formatted}`, { cause: error });
84
91
  }
85
92
  }
86
93
  const dbConfig = {
package/esm/connect.js CHANGED
@@ -75,8 +75,15 @@ export const getConnections = async (cn = {}, seedAdapters = [seed.pgpm()]) => {
75
75
  catch (error) {
76
76
  // Format the error with PostgreSQL extended fields for better debugging
77
77
  const formatted = formatPgError(error);
78
- process.stderr.write(`[pgsql-test] Seed error (continuing):\n${formatted}\n`);
79
- // continue without teardown to allow caller-managed lifecycle
78
+ process.stderr.write(`[pgsql-test] Seed failed:\n${formatted}\n`);
79
+ try {
80
+ await teardown();
81
+ }
82
+ catch {
83
+ // Teardown of a database we are already abandoning: the seed error below
84
+ // is the actionable one, and hiding it behind a cleanup failure is worse.
85
+ }
86
+ throw new Error(`[pgsql-test] Seed failed:\n${formatted}`, { cause: error });
80
87
  }
81
88
  }
82
89
  const dbConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-test",
3
- "version": "5.11.1",
3
+ "version": "5.13.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "pgsql-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests — giving developers realistic test coverage without external state pollution",
6
6
  "main": "index.js",
@@ -55,21 +55,21 @@
55
55
  "test:watch": "jest --watch"
56
56
  },
57
57
  "devDependencies": {
58
- "@pgpmjs/core": "7.26.1",
58
+ "@pgpmjs/core": "7.27.0",
59
59
  "@types/pg": "^8.20.4",
60
60
  "@types/pg-copy-streams": "^1.2.5",
61
61
  "makage": "^0.3.0"
62
62
  },
63
63
  "dependencies": {
64
- "@pgpmjs/env": "^2.42.1",
65
- "@pgpmjs/logger": "^2.24.1",
66
- "@pgpmjs/server-utils": "^3.26.1",
67
- "@pgpmjs/types": "^2.51.1",
64
+ "@pgpmjs/env": "^2.43.0",
65
+ "@pgpmjs/logger": "^2.25.0",
66
+ "@pgpmjs/server-utils": "^3.27.0",
67
+ "@pgpmjs/types": "^2.52.0",
68
68
  "pg": "^8.21.0",
69
- "pg-cache": "^3.26.1",
70
- "pg-env": "^1.30.1",
71
- "pgsql-client": "^4.12.1",
72
- "pgsql-seed": "^3.11.1"
69
+ "pg-cache": "^3.27.0",
70
+ "pg-env": "^1.31.0",
71
+ "pgsql-client": "^4.13.0",
72
+ "pgsql-seed": "^3.12.0"
73
73
  },
74
- "gitHead": "ce544846eafd96280fac2607f873960392ae2c89"
74
+ "gitHead": "7407d2cdbaed4ec0f7c9bcdd9f4290c4ea81aa52"
75
75
  }