Skip to content

Releases: yamcodes/arkenv

arkenv@0.12.0

06 Jun 05:15
5801de1

Choose a tag to compare

Minor Changes

  • Add Standard JSON Schema coercion to arkenv/standard #1154 88b0eee @yamcodes

    Introduce opt-out type coercion for standard mode (arkenv/standard). This coercion only works if the validator is a standard JSON Schema compliant validator (e.g., Zod, Valibot, or custom schemas that implement the StandardJSONSchemaV1 interface). This automatically enables coercion for environment variables without relying on ArkType's runtime footprint.

    If you need to disable coercion, explicitly pass { coerce: false } in your configuration:

    import arkenv from "arkenv/standard";
    import { z } from "zod";
    
    const env = arkenv({ PORT: z.number() }, { coerce: false });

    BREAKING CHANGE: Coercion is now enabled by default in arkenv/standard. This will automatically coerce environment variables to their expected types (e.g., strings containing numbers, booleans, or dates will be converted to their respective types) based on the JSON Schema of your validators. It's unlikely to affect you unless you were relying on validation failing for uncoerced string inputs, or have custom schemas that expect raw strings instead of coerced values.

@arkenv/vite-plugin@0.1.2

06 Jun 05:15
5801de1

Choose a tag to compare

Patch Changes

Updated 1 dependency

88b0eee

  • arkenv@0.12.0

@arkenv/nextjs@0.0.8

06 Jun 05:15
5801de1

Choose a tag to compare

Patch Changes

Updated 1 dependency

88b0eee

  • arkenv@0.12.0

@arkenv/bun-plugin@0.1.8

06 Jun 05:15
5801de1

Choose a tag to compare

Patch Changes

Updated 1 dependency

88b0eee

  • arkenv@0.12.0

@arkenv/cli@0.2.10

02 Jun 21:32
c83f6e2

Choose a tag to compare

Patch Changes

  • Check git working tree is clean before arkenv init #1151 4e6300c @yamcodes

    The CLI now verifies the git working tree is clean before modifying files in the existing-project flow. If the working tree is dirty and --force is not provided, the command aborts with a clear error message. Use --force to bypass this check.

    Non-git repositories and clean working trees proceed normally without any extra prompts.

  • Automatically wrap Next.js config with withArkEnv during arkenv init #1150 4a267e5 @yamcodes

    Running arkenv init in a Next.js project now auto-detects next.config.ts (or .js/.mts/.mjs) and wraps the default export with withArkEnv:

    // next.config.ts - before
    export default {
      experimental: {},
    };
    
    // next.config.ts - after
    import { withArkEnv } from "@arkenv/nextjs/config";
    export default withArkEnv({
      experimental: {},
    });
    • Add transformNextjsConfig AST transformer to wrap default exports with withArkEnv using magicast
    • Add findNextjsConfig and bootstrapNextjsConfig utilities for Next.js config discovery and mutation
    • Integrate Next.js config bootstrapping into the CLI executor during arkenv init
    • Fix next-steps suppression: show manual withArkEnv instructions even when the AI skill is detected if auto-bootstrapping failed

@arkenv/nextjs@0.0.7

01 Jun 21:08
e95c9f2

Choose a tag to compare

Patch Changes

  • Fix development watcher memory and file descriptor leak #1136 593509a @yamcodes

    Store the active chokidar watcher instance on globalThis.__arkenv_watcher__ and close it when configuring a new watcher instance.

  • Remove @deprecated JSDoc tag from createEnv and arkenv in the main and react-server entries #1139 fae4c1f @yamcodes

    Avoid warning users when they call createEnv manually without using the codegen workflow.

@arkenv/cli@0.2.9

01 Jun 21:08
e95c9f2

Choose a tag to compare

Patch Changes

  • Update Next.js scaffold templates to use default import arkenv #1140 befcefa @yamcodes

    Change the generated env.ts templates to import the default arkenv factory from the generated config helper instead of the named createEnv import, ensuring compatibility with the ArkType IDE extension.

  • Improve readability of recommended framework option in init wizard 2bd5cd4 @yamcodes

    Move the "(Recommended)" text from the framework selection hint to the option label to make the recommendation more prominent during initialization.

  • Restrict Next.js shared scaffold templates to NODE_ENV _#1135 2ab778e @yamcodes_

    Treat PORT as a server-only variable instead of a shared variable in scaffold templates and strict layout generators. This ensures that custom variables or variables like PORT are not placed in shared sections, avoiding potential client-side hydration mismatches in Next.js applications.

arkenv@0.11.1

31 May 09:21
ce6a96e

Choose a tag to compare

Patch Changes

  • Add Infer<T> helper to resolve environment variable types #1092 c6c30ab @yamcodes

    Introduce the Infer<T> type helper, allowing developers to extract the inferred output types of their environment schemas. It supports both declarative schema shapes and compiled schemas (like Zod or ArkType types).

    Usage:

    import { createEnv, type Infer } from "arkenv";
    import { type } from "arktype";
    
    const schema = {
      PORT: type.number,
    };
    
    export type Env = Infer<typeof schema>;

@arkenv/vite-plugin@0.1.1

31 May 09:21
ce6a96e

Choose a tag to compare

Patch Changes

Updated 1 dependency

c6c30ab

  • arkenv@0.11.1

@arkenv/nextjs@0.0.6

31 May 17:17
8639b5c

Choose a tag to compare

Patch Changes

  • Fix env.gen import path in strict layout and export default alias #1121 e75194e @yamcodes

    Correct the hardcoded import path to generated factory in Next.js 3-file strict mode client template. Also export createEnv as default export (aliased as arkenv) in the generated env.gen.ts file.