Releases: groschi24/zonfig
Releases · groschi24/zonfig
v1.1.0
Added
- Zod 4 support with backward compatibility for Zod 3 patterns
Changed
- Breaking:
defineConfig()now returns aConfigContainerthat loads lazily- Config is loaded on first access, safe for containerized deployments (Docker, Coolify, Kubernetes)
await config.get('path')- Get a value directlyawait config.getAll()- Get full config objectawait config.getMasked()- Get config with secrets maskedawait config.load()- Get underlying Config instance for watch modeawait config.reload()- Force reload when env vars changeconfig.isLoaded- Check if config has been loaded
- Updated all dependencies to latest versions
- Migrated internal schema introspection to support Zod 4's new
_defstructure:- Type detection now uses
_def.type(Zod 4) with fallback to_def.typeName(Zod 3) - Array element extraction uses
_def.element(Zod 4) with fallback to_def.type(Zod 3) - Constraint extraction reads direct properties (
minLength,maxLength,minValue,maxValue) alongside_def.checksarray
- Type detection now uses
- Updated documentation generators (markdown, JSON Schema, env-example) for Zod 4 compatibility
- Updated schema diff utilities for Zod 4 compatibility
Fixed
- TypeScript errors in CLI (unused variables, type assertions)
- Array type extraction in
extractSchemaInfonow correctly returnsitemTypefor array schemas
v1.0.0
Added
Watch Mode
config.watch()method for hot reloading configuration- File system watchers for JSON, YAML, and .env files
- Configurable debounce for rapid file changes
- Event system with
config.on()for change notifications config.reload()for manual reloadingconfig.unwatch()to stop watching
Variable Interpolation
- Support for
${VAR}syntax in config values - Environment variable interpolation (e.g.,
postgres://${DB_HOST}:${DB_PORT}/mydb) - Config reference interpolation (e.g.,
${server.host}:${server.port}) - Recursive resolution with automatic cycle detection
CircularReferenceErrorfor circular reference detection
Secrets Masking
config.getMasked()method for safe loggingmaskObject()utility functionisSensitiveKey()for detecting sensitive keys- Auto-detection of sensitive keys (password, secret, token, apiKey, etc.)
- Customizable mask patterns and additional keys
Encrypted Configs
- AES-256-GCM encryption with scrypt key derivation
encryptValue()/decryptValue()functionsencryptObject()/decryptObject()for bulk operationsisEncrypted()/hasEncryptedValues()/countEncryptedValues()utilities- Auto-decrypt support in
defineConfig()withdecryptoption - Environment variable key support (
ZONFIG_ENCRYPTION_KEY)
Schema Migrations
diffSchemas()for comparing schema versionsgenerateMigrationReport()for markdown reportsvalidateConfigAgainstChanges()for config validationapplyAutoMigrations()for automatic migrations- Breaking change detection (removed fields, type changes)
Interactive CLI
zonfig init -iwith interactive promptszonfig checkfor configuration health checkszonfig showfor tree view of configurationzonfig show --list-pathsfor listing all config pathszonfig show --maskedfor hiding sensitive valueszonfig encrypt/zonfig decryptcommandszonfig migratefor schema migration reports
Documentation Website
- Full documentation site at zonfig.dev
- Interactive examples and guides
- API reference documentation
- Docker support for self-hosting
Changed
- Improved CLI help messages and error handling
- Better TypeScript type inference for config values
Fixed
- Fixed duplicate
pathsCLI option conflict - Fixed vitest compatibility in test suite