@wolfstar/env-utilities. For the weekly summary across all packages, see the changelog overview.
2.3.1 (2026-10-06)
Updates
- Dependencies — Updated all non-major dependencies. (#253)
2.3.0 (2026-10-04)
New features
EnvFromVarlock— AddedEnvFromVarlockto deriveEnvfrom varlock’s generatedCoercedEnvSchema, exported from the package root and from the new@wolfstar/env-utilities/varlocksubpath. The README now states thatenvParseArrayneedsArrayStringkeys, not plainstring.EnvStringalso rejects optional number and boolean keys now, like required ones. (#260)- Node.js loader — Added a
nodeloader that parses.env*files with Node.js’ ownutil.parseEnv(Node.js 20.12 or newer) and expands references likedotenv-expand.dotenvanddotenv-expandare now optional peer dependencies. When no loader is requested,dotenvis used if both packages are installed and thenodeloader if they are not, so a project that has them installed behaves as before and a varlock or new project installs nothing. Asking forloader: 'dotenv'without the packages throws anErrornaming the missing one.EnvLoaderOptionsno longer extends dotenv’sDotenvConfigOptions, andEnvSetupResultis now the package’s ownEnvLoaderOutput. (#265) - Automatic varlock loader — The
varlockloader is now picked automatically whenvarlockis installed and the project has asrc/.env.schema, a.env.schemaor avarlock.loadPathinpackage.json. An explicitpath, theloaderoption andDOTENV_LOADERstill win. Behaviour change: a project that already has a.env.schemaand hasvarlockinstalled, but loaded its.env*files through dotenv, now loads through varlock after this release. Varlock reads the schema and its own.env*discovery, notsrc/.env*withNODE_ENVsuffixes, so the values can differ: setloader: 'dotenv'(orDOTENV_LOADER=dotenv) to keep the previous behaviour. The loader is still experimental. (#262) varlock loadformat — The experimentalvarlockloader now runs throughvarlock load --format json-fullinstead ofvarlock/auto-load.parsednow holds exactly the resolved keys,pathandenvmap to--pathand--env, and an invalid schema throws anErrorwith varlock’s summary instead of exiting the process. (#261)- Typed
ENVexport — Varlock’s typedENVobject is now exported asenvfrom@wolfstar/env-utilities/varlock, filled bysetup()when thevarlockloader runs. (#263)
Updates
- Automatic loader selection — With no loader requested,
setup()picksvarlockwhenvarlockis installed and your project has asrc/.env.schema, a.env.schema, or avarlock.loadPathinpackage.json. Otherwise it usesdotenvwhendotenvanddotenv-expandare installed, and thenodeloader when they aren’t. An explicitpath, theloaderoption, andDOTENV_LOADERstill take precedence. #262 #265 - Optional
dotenv—dotenvanddotenv-expandare now optional peer dependencies. Requestingloader: 'dotenv'without them throws anErrornaming the missing package. #265 - varlock loader via the CLI — The experimental
varlockloader now runsvarlock load --format json-fullinstead ofvarlock/auto-load.parsedholds exactly the resolved keys,pathandenvmap to--pathand--env, and an invalid schema throws anErrorwith varlock’s summary instead of exiting the process. #261 - Stricter
EnvString—EnvStringnow rejects optional number and boolean keys, as it already did for required ones. UseArrayStringkeys withenvParseArray, not plainstring. #260 - Own option types —
EnvLoaderOptionsno longer extends dotenv’sDotenvConfigOptions, andEnvSetupResultis now the package’s ownEnvLoaderOutput. #265 - Dependencies — Updated third-party dependencies.
Migration
- Projects with a
.env.schema— Ifvarlockis installed and your project has a.env.schemabut you loaded.env*files through dotenv,setup()now loads them through varlock. varlock uses the schema and its own.env*discovery, notsrc/.env*withNODE_ENVsuffixes, so values can differ. Setloader: 'dotenv'(orDOTENV_LOADER=dotenv) to keep the previous behaviour. - Explicit
dotenvloader — If you setloader: 'dotenv'orDOTENV_LOADER=dotenv, installdotenvanddotenv-expandas dependencies of your project. EnvLoaderOptions— RemoveprocessEnv,quiet,override,fast, andDOTENV_KEYfrom your loader options. They were never forwarded and are no longer part of the type.
2.2.1
Bug fixes
- Cross-file variable references —
loadEnvFiles()used to expand every file right after loading it, so a specific file (e.g..env.local) referencing a variable defined only in a more generic one (e.g..env) silently resolved to an empty string. All files are now parsed first and expanded once, so references resolve regardless of load order. Precedence (specific over generic,src/.env*over root, existingprocess.envvalues kept) and theprefixfilter (applied after expansion) are unchanged. (#226) - Circular references — Because a variable is now resolved from the merged result and no longer from the file that defined it, a specific file whose value expands to an empty string (e.g.
K=${MISSING}) now ends up as''inprocess.envinstead of falling back to the value from a more generic file. Variables that are part of a circular reference spanning several variables now resolve to an empty string instead of hanging the process, including cycle shapes that previously terminated with a non-empty value (e.g.A=${B}/B=${A:-fallback}, orA=${B:+alt}/B=${A}). (#226)
Updates
- Dependencies — Updated all non-major dependencies. (#227)
2.2.0 (2026-09-24)
New features
- varlock support (experimental) — Load environment files with varlock instead of
dotenv. Opt in withloader: 'varlock'or theDOTENV_LOADERenvironment variable. (#198)
2.1.1
Updates
- Dependencies — Updated all non-major dependencies. (#178)
2.1.0
New features
- Convention-first workflow — Compatibility version 4 is now the default,
stars devforces development mode,src/localesis copied and watched automatically, and environment files are discovered under bothsrc/and the project root. The interactive dev UI now supportstto open or close a public quick tunnel without configuringdev.tunnel. (#182)
Bug fixes
- Logger fallback — Fixed a broken build caused by an incomplete removal of
@wolfstar/logger.setup()now usescontainer.loggerfrom@sapphire/pieceswhen available (populated by@wolfstar/http-framework), falling back toconsole.debugfor standalone consumers, instead of the deprecated@wolfstar/loggerpackage. (#182)
2.0.8
Updates
- Type checker — Replaced
tscwithgolaras the type checker and bumped TypeScript to7.0.2.typecheckscripts now rungolar tscinstead oftscdirectly. This is a dev-tooling-only change with no effect on published output. (#151)
2.0.7
Updates
- Dependencies — Updated all non-major dependencies. (#126)
2.0.6
Updates
- Dependencies — Updated all non-major dependencies. (#102)
2.0.5
Updates
- Provenance attestation — Restored npm provenance attestation on publish for all packages. (#107)
2.0.4
Updates
- Build tooling — Upgraded
tsdownto0.22.14and migrateddeps.skipNodeModulesBundletodeps.neverBundle. (#93)
2.0.3
Updates
- Provenance attestation — Added provenance attestation to
publishConfigfor all packages. (#59)