Skip to content

(v1) Stop re-exporting type / Infer from framework integrations #1437

Description

@yamcodes

Problem

Framework integrations re-export ArkType helpers that already live on @arkenv/core, which users must install anyway:

  • export { type } from "@arkenv/core" on @arkenv/nuxt, /client, /server
  • export type { Infer } from "@arkenv/core" on @arkenv/nuxt
  • Same type / Infer re-exports on @arkenv/nextjs, /client, /server, /react-server
  • Next.js codegen templates also emit export { type } from "@arkenv/nextjs" (or /client)

Docs already teach import { type } from "@arkenv/core" for internal shared schemas. The integration re-exports are redundant and blur the import mental model (strict layout: core for schema helpers, integration for arkenv entries).

Came out of review on #1422.

Desired behavior

  • Remove type and Infer re-exports from Nuxt and Next.js public entry points.
  • Update Next.js env.gen codegen templates to stop re-exporting type from the integration (consumers import from @arkenv/core when needed).
  • Keep intentional package APIs (arkenv default, ArkEnvScript, withArkEnv / config helpers, etc.).
  • Vite/Bun plugins already do not re-export type — leave them alone unless something similar appears.
  • Document / changeset as a breaking cleanup for v1 (alpha) consumers who import type / Infer from the integration packages.

Acceptance criteria

  • No type or Infer re-exports from @arkenv/nuxt or @arkenv/nextjs public entries
  • Next.js codegen no longer re-exports type from the integration
  • Docs, scaffolds, examples, and playgrounds already (or after update) import type from @arkenv/core only
  • Changeset marks the removal as breaking with a short migration note

Out of scope

  • Changing how @arkenv/core exports type / Infer
  • Relocating shared-schema file paths or other strict-layout wiring

Metadata

Metadata

Assignees

No one assigned

    Labels

    @arkenv/nextjsIssues or Pull Requests involving the Next.js integration for ArkEnv@arkenv/nuxtIssues or Pull Requests involving the Nuxt integration for ArkEnvneeds triageMaintainer needs to evaluate this issuerefactorA change to the codebase that's neither a bug fix nor added functionality

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions