Skip to content

feat: improve npm keywords across published packages#1383

Merged
yamcodes merged 1 commit into
devfrom
1380-improve-npm-keywords-across-published-packages-for-discoverability
Jul 17, 2026
Merged

feat: improve npm keywords across published packages#1383
yamcodes merged 1 commit into
devfrom
1380-improve-npm-keywords-across-published-packages-for-discoverability

Conversation

@yamcodes

Copy link
Copy Markdown
Owner

Fixes #1380

Clean up and extend the keywords field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for.

Changes

  • arkenv: remove the misleading pnpm keyword; add env, environment-variables, dotenv, config, standard-schema, and the supported validators zod and valibot.
  • @arkenv/vite-plugin: dedupe the repeated arkenv keyword; keep vite and vite-plugin.
  • @arkenv/bun-plugin, @arkenv/nextjs, @arkenv/nuxt: add the shared env baseline (env, environment-variables, dotenv, config, validation, typesafe, standard-schema) alongside integration-specific terms.
  • @arkenv/cli: add create, generator, env, environment-variables, config.
  • @arkenv/fumadocs-ui: add a keyword set (previously had none).

A patch changeset is included for all seven packages, since updated keywords only reach npm on a new publish.

Acceptance criteria

  • arkenv no longer has the pnpm keyword
  • No package has duplicate keywords
  • All env-related published packages include env and environment-variables
  • arkenv includes zod, valibot, and standard-schema
  • @arkenv/fumadocs-ui has a non-empty keyword set
  • No package exceeds ~12 keywords (max is 12)
  • pnpm run check passes (manypkg validates manifests)

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@yamcodes yamcodes added enhancement New feature or improvement marketing Related to marketing, press, advertising, and user acquisition labels Jul 17, 2026
@yamcodes yamcodes linked an issue Jul 17, 2026 that may be closed by this pull request
7 tasks
@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6c3db36

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
arkenv Patch
@arkenv/vite-plugin Patch
@arkenv/bun-plugin Patch
@arkenv/nextjs Patch
@arkenv/nuxt Patch
@arkenv/cli Patch
@arkenv/fumadocs-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

arkenv

npm i https://pkg.pr.new/arkenv@1383

@arkenv/build

npm i https://pkg.pr.new/@arkenv/build@1383

@arkenv/bun-plugin

npm i https://pkg.pr.new/@arkenv/bun-plugin@1383

@arkenv/cli

npm i https://pkg.pr.new/@arkenv/cli@1383

@arkenv/fumadocs-ui

npm i https://pkg.pr.new/@arkenv/fumadocs-ui@1383

@arkenv/nextjs

npm i https://pkg.pr.new/@arkenv/nextjs@1383

@arkenv/nuxt

npm i https://pkg.pr.new/@arkenv/nuxt@1383

@arkenv/vite-plugin

npm i https://pkg.pr.new/@arkenv/vite-plugin@1383

commit: 6c3db36

@github-actions github-actions Bot added docs Adds or changes documentation, or acts as documentation in and of itself arkenv Changes to the `arkenv` npm package. @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv @arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv @arkenv/fumadocs-ui Issues or Pull Requests involving the ArkEnv Fumadocs UI theme @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI @arkenv/nextjs Issues or Pull Requests involving the Next.js integration for ArkEnv @arkenv/nuxt Issues or Pull Requests involving the Nuxt integration for ArkEnv labels Jul 17, 2026
@arkenv-bot

arkenv-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Limit Diff Status
@arkenv/vite-plugin 1.98 kB 2.93 kB 0.0%
arkenv 2.02 kB 2.15 kB 0.0%
arkenv/standard 2.19 kB 2.25 kB 0.0%
arkenv/core 441 B 500 B 0.0%
@arkenv/bun-plugin 2.48 kB 2.54 kB 0.0%
@arkenv/nextjs 1.32 kB 2.93 kB 0.0%
@arkenv/nextjs/shared 1.15 kB 1.46 kB 0.0%
@arkenv/nextjs/server 1.21 kB 1.95 kB 0.0%
@arkenv/nextjs/client 1.21 kB 1.95 kB 0.0%
@arkenv/nextjs/config 3.46 kB 3.91 kB 0.0%

All size limits passed!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — this PR updates the keywords arrays in all published package manifests and adds a patch changeset so the keywords reach npm on the next publish.

  • arkenv: removes the misleading pnpm keyword and adds env, environment-variables, dotenv, config, standard-schema, zod, and valibot.
  • @arkenv/vite-plugin: deduplicates the repeated arkenv keyword and refreshes the env-related baseline alongside vite/plugin/vite-plugin.
  • @arkenv/bun-plugin, @arkenv/nextjs, @arkenv/nuxt: add the shared env baseline plus framework-specific keywords.
  • @arkenv/cli: adds create, generator, env, environment-variables, and config.
  • @arkenv/fumadocs-ui: adds its first keyword set.
  • .changeset/improve-npm-keywords.md: patch changeset covering all seven packages.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@arkenv-bot

