Skip to content

Version Packages#811

Merged
yamcodes merged 1 commit intomainfrom
changeset-release/main
Feb 22, 2026
Merged

Version Packages#811
yamcodes merged 1 commit intomainfrom
changeset-release/main

Conversation

@arkenv-bot
Copy link
Contributor

@arkenv-bot arkenv-bot bot commented Feb 22, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

arkenv@0.10.0

Minor Changes

  • arkenv/standard import #806 f9010d0 @yamcodes

    arkenv now ships three separate entry points:

    • arkenv (main): ArkType-first. Includes createEnv (aliased to arkenv default import), type, and ArkEnvError. Importing from this entry requires you to have ArkType installed.
    • arkenv/standard: ArkType-free. A standalone createEnv (aliased to arkenv default import) for Standard Schema validators (Zod, Valibot, etc.), not requiring ArkType.
    • arkenv/core: Mode-agnostic primitives - ArkEnvError and ValidationIssue.

    Breaking changes

    1. validator: "standard" option removed; arkenv now statically requires ArkType.
    The validator config option has been removed - ArkType is now always required when importing from arkenv. For a zero-ArkType bundle, use arkenv/standard:

    // ❌ Before
    import arkenv from "arkenv";
    import { z } from "zod";
    
    const env = arkenv({ PORT: z.coerce.number() }, { validator: "standard" });
    
    // ✅ After
    import arkenv from "arkenv/standard";
    import { z } from "zod";
    
    const env = arkenv({ PORT: z.coerce.number() });

    2. type moved from arkenv/arktype to arkenv.
    The type helper is now exported from the main entry. The arkenv/arktype sub-path is no longer public:

    // ❌ Before
    import { type } from "arkenv/arktype";
    
    // ✅ After
    import { type } from "arkenv"; // 'type' is the ArkEnv helper, not a TS type modifier

@arkenv/bun-plugin@0.1.4

Patch Changes

Updated 1 dependency

f9010d0

  • arkenv@0.10.0

@arkenv/vite-plugin@0.0.31

Patch Changes

  • arkenv/standard import #806 f9010d0 @yamcodes

    arkenv now ships three separate entry points:

    • arkenv (main): ArkType-first. Includes createEnv (aliased to arkenv default import), type, and ArkEnvError. Importing from this entry requires you to have ArkType installed.
    • arkenv/standard: ArkType-free. A standalone createEnv (aliased to arkenv default import) for Standard Schema validators (Zod, Valibot, etc.), not requiring ArkType.
    • arkenv/core: Mode-agnostic primitives - ArkEnvError and ValidationIssue.

    Breaking changes

    1. validator: "standard" option removed; arkenv now statically requires ArkType.
    The validator config option has been removed - ArkType is now always required when importing from arkenv. For a zero-ArkType bundle, use arkenv/standard:

    // ❌ Before
    import arkenv from "arkenv";
    import { z } from "zod";
    
    const env = arkenv({ PORT: z.coerce.number() }, { validator: "standard" });
    
    // ✅ After
    import arkenv from "arkenv/standard";
    import { z } from "zod";
    
    const env = arkenv({ PORT: z.coerce.number() });

    2. type moved from arkenv/arktype to arkenv.
    The type helper is now exported from the main entry. The arkenv/arktype sub-path is no longer public:

    // ❌ Before
    import { type } from "arkenv/arktype";
    
    // ✅ After
    import { type } from "arkenv"; // 'type' is the ArkEnv helper, not a TS type modifier
Updated 1 dependency

f9010d0

  • arkenv@0.10.0

@github-actions github-actions bot added docs Improvements or additions to documentation arkenv Changes to the `arkenv` npm package. @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv labels Feb 22, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 22, 2026

Open in StackBlitz

npm i https://pkg.pr.new/arkenv@811
npm i https://pkg.pr.new/@arkenv/bun-plugin@811
npm i https://pkg.pr.new/@arkenv/fumadocs-ui@811
npm i https://pkg.pr.new/@arkenv/vite-plugin@811

commit: a581916

@arkenv-bot
Copy link
Contributor Author

arkenv-bot bot commented Feb 22, 2026

📦 Bundle Size Report

