Skip to content

Document Standard Schema validator support#505

Merged
yamcodes merged 7 commits into
mainfrom
copilot/document-standard-schema-validator
Dec 8, 2025
Merged

Document Standard Schema validator support#505
yamcodes merged 7 commits into
mainfrom
copilot/document-standard-schema-validator

Conversation

Copilot AI commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

ArkEnv has supported Standard Schema validators (Zod, Valibot, etc.) since v2.1.28, but this capability was not documented. Users can now mix validators from different libraries in a single schema.

Changes

READMEs

  • Added "Compatible with any Standard Schema validator" to features list

Documentation (/docs/standard-schema)

  • What Standard Schema is and why it matters (interoperability, zero runtime overhead)
  • Usage examples with Zod and Valibot
  • Practical use cases: complex transformations, incremental migration, team preferences
  • Error handling and TypeScript inference

Example (examples/with-standard-schema/)

  • Working project demonstrating ArkType + Zod integration
  • Shows mixing validators based on complexity needs

Navigation

  • Added page to docs menu under API section
  • Referenced from quickstart guide

Example Usage

import arkenv from 'arkenv';
import { z } from 'zod';

const env = arkenv({
  // ArkType for concise syntax
  HOST: "string.host",
  NODE_ENV: "'development' | 'production' | 'test'",
  
  // Zod for complex transformations
  DATABASE_URL: z.string().url(),
  ALLOWED_ORIGINS: z.string()
    .transform(str => str.split(','))
    .pipe(z.array(z.string().url())),
});

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../next/dist/bin/next build (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../next/dist/bin/next build git conf�� get --local node_modules/.pnpm/@esbuild+linux-x64@0.27.1/node_modules/@esbuild/linux-x64/bin/esbuild user.email (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../next/dist/bin/next build bash --no�� --noprofile (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Document support for any Standard Schema validator</issue_title>
<issue_description>Since #498 (arkenv@>=2.1.28) supports the usage of any Standard Schema validator, we should properly document that as an ArkEnv feature in the advertised features list, ideally along with examples/use cases/a dedicated section, and anything else that comes to mind for proper documentation here.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot

changeset-bot Bot commented Dec 8, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 06e6fab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai

coderabbitai Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel

vercel Bot commented Dec 8, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Dec 8, 2025 8:33pm

Copilot AI and others added 3 commits December 8, 2025 13:08
Co-authored-by: yamcodes <2014360+yamcodes@users.noreply.github.com>
Co-authored-by: yamcodes <2014360+yamcodes@users.noreply.github.com>
Co-authored-by: yamcodes <2014360+yamcodes@users.noreply.github.com>
Copilot AI changed the title [WIP] Document support for any Standard Schema validator Document Standard Schema validator support Dec 8, 2025
Copilot AI requested a review from yamcodes December 8, 2025 13:26
@yamcodes
yamcodes marked this pull request as ready for review December 8, 2025 20:20
@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. example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) www Improvements or additions to arkenv.js.org labels Dec 8, 2025
@pkg-pr-new

pkg-pr-new Bot commented Dec 8, 2025

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 06e6fab

@arkenv-bot

arkenv-bot Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Limit Diff Status
arkenv 725 B 2 kB 0.0%

All size limits passed!

…ferences, removing "How It Works" and "Error Handling" sections, and refining best practices.
@yamcodes
yamcodes merged commit 815afd2 into main Dec 8, 2025
19 checks passed
@yamcodes
yamcodes deleted the copilot/document-standard-schema-validator branch December 8, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arkenv Changes to the `arkenv` npm package. docs Adds or changes documentation, or acts as documentation in and of itself example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document support for any Standard Schema validator

2 participants