@yawlabs/postgres-mcp 0.4.1 → 0.5.1

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
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.0] - 2026-05-04
11
+
12
+ ### Changed
13
+ - **BREAKING:** `engines.node` raised from `>=18` to `>=20`. The CI matrix
14
+ has been on `[20, 22]` since 0.4.1 and the integration + release jobs
15
+ ran exclusively on Node 20+, so Node 18 was effectively unsupported in
16
+ practice; this release makes the declared support match. esbuild
17
+ `target` and `release.sh` prerequisite comment updated to match.
18
+
10
19
  ## [0.4.1] - 2026-05-04
11
20
 
12
21
  ### Changed
package/dist/index.js CHANGED
@@ -35368,6 +35368,14 @@ async function runUserQueryBounded(client, sql, params, maxRows) {
35368
35368
  });
35369
35369
  }
35370
35370
  }
35371
+ async function safeResolveTypeNames(client, fields) {
35372
+ try {
35373
+ return await resolveTypeNames(client, [...new Set(fields.map((f) => f.dataTypeID))]);
35374
+ } catch (err) {
35375
+ console.error(`[postgres-mcp] type-name resolution failed: ${err instanceof Error ? err.message : String(err)}`);
35376
+ return {};
35377
+ }
35378
+ }
35371
35379
  function toQueryResult(result, maxRows, typeNames = {}) {
35372
35380
  const truncated = result.rows.length > maxRows;
35373
35381
  const rows = truncated ? result.rows.slice(0, maxRows) : result.rows;
@@ -35390,7 +35398,7 @@ async function runReadOnly(sql, params = [], hooks = {}) {
35390
35398
  if (hooks.setup) await hooks.setup(client);
35391
35399
  const result = await runUserQueryBounded(client, sql, params, maxRows);
35392
35400
  await client.query("ROLLBACK");
35393
- const typeNames = await resolveTypeNames(client, [...new Set(result.fields.map((f) => f.dataTypeID))]);
35401
+ const typeNames = await safeResolveTypeNames(client, result.fields);
35394
35402
  return { ok: true, data: toQueryResult(result, maxRows, typeNames) };
35395
35403
  } catch (err) {
35396
35404
  try {
@@ -35421,7 +35429,7 @@ async function runReadWrite(sql, params = []) {
35421
35429
  await client.query("BEGIN");
35422
35430
  const result = await runUserQueryBounded(client, sql, params, maxRows);
35423
35431
  await client.query("COMMIT");
35424
- const typeNames = await resolveTypeNames(client, [...new Set(result.fields.map((f) => f.dataTypeID))]);
35432
+ const typeNames = await safeResolveTypeNames(client, result.fields);
35425
35433
  return { ok: true, data: toQueryResult(result, maxRows, typeNames) };
35426
35434
  } catch (err) {
35427
35435
  try {
@@ -35447,7 +35455,7 @@ async function runReadWriteRollback(sql, params = [], hooks = {}) {
35447
35455
  if (hooks.setup) await hooks.setup(client);
35448
35456
  const result = await runUserQueryBounded(client, sql, params, maxRows);
35449
35457
  await client.query("ROLLBACK");
35450
- const typeNames = await resolveTypeNames(client, [...new Set(result.fields.map((f) => f.dataTypeID))]);
35458
+ const typeNames = await safeResolveTypeNames(client, result.fields);
35451
35459
  return { ok: true, data: toQueryResult(result, maxRows, typeNames) };
35452
35460
  } catch (err) {
35453
35461
  try {
@@ -36662,7 +36670,7 @@ function compareVersions(a, b) {
36662
36670
  }
36663
36671
 
36664
36672
  // src/index.ts
36665
- var version2 = true ? "0.4.1" : (await null).createRequire(import.meta.url)("../package.json").version;
36673
+ var version2 = true ? "0.5.1" : (await null).createRequire(import.meta.url)("../package.json").version;
36666
36674
  var subcommand = process.argv[2];
36667
36675
  if (subcommand === "version" || subcommand === "--version") {
36668
36676
  console.log(version2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/postgres-mcp",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "PostgreSQL MCP server — query, schema introspection, explain, and health checks for AI assistants",
5
5
  "license": "MIT",
6
6
  "author": "YawLabs <contact@yaw.sh>",
@@ -57,6 +57,6 @@
57
57
  "zod": "^4.3.6"
58
58
  },
59
59
  "engines": {
60
- "node": ">=18"
60
+ "node": ">=20"
61
61
  }
62
62
  }