@yawlabs/postgres-mcp 0.5.2 → 0.5.3
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 +93 -0
- package/dist/index.js +1557 -722
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,99 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.3] - 2026-05-14
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
- Transitive deps patched via `npm audit fix`: in-range bumps to `hono`,
|
|
14
|
+
`fast-uri`, `express-rate-limit`, and `ip-address`. All four reach us
|
|
15
|
+
only through `@modelcontextprotocol/sdk`'s HTTP-transport path, which
|
|
16
|
+
this server doesn't use (stdio only) and which esbuild tree-shakes out
|
|
17
|
+
of `dist/index.js`. Practical exposure was already nil; this clears the
|
|
18
|
+
audit noise on future `npm install` runs.
|
|
19
|
+
|
|
20
|
+
### Infrastructure
|
|
21
|
+
- `release.yml` smoke test now retries the `npx -y --version` call itself
|
|
22
|
+
(6 x 10s) instead of probing `npm view` once and trusting the result.
|
|
23
|
+
Registry propagation has two desynchronized CDN cache layers --
|
|
24
|
+
`npm view` (metadata) and `npx -y` (tarball) can land on different
|
|
25
|
+
edges and return inconsistent results. Observed on the v0.5.2 publish
|
|
26
|
+
(2026-05-14): `npm view` returned 0.5.2 immediately but the subsequent
|
|
27
|
+
`npx -y` got `ETARGET` and turned the Release workflow red despite a
|
|
28
|
+
successful publish. The retry now covers both layers.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- Dev dependencies bumped via Dependabot (`@biomejs/biome`, `zod`, plus
|
|
32
|
+
transitives) -- in-range, dev-only.
|
|
33
|
+
|
|
34
|
+
## [0.5.2] - 2026-05-14
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- `pg_describe_table` now emits a `kind fetch failed, reported as "table"`
|
|
38
|
+
warning instead of silently defaulting to `"table"` when the kind query
|
|
39
|
+
fails. The other partial-failure fields already followed this pattern; the
|
|
40
|
+
`kind` field is reported at the top level so a silent default could
|
|
41
|
+
mislabel a view or materialized view as a regular table.
|
|
42
|
+
- `pg_advisor` `sequence_exhaustion` divides `last_value / max_value` in
|
|
43
|
+
`numeric` rather than `float8`. BIGINT sequences past 2^53 lose precision
|
|
44
|
+
in `float8`, and the danger zone (>= threshold) is exactly where the
|
|
45
|
+
reported `pct_used` needs to stay accurate. The WHERE filter and the
|
|
46
|
+
reported value both switched.
|
|
47
|
+
- `pg_explain` `hypothetical_indexes` handler defaults `using` to `"btree"`
|
|
48
|
+
defensively. The Zod schema already applies this default on the protocol
|
|
49
|
+
path, but a unit-test-style direct handler call bypasses Zod -- so a
|
|
50
|
+
missing `using` would render as `USING undefined` in the generated SQL and
|
|
51
|
+
hypopg_create_index would surface a confusing syntax error. New
|
|
52
|
+
integration regression test covers the omitted-`using` path against a real
|
|
53
|
+
HypoPG-installed database.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- `api.ts` `getPool()` docstring spells out the env-var snapshot semantics --
|
|
57
|
+
which vars are bake-on-first-call (`DATABASE_URL`,
|
|
58
|
+
`POSTGRES_STATEMENT_TIMEOUT_MS`, `POSTGRES_CONNECTION_TIMEOUT_MS`,
|
|
59
|
+
`POSTGRES_POOL_MAX`, `POSTGRES_SSL_REJECT_UNAUTHORIZED`) and which are
|
|
60
|
+
read per-request (`POSTGRES_MAX_ROWS`, `ALLOW_WRITES`). Previously a
|
|
61
|
+
hidden assumption.
|
|
62
|
+
- `api.ts` `typeNameCache` comment now explains the OID-wraparound staleness
|
|
63
|
+
bound: a `DROP TYPE` / `CREATE TYPE` in-session gets a new OID and the
|
|
64
|
+
miss-fill path picks it up; the dead entry under the old OID is wasted
|
|
65
|
+
memory, not a correctness bug.
|
|
66
|
+
- `scripts/wsl-pg-setup.sh` now carries DEV/CI ONLY warnings on the PG16
|
|
67
|
+
purge and on the `0.0.0.0/0 md5` pg_hba stanza. Both are safe inside WSL
|
|
68
|
+
but lethal as a production template -- the warnings prevent silent
|
|
69
|
+
copy-paste into a real host config.
|
|
70
|
+
- `release.sh` Verify step uses the same 5x5s retry loop as the CI
|
|
71
|
+
smoke test, instead of a one-shot `sleep 3 && npm view` that flaked on a
|
|
72
|
+
slow registry.
|
|
73
|
+
|
|
74
|
+
### Infrastructure
|
|
75
|
+
- `release.yml` concurrency group locked to the literal string
|
|
76
|
+
`release-npm` instead of an interpolated `${{ github.workflow }}` /
|
|
77
|
+
`${{ github.ref }}`. The interpolated form fragmented across different
|
|
78
|
+
tags (each ref-name got its own queue, defeating the serialization the
|
|
79
|
+
group was meant to provide) and could silently re-fragment on a workflow
|
|
80
|
+
rename. The literal key serializes all release runs into one queue.
|
|
81
|
+
- `release.yml` integration build step de-duplicated -- the redundant
|
|
82
|
+
pre-publish `npm run build` was rebuilding the same artifact the
|
|
83
|
+
`prepublishOnly` hook would build moments later. Removed.
|
|
84
|
+
- `release.sh` now creates annotated tags (`git tag -a`) and the workflow
|
|
85
|
+
uses `git push --follow-tags`; lightweight tags are silently skipped by
|
|
86
|
+
`--follow-tags`, which previously left `release.yml` un-triggered on
|
|
87
|
+
manual tags.
|
|
88
|
+
|
|
89
|
+
## [0.5.1] - 2026-05-05
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
- Type-name lookup failures no longer drop the user's successful query
|
|
93
|
+
rows. `runReadOnly` / `runReadWrite` / `runReadWriteRollback` now route
|
|
94
|
+
catalog lookups through a `safeResolveTypeNames` wrapper that logs to
|
|
95
|
+
stderr and falls back to `{}` on a transient `pg_type` error, instead
|
|
96
|
+
of letting the catalog failure throw past the user's already-successful
|
|
97
|
+
result.
|
|
98
|
+
- `release.sh` WSL matrix step uses a sed regex to translate Git Bash
|
|
99
|
+
drive prefixes (`/c/`, `/d/`, ...) into the WSL form (`/mnt/c/`,
|
|
100
|
+
`/mnt/d/`, ...). The previous hardcoded `/c/` broke contributors
|
|
101
|
+
working from any other drive.
|
|
102
|
+
|
|
10
103
|
## [0.5.0] - 2026-05-04
|
|
11
104
|
|
|
12
105
|
### Changed
|