Skip to content

v1.0.3

Choose a tag to compare

@kurok kurok released this 30 Jun 19:55
· 3 commits to release/1.0.x since this release

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 } or api.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, …); undefined on KV v1 / non-KV reads.
  • Default behavior unchanged from 1.0.2 — with no kv/engines config, 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 in Lease).
  • Mount-version detection coerces options.version with Number(), matching the engines path.

CI

  • Pinned the config install to the declared peer range (<4) so the Node 14 matrix leg passes (config@4 requires 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.