Skip to content

v0.1.2 — Fully async API

Choose a tag to compare

@bastianibanez bastianibanez released this 31 Mar 12:55
· 47 commits to main since this release

Breaking Changes

  • SecretLoader interface now requires Promise<string | null> return for both get() and getMany() (was MaybePromise<T>)
  • MaybePromise<T> type alias removed from public surface
  • autoLoad option removed from ConfigManagerOptions — callers must explicitly await manager.load()
  • load() always returns Promise<void>; lazy-loading and isPromiseLike guards are gone

Migration

// Before (0.1.1)
const manager = new ConfigManager({ autoLoad: true });

// After (0.1.2)
const manager = new ConfigManager();
await manager.load();

What Changed

  • src/types.ts — removed MaybePromise, tightened SecretLoader to pure Promise returns
  • src/loaders/dotenv.tsDotEnvLoader.get() and getMany() are now async
  • src/manager.tsload() is always async, removed all lazy-loading code paths