Package Size Limit Diff Status
@arkenv/vite-plugin 1.91 kB 2.93 kB +12.6%
arkenv 441 B 2.93 kB -71.7%
@arkenv/bun-plugin 2.39 kB 2.44 kB +10.2%

All size limits passed!

@arkenv-bot
Copy link
Contributor Author

arkenv-bot bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (Asia/Almaty)
arkenv Ready Ready Preview, Comment Feb 23 2026, 12:46 AM (Asia/Almaty)

@dosubot
Copy link

dosubot bot commented Feb 22, 2026

Related Documentation

3 document(s) may need updating based on files changed in this PR:

ArkEnv

Getting Started with ArkEnv
View Suggested Changes
@@ -30,7 +30,7 @@
 npm install arkenv valibot
 ```
 
-Note: You can omit the `arktype` package entirely when using Standard mode.
+Note: When using the `arkenv/standard` import, you can omit the `arktype` package entirely.
 
 ## TypeScript Configuration
 
@@ -47,6 +47,14 @@
 
 The `moduleResolution` setting can be omitted if `module` is set to `"Preserve"`, `"Node16"`, or `"NodeNext"`.
 
+## Import Paths
+
+ArkEnv provides three separate import paths for different use cases:
+
+- **`arkenv`** (main): ArkType-first approach. Exports `createEnv` (aliased as default export `arkenv`), `type` helper, and `ArkEnvError`. Use this when you want ArkType's TypeScript-like DSL syntax.
+- **`arkenv/standard`**: ArkType-free import. Exports only `createEnv` for Standard Schema validators (Zod, Valibot, etc.) without bundling ArkType.
+- **`arkenv/core`**: Mode-agnostic primitives. Exports `ArkEnvError` and `ValidationIssue` types.
+
 ## ArkType Mode (Default, Recommended)
 
 [ArkType mode is the recommended approach](https://arkenv.js.org/docs/arkenv/validator-mode) for new projects, offering the best developer experience with TypeScript-like syntax and automatic coercion.
@@ -57,7 +65,7 @@
 
 ```typescript
 import arkenv from 'arkenv';
-import { type } from 'arkenv/arktype';
+import { type } from 'arkenv';
 
 export const env = arkenv({
   // Optional variables with defaults
@@ -138,18 +146,38 @@
 ### 1. Define Your Schema with Standard Mode
 
 ```typescript
+import { createEnv } from 'arkenv/standard';
+import { z } from 'zod';
+
+export const env = createEnv({
+  PORT: z.coerce.number().int().min(0).max(65535),
+  DATABASE_URL: z.url(),
+  DEBUG: z.coerce.boolean().default(false),
+  LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
+});
+```
+
+> **Note:** The `arkenv/standard` import is the recommended way for Standard Schema users (Zod, Valibot, etc.) as it avoids bundling ArkType entirely.
+
+### Migrating from Previous Versions
+
+If you were using `{ validator: "standard" }` in v0.9.x, update to the new import:
+
+```typescript
+// ❌ Before (v0.9.x)
 import arkenv from 'arkenv';
 import { z } from 'zod';
 
-export const env = arkenv(
-  {
-    PORT: z.coerce.number().int().min(0).max(65535),
-    DATABASE_URL: z.url(),
-    DEBUG: z.coerce.boolean().default(false),
-    LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
-  },
-  { validator: "standard" }  // Enable standard mode
-);
+const env = arkenv(
+  { PORT: z.coerce.number() },
+  { validator: "standard" }
+);
+
+// ✅ After (v0.10.0+)
+import { createEnv } from 'arkenv/standard';
+import { z } from 'zod';
+
+const env = createEnv({ PORT: z.coerce.number() });
 ```
 
 ### 2. Create a `.env` File

✅ Accepted

README /arkenv/blob/main/packages/arkenv/README.md
View Suggested Changes
@@ -43,7 +43,7 @@
 });
 ```
 
-> ArkEnv defaults to [ArkType](https://arktype.io/) notation, the closest match to TypeScript syntax for editor-to-runtime typesafety. You can also use any [Standard Schema](https://standardschema.dev/schema) validator, including Zod, Valibot, and Typia.
+> ArkEnv provides two optimized entry points: `arkenv` for [ArkType](https://arktype.io/) notation (the closest match to TypeScript syntax for editor-to-runtime typesafety), and `arkenv/standard` for [Standard Schema](https://standardschema.dev/schema) validators like Zod, Valibot, and Typia.
 
 With ArkEnv, your environment variables are **guaranteed to match your schema**. If any variable is incorrect or missing, the app won't start and a clear error will be thrown:
 
@@ -71,6 +71,8 @@
 
 ## Installation
 
+### Using ArkType (recommended)
+
 <details open>
 <summary>npm</summary>
 
@@ -103,6 +105,46 @@
 
 ```sh
 bun add arkenv arktype
+```
+
+</details>
+
+### Using Standard Schema validators (Zod, Valibot, etc.)
+
+Install `arkenv` without ArkType and your validator of choice:
+
+<details>
+<summary>npm</summary>
+
+```sh
+npm install arkenv zod  # or valibot, typia, etc.
+```
+
+</details>
+
+<details>
+<summary>pnpm</summary>
+
+```sh
+pnpm add arkenv zod  # or valibot, typia, etc.
+```
+
+</details>
+
+<details>
+<summary>Yarn</summary>
+
+```sh
+yarn add arkenv zod  # or valibot, typia, etc.
+```
+
+</details>
+
+<details>
+<summary>Bun</summary>
+
+```sh
+bun add arkenv zod  # or valibot, typia, etc.
 ```
 
 </details>
@@ -130,6 +172,70 @@
 
 - [@arkenv/vite-plugin](https://arkenv.js.org/docs/vite-plugin)
 - [@arkenv/bun-plugin](https://arkenv.js.org/docs/bun-plugin)
+
+## Import Paths
+
+ArkEnv provides three entry points to optimize bundle size and DX:
+
+- **`arkenv`** (main): ArkType-first. Includes `createEnv`, `type`, and `ArkEnvError`. Use this for ArkType notation schemas. Requires ArkType as a peer dependency.
+  
+  ```ts
+  import arkenv, { type } from "arkenv";
+  
+  const env = arkenv({
+    PORT: "number.integer",
+  });
+  ```
+
+- **`arkenv/standard`**: ArkType-free. Standalone `createEnv` for Standard Schema validators (Zod, Valibot, etc.) with zero ArkType in the bundle.
+  
+  ```ts
+  import { createEnv } from "arkenv/standard";
+  import { z } from "zod";
+  
+  const env = createEnv({
+    PORT: z.coerce.number(),
+  });
+  ```
+
+- **`arkenv/core`**: Mode-agnostic primitives - `ArkEnvError` and `ValidationIssue`. Use this when you only need error types.
+  
+  ```ts
+  import { ArkEnvError } from "arkenv/core";
+  ```
+
+### Migrating from v0.9
+
+If you're upgrading from an older version:
+
+**For Standard Schema users** (Zod, Valibot, etc.), remove the `{ validator: "standard" }` option and import from `arkenv/standard`:
+
+```ts
+// ❌ Before (v0.9)
+import { createEnv } from "arkenv";
+import { z } from "zod";
+
+const env = createEnv(
+  { PORT: z.coerce.number() },
+  { validator: "standard" }
+);
+
+// ✅ After (v0.10+)
+import { createEnv } from "arkenv/standard";
+import { z } from "zod";
+
+const env = createEnv({ PORT: z.coerce.number() });
+```
+
+**For ArkType users**, the `type` helper has moved from `arkenv/arktype` to the main entry:
+
+```ts
+// ❌ Before (v0.9)
+import { type } from "arkenv/arktype";
+
+// ✅ After (v0.10+)
+import { type } from "arkenv";
+```
 
 ## Supporting ArkEnv
 

[Accept] [Decline]

README /arkenv/blob/main/packages/bun-plugin/README.md
View Suggested Changes
@@ -19,19 +19,26 @@
 - Automatic filtering of client-exposed variables (defaults to `BUN_PUBLIC_*`)
 
 > [!IMPORTANT]
-> This plugin requires `arktype` to be installed in your project.
+> When using ArkType, `arktype` must be installed as a dependency.
 >
-> You can still use Zod or Valibot schemas alongside ArkType's DSL, since ArkType natively supports Standard Schema.
->
-> See the [docs](https://arkenv.js.org/docs/arkenv/integrations/standard-schema) for details.
+> When using `arkenv/standard`, you need to install `arkenv` along with your preferred Standard Schema validator (Zod, Valibot, etc.). ArkType is not required and will not be included in your bundle.
 
 ## Installation
+
+You can use this plugin with either ArkType or Standard Schema validators (Zod, Valibot, etc.):
 
 <details open>
 <summary>pnpm</summary>
 
 ```sh
