- #577 (minor) - - Add caching system:
cache()resolver, plugin cache API, encrypted JSON store (file mode0600),varlock cacheCLI with TTY-aware browser and--yesconfirm forclear.- Cache TTLs use the shared duration format;
"forever"caches until manually cleared (the default forcache()), setting a plugin'scacheTtltofalse(or an empty string) disables caching, and a TTL of0is rejected as ambiguous. - Cached values are individually encrypted and bound to their cache key, so entries cannot be swapped or replayed within the cache file.
--clear-cachealways clears the persistent disk cache, including when combined with--skip-cache;@cache=diskwarns when used in CI or with the file-based encryption fallback.- Add random value generators backed by
node:crypto:randomNum()(integer by default, float whenprecisionis set),randomUuid(),randomHex()(string-length by default,bytes=truefor byte-length),randomString()(uses rejection sampling for unbiased output across any charset). - Add
durationdata type: accepts flexible string/number input ("1h","30m","500ms",2000,"2days") and coerces to a number in a configurable output unit (msdefault;seconds,minutes,hours,days,weeks). Only plain decimal number formats are accepted, and sub-millisecond durations are rejected. Same parser is used bycache(..., ttl=...)and the plugincacheTtloption. - When
_VARLOCK_CACHE_KEYis set (e.g. as a CI secret; same format as_VARLOCK_ENV_KEY, but a separate var since that one can be ephemeral),autocache mode uses a disk cache encrypted with that key instead of falling back to memory — enabling shared caching across CI processes without the key ever touching disk. Each key gets its own cache file, named by key fingerprint. @cachecan be set dynamically with functions (e.g.@cache=forEnv(dev, "disk")); invalid resolved values surface as schema errors.- Plaintext is passed to the native encryption binary via stdin instead of argv so it never appears in process listings (the macOS enclave binary gained
--data-stdinsupport); debug logging no longer includes encrypt/decrypt payloads. - Plugin opt-in caching via
cacheTtlis documented per plugin — see the plugin packages' own changelogs.
- Cache TTLs use the shared duration format;
- #768 (patch) - fix: only warn about file-based encryption fallback when encryption is actually used, not on every load
- #756 (patch) - Preserve process.env override provenance across nested invocations so
varlock run-injected resolved values are no longer treated as true overrides by innervarlockloads.
Only real upstream overrides now propagate through nesting, while inner command-local overrides still win as expected.
Also fixes smoke-test CLI resolution to use the workspace-local varlock CLI instead of any globally installed binary.
Note:__VARLOCK_ENVnow includes override provenance metadata (__varlockOverrideMeta). Tooling that strictly validates that blob shape should allow unknown/new fields. - #757 (patch) Thanks @yinjs! - fix: treat whitespace-only lines as blank lines instead of throwing a parse error
Published to
- ✅ npm