Releases: yamcodes/arkenv
[email protected]
Patch Changes
-
Fix inline schema autocompletion
#7978f1b0dd@yamcodesFixed a regression where editor autocompletion for ArkType DSL strings (e.g.
"string","number.port") stopped working when usingarkenv()with an inline schema object. ThecreateEnvoverloads are now narrowed byvalidatorconfig type, making them mutually exclusive and order-independent.
@arkenv/[email protected]
Patch Changes
@arkenv/[email protected]
Patch Changes
[email protected]
Patch Changes
-
Fix CommonJS bundling compatibility
#7561901321@yamcodesFixed a crash when ArkEnv is bundled into a CommonJS format using tools like esbuild. This improves compatibility with environments like AWS Lambda and ensures correct interoperability when ArkEnv is used as an external dependency in CommonJS bundles.
-
Improve internal error handling types
#7561901321@yamcodesRefined internal error handling logic with better TypeScript typesafety and guards.
[email protected]
@arkenv/[email protected]
Patch Changes
@arkenv/[email protected]
Patch Changes
-
Support configuration
bb832b1@yamcodesAdd support for an optional configuration object as the second argument. This allows you to set the
validatormode to"standard", enabling support for libraries like Zod or Valibot without an ArkType dependency.import { z } from "zod"; import arkenvVitePlugin from "@arkenv/vite-plugin"; arkenvVitePlugin( { VITE_API_URL: z.string().url(), }, { validator: "standard", } );
@arkenv/[email protected]
Patch Changes
@arkenv/[email protected]
Patch Changes
-
Support configuration
#76306de0ef@yamcodesAdd support for an optional configuration object as the second argument. This allows you to set the
validatormode to"standard", enabling support for libraries like Zod or Valibot without an ArkType dependency.import { z } from "zod"; import arkenv from "@arkenv/bun-plugin"; arkenv( { BUN_PUBLIC_API_URL: z.string().url(), }, { validator: "standard", } );
[email protected]
Minor Changes
-
ArkType is now an optional peer dependency
#7236bd0741@yamcodesTo achieve a true zero-dependency core, ArkType is now an optional peer dependency.
- Breaking Change: The
typeexport has been moved from the mainarkenventry point toarkenv/arktype.
// ❌ Before import { type } from "arkenv"; // ✅ After import { type } from "arkenv/arktype";
-
Explicit Validator Modes: ArkEnv now supports an explicit
validatoroption.validator: "arktype"(default): Uses ArkType for validation and coercion. Requiresarktypeto be installed.validator: "standard": Uses Standard Schema validators directly (e.g., Zod, Valibot). Works without ArkType.
Existing usage of
arkenv()remains unchanged when ArkType is installed. Projects using ArkType features must now explicitly installarktypeand import ArkType-land helpers fromarkenv/arktype. - Breaking Change: The
Patch Changes
-
Remove internal
@repo/keywordspackage#726926ef9b@yamcodesThe internal
@repo/keywordspackage, which was compiled into thearkenvpackage, has been removed. The keywords are now either defined directly in thearkenvpackage or changed to pure functions.This change was made to simplify the package structure for the validator mode.