arkenv-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Review Updated (Asia/Almaty)
arkenv Ready Ready Preview, Comment Jul 18 2026, 1:00 AM (Asia/Almaty)

@yamcodes
yamcodes merged commit bf60ab2 into dev Jul 17, 2026
24 checks passed
@yamcodes
yamcodes deleted the 1380-improve-npm-keywords-across-published-packages-for-discoverability branch July 17, 2026 20:14
@arkenv-bot arkenv-bot Bot mentioned this pull request Jul 17, 2026
yamcodes added a commit that referenced this pull request Jul 17, 2026
Forward-ports the npm keyword cleanup from dev PR #1383 (issue #1380)
onto the `v1` branch, re-implemented at the v1 package layout.

## Summary

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for. Metadata-only change.

## Forward-port notes (v1 layout adaptation)

The v1 package layout differs from dev, so the change was re-mapped
rather than cherry-picked:

- **dev `arkenv` (core library) → v1 `@arkenv/core` +
`@arkenv/standard`.** In v1 the core was split. Both drop the misleading
`pnpm` keyword and gain the shared env baseline. Validator-specific
terms stay where they belong: `arktype` on `@arkenv/core`, `zod` +
`valibot` on `@arkenv/standard`.
- **dev `@arkenv/cli` → v1 `arkenv`.** In v1 the package named `arkenv`
is the CLI, so the CLI keyword additions (`create`, `generator`, `env`,
`environment-variables`, `config`) land there.
- **`@arkenv/vite-plugin`, `@arkenv/bun-plugin`, `@arkenv/nextjs`,
`@arkenv/nuxt`, `@arkenv/fumadocs-ui`** mirror dev exactly.

## Changes

- `@arkenv/core`: remove `pnpm`; add `env`, `environment-variables`,
`dotenv`, `config`, `standard-schema` (keeps `arktype`, `environment`,
`variables`, `typesafe`, `validation`).
- `@arkenv/standard`: remove `pnpm`; add `env`, `environment-variables`,
`dotenv`, `config` (keeps `standard-schema`, `zod`, `valibot`,
`typesafe`, `validation`).
- `@arkenv/vite-plugin`: dedupe the repeated `arkenv` keyword; add the
shared baseline.
- `@arkenv/bun-plugin`, `@arkenv/nextjs`, `@arkenv/nuxt`: add the shared
baseline (`env`, `environment-variables`, `dotenv`, `config`,
`validation`, `typesafe`, `standard-schema`) alongside
integration-specific terms.
- `arkenv` (CLI): add `create`, `generator`, `env`,
`environment-variables`, `config`.
- `@arkenv/fumadocs-ui`: add a keyword set (previously had none).

A `patch` changeset is included for all eight published packages, since
updated keywords only reach npm on a new publish.

## Acceptance criteria

- [x] No package retains the misleading `pnpm` keyword
- [x] No package has duplicate keywords
- [x] All env-related published packages include `env` and
`environment-variables`
- [x] `@arkenv/standard` includes `zod`, `valibot`, and
`standard-schema`; `@arkenv/core` includes `arktype` and
`standard-schema`
- [x] `@arkenv/fumadocs-ui` has a non-empty keyword set
- [x] No package exceeds 12 keywords

## Verification

JSON validity, duplicate-free keyword arrays, and the ≤12-keyword limit
were verified locally for all eight packages. `pnpm run check` (manypkg)
could not run in the sandbox (dependency install blocked); CI will run
it.

Ports #1383 · relates to #1380

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
@yamcodes yamcodes linked an issue Jul 17, 2026 that may be closed by this pull request
4 tasks
yamcodes pushed a commit that referenced this pull request Jul 17, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) 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 dev, this PR will
be updated.


# Releases
## @arkenv/cli@0.5.0

### Minor Changes

- #### Drop the `-e` short alias for `init --example`
_[`#1370`](#1370)
[`b86b999`](b86b999)
[@yamcodes](https://github.com/yamcodes)_

**BREAKING CHANGE**: The `-e` short alias is no longer recognized. Its
long form, `--example`, continues to work exactly as before.

Across the broader CLI ecosystem, `-e` almost universally means `--env`
/ `--environment`. For a type-safe environment variable library, mapping
`-e` to `--example` is a sharp trap: AI agents instinctively reach for
`arkenv init -e NODE_ENV=production`, which silently bound to
`--example` and consumed the next token as the example name. `-e` is now
permanently reserved so it stays free for a future `--env` /
`--environment` option. Passing `-e` — standalone or inside a bundle
like `-ye` — now fails fast with the standard `Unknown argument: -e`
error.

  Migration: replace the short alias with its long form.

  ```bash
  # Before
  npx @arkenv/cli@latest init -e with-vite-react

  # After
  npx @arkenv/cli@latest init --example with-vite-react
  ```

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.

- #### Add `with-valibot` to the bundled example registry and scaffold
defaults _[`#1382`](#1382)
[`4aa2e42`](4aa2e42)
[@yamcodes](https://github.com/yamcodes)_

Register the new standalone `with-valibot` example so it is offered
alongside `with-zod` when scaffolding, including in the offline fallback
registry used when the remote registry fetch fails.

  - Add a `with-valibot` entry to the bundled fallback example registry.
- Add `with-valibot` env defaults (`HOST`, `PORT`, `NODE_ENV`) to the
scaffold defaults map.
## arkenv@0.12.3

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.
## @arkenv/bun-plugin@0.1.11

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.

<details><summary>Updated 1 dependency</summary>

<small>


[`bf60ab2`](bf60ab2)

</small>

- `arkenv@0.12.3`

</details>
## @arkenv/fumadocs-ui@0.0.10

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.
## @arkenv/nextjs@0.1.4

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.

<details><summary>Updated 1 dependency</summary>

<small>


[`bf60ab2`](bf60ab2)

</small>

- `arkenv@0.12.3`

</details>
## @arkenv/nuxt@0.0.6

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.

- #### Type the `arkenv` key in `nuxt.config.ts` via `@nuxt/schema`
augmentation _[`#1371`](#1371)
[`7d541b4`](7d541b4)
[@yamcodes](https://github.com/yamcodes)_

Augment `@nuxt/schema`'s `NuxtConfig` and `NuxtOptions` so the `arkenv`
module options key is fully typed. Consumers now get autocomplete,
type-checking, and JSDoc hovers for `arkenv` options directly in
`nuxt.config.ts`, instead of falling back to a loose index signature.

`ModuleOptions` is now an alias of the documented `ArkEnvConfigOptions`,
so option hovers surface the existing JSDoc / `@default` tags from a
single source of truth.

  ```ts
  export default defineNuxtConfig({
    modules: ["@arkenv/nuxt/module"],
    arkenv: {
      schemaPath: "src/env.ts", // autocompleted & type-checked
      layout: "flat",
      validate: true,
    },
  });
  ```

<details><summary>Updated 1 dependency</summary>

<small>


[`bf60ab2`](bf60ab2)

</small>

- `arkenv@0.12.3`

</details>
## @arkenv/vite-plugin@0.1.5

### Patch Changes

- #### Improve npm keywords across published packages for
discoverability _[`#1383`](#1383)
[`bf60ab2`](bf60ab2)
[@yamcodes](https://github.com/yamcodes)_

Clean up and extend the `keywords` field of every published package so
npm search, aggregators, and LLM-powered package discovery surface
ArkEnv for the terms users actually search for.

- Remove the misleading `pnpm` keyword from `arkenv` and add `env`,
`environment-variables`, `dotenv`, `config`, `standard-schema`, and the
supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
- Give every env-related package a shared baseline (`env`,
`environment-variables`, `dotenv`, `config`, `validation`, `typesafe`,
`standard-schema`) alongside their integration-specific terms.
- Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.

<details><summary>Updated 1 dependency</summary>

<small>


[`bf60ab2`](bf60ab2)

</small>

- `arkenv@0.12.3`

</details>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
renovate Bot added a commit to gwennlbh/pleye that referenced this pull request Jul 24, 2026
##### [v0.12.3](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.12.3)

##### Patch Changes

- #### Improve npm keywords across published packages for discoverability *[`#1383`](yamcodes/arkenv#1383) [`bf60ab2`](yamcodes/arkenv@bf60ab2) [@yamcodes](https://github.com/yamcodes)*

  Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for.

  - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`.
  - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`.
  - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms.
  - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none.
##### [v0.12.2](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.12.2)

##### Patch Changes

- #### Expose `getSchemaKeys` helper *[`#1191`](yamcodes/arkenv#1191) [`a3e32db`](yamcodes/arkenv@a3e32db) [@yamcodes](https://github.com/yamcodes)*

  Expose `getSchemaKeys` helper and widen `RuntimeEnvironment` type to support typed framework runtime configurations.

- #### Handle pre-parsed primitives gracefully in coercion logic *[`#1206`](yamcodes/arkenv#1206) [`12ed4f3`](yamcodes/arkenv@12ed4f3) [@yamcodes](https://github.com/yamcodes)*

  Updated the core coercion logic to defensively skip values that are not strings. This ensures ArkEnv won't crash or behave unpredictably when passed configuration objects that have already been parsed into numbers, booleans, or complex objects by other systems (such as Nuxt's `runtimeConfig`).

- #### Fix coercion to prevent in-place mutation of environment config objects *[`#1206`](yamcodes/arkenv#1206) [`12ed4f3`](yamcodes/arkenv@12ed4f3) [@yamcodes](https://github.com/yamcodes)*

  Refactor `applyCoercion` to perform non-mutating updates on environment configuration data. Clone objects and arrays along the validation path instead of modifying them in-place, preventing runtime crashes on frozen configuration objects (e.g., framework runtime configurations) and avoiding side-effects on reusable config objects.

  Usage:

  ```ts
  import { createEnv } from "arkenv";

  const env = createEnv(
    { DATABASE: { port: "number" } },
    { env: { DATABASE: Object.freeze({ port: "3000" }) } } // Frozen object is now safely parsed without crashes!
  );
  ```
##### [v0.12.1](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.12.1)

##### Patch Changes

- #### Add `emptyAsUndefined` option to treat empty env values as missing *[`#1188`](yamcodes/arkenv#1188) [`3bfbcb7`](yamcodes/arkenv@3bfbcb7) [@yamcodes](https://github.com/yamcodes)*

  Add a new `emptyAsUndefined` configuration option to both `createEnv` (ArkType mode) and `arkenv/standard` (Standard Schema mode). When enabled, environment variables set to empty strings (e.g., `PORT=` in a `.env` file) are treated as if they were missing, allowing defaults to apply and preventing unnecessary validation errors for numeric, boolean, or array types.

  **Usage:**

  ```ts
  import arkenv from "arkenv";

  const env = arkenv(
    { PORT: "number = 3000", DEBUG: "boolean = false" },
    { emptyAsUndefined: true }
  );

  // Given PORT= and DEBUG= in the environment:
  // env.PORT  → 3000
  // env.DEBUG → false
  ```

  ```ts
  import arkenv from "arkenv/standard";
  import { z } from "zod";

  const env = arkenv(
    { PORT: z.coerce.number().default(3000) },
    { emptyAsUndefined: true }
  );
  ```

  - The default behavior remains unchanged (`emptyAsUndefined: false`).
  - Keys with empty values are removed from the input record before validation so that ArkType defaults and optional types work correctly.
##### [v0.12.0](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.12.0)

##### Minor Changes

- #### Add Standard JSON Schema coercion to `arkenv/standard` *[`#1154`](yamcodes/arkenv#1154) [`88b0eee`](yamcodes/arkenv@88b0eee) [@yamcodes](https://github.com/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:

  ```ts
  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.
##### [v0.11.1](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.11.1)

##### Patch Changes

- #### Add `Infer<T>` helper to resolve environment variable types *[`#1092`](yamcodes/arkenv#1092) [`c6c30ab`](yamcodes/arkenv@c6c30ab) [@yamcodes](https://github.com/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:

  ```ts
  import { createEnv, type Infer } from "arkenv";
  import { type } from "arktype";

  const schema = {
    PORT: type.number,
  };

  export type Env = Infer<typeof schema>;
  ```
##### [v0.11.0](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.11.0)

##### Minor Changes

- #### Remove `ArkEnvError` import from "arkenv" *[`#815`](yamcodes/arkenv#815) [`5e8025f`](yamcodes/arkenv@5e8025f) [@yamcodes](https://github.com/yamcodes)*

  The `ArkEnvError` class is now only available via:

  ```ts
  import { ArkEnvError } from "arkenv/core";
  ```
##### [v0.10.0](https://github.com/yamcodes/arkenv/releases/tag/arkenv%400.10.0)

##### Minor Changes

- #### `arkenv/standard` import *[`#806`](yamcodes/arkenv#806) [`f9010d0`](yamcodes/arkenv@f9010d0) [@yamcodes](https://github.com/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`:

```ts
// ❌ 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:

```ts
// ❌ Before
import { type } from "arkenv/arktype";

// ✅ After
import { type } from "arkenv"; // 'type' is the ArkEnv helper, not a TS type modifier
```
````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI @arkenv/fumadocs-ui Issues or Pull Requests involving the ArkEnv Fumadocs UI theme @arkenv/nextjs Issues or Pull Requests involving the Next.js integration for ArkEnv @arkenv/nuxt Issues or Pull Requests involving the Nuxt integration for ArkEnv @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv arkenv Changes to the `arkenv` npm package. docs Adds or changes documentation, or acts as documentation in and of itself enhancement New feature or improvement marketing Related to marketing, press, advertising, and user acquisition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve npm keywords across published packages for discoverability Improve npm keywords across published packages for discoverability

1 participant