-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
@arkenv/bun-pluginIssues or Pull Requests involving the Bun plugin for ArkEnvIssues or Pull Requests involving the Bun plugin for ArkEnv@arkenv/vite-pluginIssues or Pull Requests involving the Vite plugin for ArkEnvIssues or Pull Requests involving the Vite plugin for ArkEnvrefactorA change to the codebase that's neither a bug fix nor added functionalityA change to the codebase that's neither a bug fix nor added functionalityrfcA proposal open for discussion, inviting feedback before writing code. May or may not land as-isA proposal open for discussion, inviting feedback before writing code. May or may not land as-is
Description
Status
Proposed
Context
ArkEnv provides framework integrations via @arkenv/vite-plugin and @arkenv/bun-plugin.
Current internal packages and dependency boundaries make bundling, optional peer deps, and installation ergonomics harder than necessary.
Decision
Framework plugins are thin wrappers around arkenv.
arkenv (core)
├─ @arkenv/vite-plugin
└─ @arkenv/bun-pluginPlugins depend on arkenv and delegate all validation logic to it.
Installation model
Plugins provide single-install ergonomics:
pnpm add @arkenv/vite-pluginarkenvis a direct dependency of the plugin- Users do not need to install
arkenvmanually - Optional peer deps (for example
arktype) remain handled byarkenv
This matches ecosystem expectations (Vite, Bun).
Shared code and types
- Shared helpers and types live in
arkenv - No internal workspace packages (for example
@repo/types,@repo/scope) - Internal-only exports are allowed and marked with
@internal - Plugins import from
arkenv, never from private paths
ArkType isolation
- ArkType-specific logic remains inside
arkenv - Loaded lazily and only when
validator: "arktype"is used - Plugins are ArkType-agnostic
Consequences
Pros
- Clear dependency graph
- Simpler bundling and testing
- Idiomatic plugin usage
- Fewer moving parts before v1
Cons
- Some internal helpers are technically exported
- Requires discipline to keep internals undocumented
Metadata
Metadata
Assignees
Labels
@arkenv/bun-pluginIssues or Pull Requests involving the Bun plugin for ArkEnvIssues or Pull Requests involving the Bun plugin for ArkEnv@arkenv/vite-pluginIssues or Pull Requests involving the Vite plugin for ArkEnvIssues or Pull Requests involving the Vite plugin for ArkEnvrefactorA change to the codebase that's neither a bug fix nor added functionalityA change to the codebase that's neither a bug fix nor added functionalityrfcA proposal open for discussion, inviting feedback before writing code. May or may not land as-isA proposal open for discussion, inviting feedback before writing code. May or may not land as-is