v1.0.3
Maintenance release on the Node 16-compatible 1.0.x line. The latest dist-tag remains on the 2.x line — this is a legacy/back-port release.
Highlights
- KV v2 secrets engine support, backported (opt-in, non-breaking) — #102. Enable per mount via
api.engines: { secret: 2 }orapi.kv.autoDetect: true. The client rewrites paths (secret/foo→secret/data/foo, list →secret/metadata/foo), wraps writes in{ data: … }, and unwraps the v2 response automatically. Lease.getMetadata()— returns KV v2 version metadata (version,created_time, …);undefinedon KV v1 / non-KV reads.- Default behavior unchanged from 1.0.2 — with no
kv/enginesconfig, read/list/write are byte-for-byte identical to v1.0.2 (literal paths, no wrapping, no detection round-trip). - Node 14+ retained — this line keeps the
request-based stack; the 2.x line requires Node 18 (native fetch). Verified green on the Node 14/16/18/20 CI matrix.
Fixes folded in before merge
- KV v2 read of a soft-deleted secret no longer throws an opaque
TypeError(null-data guard inLease). - Mount-version detection coerces
options.versionwithNumber(), matching theenginespath.
CI
- Pinned the
configinstall to the declared peer range (<4) so the Node 14 matrix leg passes (config@4requires Node ≥20).
Install
npm install node-vault-client@1.0.3
latest stays on 2.x; install this explicit version (or via the legacy dist-tag once published) for the Node 16 line.