Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/www/content/docs/guides/use-with-nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Register `EnvProvider` in your module's `providers` array (and `exports` if used

Do not pass an ArkEnv schema shape into `@nestjs/config`'s `ConfigModule.forRoot({ validationSchema })`.

Starting in `@nestjs/config` 12, `validationSchema` supports Standard Schema validators, but `@nestjs/config` passes raw string environment variables directly to the schema without automatic type coercion. A non-coercing validator (like ArkType's `number.port` or Zod's `z.number()`) rejects `"3000"` with a type error instead of parsing it. In `@nestjs/config` 11 and earlier, `validationSchema` only accepts Joi schemas.
Starting in `@nestjs/config` 12, `validationSchema` supports Standard Schema validators, but `@nestjs/config` passes raw string environment variables directly to the schema without automatic type coercion. A non-coercing validator (like ArkType's `number.port` or Zod's `z.number()`) rejects `"3000"` with a type error instead of parsing it. In `@nestjs/config` 11 and earlier, `validationSchema` doesn't support Standard Schema validators.

Using ArkEnv directly in `src/env.ts` handles string coercion automatically and fails immediately before NestJS initializes.

Expand Down
4 changes: 2 additions & 2 deletions apps/www/content/docs/why-arkenv.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ already use. ArkEnv provides a typed `env` object from a TypeScript schema, plus

### DIY

Most teams can validate `process.env` with ArkType (or Zod, Valibot,
Typia) in a few lines:
Most teams can validate `process.env` with ArkType (or Zod or Valibot) in a
few lines:

```ts title="env.ts" twoslash
import { type } from "arktype";
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0029-canonical-root-for-classic-zod.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ADR 0025's 2026-08-24 amendment added `@arkenv/standard/valibot` and `@arkenv/st

- A `/zod` subpath would imply a Zod-specific adapter. The Standard Schema engine's value is validator-agnostic consumption of anything that implements the spec.
- ADR 0019 already removed redundant re-exports (`./shared`) that duplicated a capability without adding semantics. A `/zod` alias is the same class of surface bloat.
- Shipping `/zod` would invite `/yup`, `/typebox`, `/arktype`, and every later Standard Schema library, turning a zero-config root into a maintenance list.
- Shipping `/zod` would invite `/typebox`, `/arktype`, and every later Standard Schema library, turning a zero-config root into a maintenance list.
- `/valibot` and `/zod-mini` stay. They are not aliases: they bind a converter. Do not flatten Valibot onto the root import in docs or `arkenv init` to "prove" symmetry.

Discoverability is a documentation problem. The Zod guide, `@arkenv/standard` reference, Choosing an engine, and the `arkenv init` Zod dialect already import from the root.
Expand Down
Loading