Skip to content

v2.0.0

Choose a tag to compare

@kurok kurok released this 16 Jun 15:56
· 149 commits to master since this release
e264ed5

First release since v1.0.1 (2024-06-07). Major bump — master contains breaking changes.

Breaking

  • Minimum supported Node.js is now 18.0.0 (was 14.0.0); the client relies on native fetch.

Changes

  • Replace the deprecated request/request-promise HTTP libraries with Node's native fetch (removes the request runtime dependency). Closes #59.
  • Add api.requestOptions, shallow-merged into every fetch() call — enables proxy/SOCKS agents and trusting a self-signed / internal-CA Vault via an undici dispatcher. Closes #37, #29.
  • Fix a process that never exits after reading with a renewable token; add VaultClient#close() / VaultBaseAuth#cancelTokenRefresh(); VaultClient.clear() now closes the instances it removes. Closes #31.
  • IAM auth: optional region config; STS GetCallerIdentity is signed against the regional endpoint, fixing SignatureDoesNotMatch on non-us-east-1. Closes #25.
  • Auth token: derive expiry from Vault's authoritative expire_time (RFC3339), falling back to ttl. Closes #51.
  • Raise AuthTokenExpiredError for expired non-refreshable tokens instead of silently using a stale token. Closes #50.
  • Replace deprecated new Buffer() with Buffer.from() in IAM STS body encoding. Closes #52.

Dependencies

  • config peer dependency range kept at >=1 <4 (unchanged from 1.0.1; supports config v1–v3).

Full details in CHANGELOG.md.