+# With ArkType
 pnpm add @arkenv/bun-plugin arktype
+
+# Or with Zod
+pnpm add @arkenv/bun-plugin arkenv zod
+
+# Or with Valibot
+pnpm add @arkenv/bun-plugin arkenv valibot
 ```
 </details>
 
@@ -39,7 +46,14 @@
 <summary>npm</summary>
 
 ```sh
+# With ArkType
 npm install @arkenv/bun-plugin arktype
+
+# Or with Zod
+npm install @arkenv/bun-plugin arkenv zod
+
+# Or with Valibot
+npm install @arkenv/bun-plugin arkenv valibot
 ```
 </details>
 
@@ -47,7 +61,14 @@
 <summary>Yarn</summary>
 
 ```sh
+# With ArkType
 yarn add @arkenv/bun-plugin arktype
+
+# Or with Zod
+yarn add @arkenv/bun-plugin arkenv zod
+
+# Or with Valibot
+yarn add @arkenv/bun-plugin arkenv valibot
 ```
 </details>
 
@@ -55,15 +76,25 @@
 <summary>Bun</summary>
 
 ```sh
+# With ArkType
 bun add @arkenv/bun-plugin arktype
-```
-</details>
+
+# Or with Zod
+bun add @arkenv/bun-plugin arkenv zod
+
+# Or with Valibot
+bun add @arkenv/bun-plugin arkenv valibot
+```
+</details>
+
+> [!NOTE]
+> When using `arkenv/standard` for Standard Schema validators (Zod, Valibot, etc.), ArkType is not included in the bundle, making it a lighter option.
 
 ## Usage
 
 ### Simple Setup (Auto-discover schema)
 
-Create your schema in `src/env.ts`:
+Create your schema in `src/env.ts` using ArkType:
 
 ```ts
 // src/env.ts
@@ -72,6 +103,19 @@
 export default type({
   BUN_PUBLIC_API_URL: 'string',
   BUN_PUBLIC_DEBUG: 'boolean',
+});
+```
+
+Or use Standard Schema validators (Zod, Valibot, etc.) with `arkenv/standard`:
+
+```ts
+// src/env.ts
+import { createEnv } from 'arkenv/standard';
+import { z } from 'zod';
+
+export default createEnv({
+  BUN_PUBLIC_API_URL: z.string(),
+  BUN_PUBLIC_DEBUG: z.coerce.boolean(),
 });
 ```
 
@@ -97,7 +141,7 @@
 
 ### Advanced Setup
 
-Pass your schema directly to the plugin:
+Pass your schema directly to the plugin using ArkType:
 
 ```ts
 // build.ts
@@ -116,6 +160,26 @@
 });
 ```
 
+Or with Standard Schema validators:
+
+```ts
+// build.ts
+import arkenv from '@arkenv/bun-plugin';
+import { createEnv } from 'arkenv/standard';
+import { z } from 'zod';
+
+await Bun.build({
+  entrypoints: ['./app.tsx'],
+  outdir: './dist',
+  plugins: [
+    arkenv(createEnv({
+      BUN_PUBLIC_API_URL: z.string(),
+      BUN_PUBLIC_DEBUG: z.coerce.boolean(),
+    })),
+  ],
+});
+```
+
 ### With Type Augmentation
 
 ```ts

[Accept] [Decline]

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

@arkenv-bot arkenv-bot bot force-pushed the changeset-release/main branch from 613a39c to dda28e8 Compare February 22, 2026 19:49
@arkenv-bot arkenv-bot bot force-pushed the changeset-release/main branch from dda28e8 to a581916 Compare February 22, 2026 19:57
@yamcodes yamcodes merged commit 65e3bbf into main Feb 22, 2026
17 checks passed
@yamcodes yamcodes deleted the changeset-release/main branch February 22, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv arkenv Changes to the `arkenv` npm package. docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant