c12 is a smart configuration loader for JavaScript and TypeScript projects. It can load and merge config files across many formats (JSON, YAML, TOML, and others), supports environment-specific overrides and `.env` variable interpolation, and offers features like config watching with auto-reload and HMR.
Project status
- Actively maintained: The repo has a very recent upstream push (2026-06-07), and there are multiple tagged updates across the 2026 spring timeframe, including v4.0.0-beta.5.
- Update cadence: Observed updates are fairly frequent, with tags around Mar 15 (beta.4), Apr 1 (v3.3.4), and May 6 (beta.5), indicating an active development cycle rather than maintenance-only.
AI summary generated Today
Recent updates
v4.0.0-beta.5
1 month agoRelease v4.0.0-beta.5 claims only one enhancement, adding support for `jitiOptions` (plus related tests and a small documentation update). However, the provided code diff (from an earlier v3.x baseline) contains several larger behavioral and API surface changes, especially around config module loading and dotenv handling, that are not mentioned in the beta.5 release notes.
Featuresv3.3.4
2 months agov3.3.4 mainly updates dependencies and tweaks the package build/package metadata. It also simplifies the package.json exports field and bumps giget to v3. The code changes include additional build-script adjustments and, importantly, a subtle change to how TypeScript types are exposed for subpath exports.
v4.0.0-beta.4
2 months agov4.0.0-beta.4 makes loader behavior more correct and more predictable by (1) busting the ESM import cache for native JS config modules and (2) properly detecting directories whose names contain dots. The changes are implemented in src/loader.ts and are reinforced with new loader tests and fixture coverage.
Breakingv4.0.0-beta.3
3 months agov4.0.0-beta.3 changes how c12 handles `.env` `_FILE` secret references by making `expandFileReferences` opt-in. The release also updates documentation and refreshes some dev tooling and dependencies (including `dotenv`).
Breakingv4.0.0-beta.2
4 months agov4.0.0-beta.2 focuses on performance and environment handling improvements, including faster TypeScript loading and native .env parsing. It also adds support for resolving environment variables via _FILE references and moves giget/dotenv/chokidar related behavior toward optional peer dependencies for smaller installs and better runtime compatibility.
Featuresv4.0.0-beta.1
4 months agov4.0.0-beta.1 introduces a loader change where configuration imports now use native import by default, with jiti becoming optional rather than a hard dependency. It also updates the public `loadConfig` option types (replacing `jiti`/`jitiOptions` with `import` and `resolveModule`) and makes `chokidar` optional for watching.
Featuresv3.3.3
5 months agov3.3.3 primarily upgrades the file-watching dependency chokidar to the 5.x line. The release notes mention this explicitly, but the actual diff shows additional CI workflow and toolchain dependency updates not covered in the notes.
Breakingv3.3.2
6 months agov3.3.2 mostly changes build tooling and dependency constraints. Release notes mention a documentation typo fix (globalRc) and the move to obuild (rolldown) plus a relaxation of the magicast peer dependency range.
v3.3.1
7 months agov3.3.1 focuses on config resolution behavior around extensions, specifically tightening how “extends” targets are resolved. The diff also includes a loader resolution fallback removal, several dependency bumps, and test/fixture updates to reflect the stricter extension handling.
Breakingv3.3.0
8 months agoRelease v3.3.0 adds enhancements for configuration loading, including support for config files whose default export is an array. It also improves dotenv handling by making `cwd` optional, defaulting to the process working directory when omitted.
Features