@arki/env
For @arki/[email protected] · source CHANGELOG.md
0.1.0
Minor Changes
-
1e15576:
defineEnv()server,clientandsharedtake records of any Standard Schema (Zod, Valibot, ArkType, hand-written), not onlyZodType; values are typed as each schema's output.@arki/env/dot:EnvDotOptions,EnvServicesandenv()takeRecord<string, StandardSchemaV1>instead ofRecord<string, ZodType>. -
75d6fb9: Validation now runs in production by default.
defineEnvused to skip validation wheneverNODE_ENV !== 'development', so an app without an explicitskipValidationbooted production on an unchecked config. The default now skips only whenCIis set (Docker build stages) or duringlintruns, the same rule most apps already passed by hand. Apps that setoptions.skipValidationare unaffected.New
secret(schema),reveal(value)andRedacted(from@arki/env/core): a secret variable becomes aRedactedvalue that prints as[redacted]in logs, JSON, template strings andutil.inspect, and is read with a deliberatereveal(env.KEY).revealalso accepts the raw string, for runs where validation is skipped. -
cc7facf: Breaking:
defineEnvnow validates in every environment.CIandlintruns no longer skip validation. The only implicit opt-out isSKIP_ENV_VALIDATION=1(exactly1); set it only in build stages that run without secrets.options.skipValidationstill overrides it. The@arki/env/dotplugin now validates at boot and fails withARKI_ENV_PLUGIN_E001(newENV_PLUGIN_ERROR_CODES), andEnvServices['env']is derived fromdefineEnvwithout a cast. -
a67cd66:
secret()takes any Standard Schema (zod, valibot, arktype, hand-written) and returns a Standard Schema, not a zod schema..optional()is still there: it accepts a missing variable and leavesundefinedunwrapped. The result no longer has zod methods such as.parse; usesecret(schema)['~standard'].validate(value).A rejected secret's issues keep their path but get a fixed message, because some validators (valibot) repeat the received value in theirs and
defineEnvlogs issues.
Patch Changes
-
064e096: Make failure the acyclic validation foundation. Schema parsing now returns exact typed validation failures, and failure revival returns typed protocol/validator defects instead of throwing. Add validated versioned JSON envelopes; retain legacy envelope reads while rejecting non-JSON data and changing output transforms. oRPC error maps validate output-only wire data.
Migrate consumers to check failures, propagate them through Journal event/write/replay and queue/mail operations, and use explicit exception bridges at foreign callbacks. Journal rejects invalid event entries before inserting them. See
@arki/failure/docs/upgrade-typed-validation.mdfor breaking API and stored-data migration details. -
652eb4b:
env(),resilience(),auth(),journal(),journalProjections(),queue(),durableScheduler()andoutboxPlugin()keep their plugin name in the type, so their handles carryprovider: 'env' | 'resilience' | …instead ofstringand the feature builder's handle-identity checks apply around them. The three queue plugins gain an overload: with nonameoption the type carries the default name ('queue','durable-scheduler','outbox'); withname: 'jobs'it carries'jobs'. -
cbefc52: Dot plugins no longer pass a hard-coded
version(the field was removed from@arki/dot). -
5bc6390:
env()publishes through aprovidesfactory, soenvPlugin.provides.envis a typed handle before boot (@arki/dotplugin handles). -
fd18765:
defineEnvreadsglobalThis.process?.envinstead of the bareprocessglobal, so it no longer throws a ReferenceError on engines withoutprocess(React Native Hermes, browsers). It still reads nothing at import. PassruntimeEnvon those engines. Added the library lint preset and a cross-runtime smoke test. -
fe5a391: README follows the docs standard (install, quick start, limits, failure behaviour), with
llms.txt, an agent guide,AGENTS.md,test:docsand the 0.0.11 to 0.1.0 upgrade guide.ARKI_ENV_PLUGIN_E001gains@fixand@verifytags.no demo impact: documentation and doc-example changes only, runtime behaviour unchanged
-
Updated dependencies [dcf2cef]
-
Updated dependencies [afecc7a]
-
Updated dependencies [5bc6390]
-
Updated dependencies [899d0a9]
-
Updated dependencies [ce8d707]
-
Updated dependencies [92b38ed]
-
Updated dependencies [9a4babb]
-
Updated dependencies [80a4aa5]
-
Updated dependencies [232d3e8]
-
Updated dependencies [69d054f]
-
Updated dependencies [cbefc52]
-
Updated dependencies [7b19289]
-
Updated dependencies [923124f]
-
Updated dependencies [5721742]
-
Updated dependencies [01400a0]
-
Updated dependencies [0ab11d8]
-
Updated dependencies [a531063]
-
Updated dependencies [9b35520]
-
Updated dependencies [5721742]
-
Updated dependencies [232d3e8]
-
Updated dependencies [9192d0e]
-
Updated dependencies [3230f02]
-
Updated dependencies [232d3e8]
-
Updated dependencies [232d3e8]
-
Updated dependencies [932c9e4]
-
Updated dependencies [232d3e8]
-
Updated dependencies [cc656e3]
-
Updated dependencies [ff8e384]
-
Updated dependencies [ce8d707]
-
Updated dependencies [847f025]
-
Updated dependencies [232d3e8]
-
Updated dependencies [d9864f3]
-
Updated dependencies [742f4c3]
-
Updated dependencies [115aa87]
-
Updated dependencies [6e4d7da]
-
Updated dependencies [8b3cc80]
- @arki/[email protected]
0.0.11
Patch Changes
- @arki/[email protected]
0.0.10
Patch Changes
- Updated dependencies [228b4f5]
- Updated dependencies [9fa13ce]
- @arki/[email protected]
0.0.9
Patch Changes
- 91efd52: Reading a value from a
defineEnv()env is faster once the env is in regular use. After 64 reads, an env whose values are private to it (validated on the server, or skipped with the runtime envdefineEnvbuilt itself) copies its values into the lazy object and reads them directly, instead of going through two proxies on every read. Writes and deletes through the env update the copy too. An env over your ownruntimeEnvwith validation skipped still reads it live. - Updated dependencies [0685dfa]
- Updated dependencies
- Updated dependencies [2854df5]
- @arki/[email protected]
0.0.8
Patch Changes
- Dependency refresh:
@t3-oss/env-core^0.13.11,zod4.6.5. No API changes.
0.0.7
Patch Changes
-
Lazy primitives family + client-surface hardening.
@arki/ts: newonce()(zero-arg memo; memoizesundefined, sync throws retry, promises shared), hardenedlazyObject()(set/deleteProperty/getPrototypeOftraps — writes land on the real instance,instanceofanswers truthfully), newLazy<T>/resolveLazydeferred-config vocabulary, and a./testingentry withexpectImportPure()(subprocess import-purity harness).@arki/env:defineEnvnow delegates its lazy proxy tolazyObject(single trap implementation).@arki/kv:kv()accepts a whole-options thunk —kv(() => ({ url: env.REDIS_URL }))— keeping declarations import-pure; per-fieldurlthunk kept for compatibility.@arki/http:portadoptsLazy<number>; documented whybundles/featurestokens cannot defer (declaration-time wiring).@arki/contracts:browserexports condition serves a zod-only build (nodrizzle-orm) to client bundlers; table wrappers are node-only and fail loudly at bundle time from browser code.@arki/db/@arki/event-sourcing: republished to align the@arki/dotpeer range with 0.4.0.
-
Updated dependencies
-
Updated dependencies
- @arki/[email protected]
- @arki/[email protected]
0.0.6
Patch Changes
- Updated dependencies [4b1c59f]
- @arki/[email protected]
0.0.5
Patch Changes
- Updated dependencies [48a8733]
- @arki/[email protected]
0.0.4
Patch Changes
- Updated dependencies [9871fce]
- @arki/[email protected]
0.0.3
Patch Changes
- Ship TypeScript source in the npm tarball (
src/**added tofiles). npm installs and the read-only GitHub mirrors now carry the original.tssource alongside compileddist/— better debuggability on the experimental track. No runtime changes. - Updated dependencies
- @arki/[email protected]
0.0.2
Patch Changes
-
DOT v2 pip contract — typed dependency injection (BREAKING on the experimental track).
pip()replacesdefineDotPip: pips declare consumed services asneedsshapes of type witnesses (service<T>()app-local,token<T>()('key')cross-package) and hooks destructure them fully typed; provides are inferred fromboot's return value..use()is compile-time guarded (unsatisfied needs, type mismatches, wire-key collisions fail at the call site). Declaration order is boot order — the topological sort and name-baseddependenciesare gone; manifest dependency edges are observed from actual wiring.rename(pip, map, name?)is the multi-instance primitive, replacing the adapters' silent last-writer-winsnameoptions.lazy(init, { dispose? })defers expensive opens behind a memoized single-flightLazy<T>handle the kernel auto-disposes;service.lazy<T>()lifts eager or lazy providers into a uniform handle. The four/dotadapters (@arki/env,@arki/kv,@arki/db,@arki/event-sourcing) are migrated to the new contract. -
Updated dependencies
- @arki/[email protected]
0.0.1
Initial release
-
First public publication on npm (experimental track) — 2026-05-21.
Part of Wave 1, the ARKI foundation: zero-dependency utilities and runtime primitives shipped together because every downstream wave (DOT kernel, infrastructure adapters) consumes them. Wave 1 packages:
assert,clock,contracts,date,env,log,resilience,slugify,string,ts.Why 0.0.x, not 1.0.0: ARKI is on an experimental track. The 0.0.x prefix is an honest signal — APIs may change without semver discipline until the kernel is field-tested. The release scorecard (metadata, privacy, dependencies, build-output, packlist, docs, fixtures, DOT gates, agent-native gates) is satisfied at this version; the gate certifies the artifact, not API stability. Stability is earned through reuse, not declared at first publication.
Wave 2 (
@arki/dot) and Wave 3 (@arki/db,@arki/kv,@arki/event-sourcing) publish in subsequent releases once their inter-package transitive resolution against the public npm registry is verified.