Skip to content

v1#1165

Draft
yamcodes wants to merge 130 commits into
devfrom
v1
Draft

v1#1165
yamcodes wants to merge 130 commits into
devfrom
v1

Conversation

@yamcodes

@yamcodes yamcodes commented Jun 5, 2026

Copy link
Copy Markdown
Owner

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9ee78fe

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

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

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 Jun 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

arkenv

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

@arkenv/build

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

@arkenv/bun-plugin

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

@arkenv/core

npm i https://pkg.pr.new/@arkenv/core@1165

@arkenv/fumadocs-ui

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

@arkenv/nextjs

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

@arkenv/nuxt

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

@arkenv/standard

npm i https://pkg.pr.new/@arkenv/standard@1165

@arkenv/vite-plugin

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

commit: 9ee78fe

@yamcodes yamcodes mentioned this pull request Jun 6, 2026
yamcodes added 3 commits June 10, 2026 23:14
…pre-coercion model (#1193)

Fixes #1178

Unifies the coercion execution model between the default `arkenv` and
`arkenv/standard` entry points. Uses a pre-coercion flow that
shallow-copies the env object and applies coercion prior to validation
against the unmodified schema.

### Changes
- Replace ArkType's `.pipe()` coercion wrapper with pre-coercion flow
using `findCoercionPaths` + `applyCoercion` directly in
`packages/arkenv/src/arktype/index.ts`
- Delete the redundant wrapper file
`packages/arkenv/src/arktype/coercion/coerce.ts` and its re-export
- Update `coerce.test.ts` unit tests to use a local helper mapping the
pre-coercion flow
- Update coercion documentation, FAQ, Standard Schema docs, and ADR-0002
@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. www Improvements or additions to arkenv.js.org tests This issue or PR is about adding, removing or changing tests labels Jun 12, 2026
@arkenv-bot

arkenv-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Limit Diff Status
@arkenv/bun-plugin 916 B 3.13 kB -63.9%
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/vite-plugin 308 B 2.93 kB -84.8%
@arkenv/standard 3.46 kB 3.52 kB -
@arkenv/nextjs 1.21 kB 2.93 kB -8.3%
@arkenv/nextjs/shared 1.03 kB 1.46 kB -10.4%
@arkenv/nextjs/server 1.11 kB 1.95 kB -8.3%
@arkenv/nextjs/client 1.1 kB 1.95 kB -9.1%
@arkenv/nextjs/config 3.69 kB 3.91 kB +7.3%
@arkenv/core 2.6 kB 2.64 kB -

All size limits passed!

@arkenv-bot arkenv-bot Bot mentioned this pull request Jun 12, 2026
@yamcodes yamcodes force-pushed the dev branch 5 times, most recently from 6609c40 to 822659c Compare July 5, 2026 15:35
yamcodes and others added 10 commits July 6, 2026 02:43
Closes #737

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
Fixes #1290

This PR ports and reconciles the scaffolding fixes/features from #1281
and #1282 into the v1 branch (applied to the restructured
packages/arkenv/src/features/scaffold/ path).

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…ze warning/error prefixes (#1294)

## Summary

Introduces a dedicated `log.ts` utility module in `@arkenv/build` and
migrates all manually-prefixed log strings in the build-time and
framework integration packages to use it.

## Changes

### `@arkenv/build`
- **New:** `packages/build/src/log.ts` — defines `BUILD_PREFIX`,
`WATCHER_PREFIX`, `formatBuildError`, `logBuildWarning`,
`logBuildError`, `logWatcherError`
- Re-exports `./log` from `index.ts`
- Replaces raw string literal in `resolveLayout` and all `console.error`
calls in `watchSchema`/`closeWatcher`

### `@arkenv/nextjs`
- `config.ts`: uses `logBuildWarning`, `logBuildError`,
`formatBuildError` for deprecation warning, schema path error, codegen
error, and validation failure header
- `arkenv-internal.ts`: uses `logBuildWarning` for legacy nested-layout
deprecation

### `@arkenv/nuxt`
- `module.ts`: uses `formatBuildError` for the client-side server-only
import error

## Motivation

Follows up on #1157 — while that PR fixed casing inconsistencies, the
prefix strings were still scattered as manual literals across 5+ call
sites. This extracts them into a single, zero-dependency helper module
inside `@arkenv/build` (already a shared dep) so all integrations stay
consistent automatically.

## Verification

- 73 test files, **743 tests** — all passing ✅

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes #1298

Complete the v1 forward-port of Nuxt flat layout by aligning CLI
scaffolding, examples, and `@arkenv/build` layout resolution with the
existing runtime and module support already on v1.

## Changes

- **CLI**: Nuxt init wizard presents "Flat (Recommended)" and defaults
to `layout: "flat"` in `--yes` mode; scaffolds a flat `env.ts` instead
of nested server/client/shared
- **`@arkenv/build`**: `resolveLayout()` accepts `"flat"` as an alias
for the single-file layout mode
- **Examples & playground**: `with-nuxt` and Nuxt playground use flat
layout conventions
- **`@arkenv/nuxt` README**: Updated from "Simple layout" to "Flat
layout" terminology
- **Tests**: Added coverage for Nuxt flat template generation, Nuxt
`--yes` flat default, `normalizeLayout()`, and `resolveLayout("flat")`

## Test plan

- [x] `pnpm run typecheck`
- [x] `pnpm run test` (764 tests passing)
- [x] `pnpm run fix`


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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
…for strict layout (#1297)

Fixes #1296

Remove the `./shared` subpath export from `@arkenv/nextjs` and
`@arkenv/nuxt`. Strict-layout internal schema modules now import `type`
from core `arkenv`. `/client` and `/server` subpath exports are
unchanged.

## Changes

- Add ADR 0014 documenting the export-surface decision
- Delete `packages/nextjs/src/shared.ts` and
`packages/nuxt/src/shared.ts`
- Remove `./shared` from package exports and size-limit configs
- Update docs, examples, playgrounds, CLI scaffolding, and tests
- Add major changeset for v1 release

## Test plan

- [x] `pnpm run typecheck`
- [x] `pnpm run test` (758 tests passed)
- [x] `pnpm run fix`


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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
## Summary

Forward-ports two clean fixes from `dev` to `v1` using cherry-pick (not
a bulk merge):

- **OG text overflow fix** (#1303 / #1302) — cherry-picked `ba2111ab`
- **Vitest project name collision** — exclude legacy `packages/cli` stub
from root vitest projects

## Context

`dev` and `v1` are intentionally diverged (see CONTRIBUTING Use Case 4).
The recent reconciliation (#1292) only covered v0 feature parity (#1281,
#1282) — it did not eliminate the ~48 file conflicts that appear when
bulk-merging the branches. Those conflicts are expected due to
structural differences (`packages/cli` → `packages/arkenv`, removed
`/shared` exports, etc.).

This PR uses the documented **forward-porting** workflow instead.

## Test plan

- [x] `pnpm test run lib/og-text.test.ts app/api/og/route.test.tsx`
passes (7/7)
- [x] Root vitest starts without duplicate project name error

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes #1305

## Summary

- Replaces the root `README.md` on the `v1` branch — previously a
symlink to `packages/arkenv/README.md`, which GitHub renders as the
literal stub text `packages/arkenv/README.md` — with a full, inlined
marketing-style landing page based on `main`'s
`packages/arkenv/README.md`.

## v1-specific adaptations

- Alpha callout at the top linking to the v1 roadmap (#683)
- Install tabs (npm/pnpm/Yarn/Bun) use `arkenv` instead of `@arkenv/cli`
(e.g. `npx arkenv@latest init`)
- Docs, FAQ, and quickstart links point to the alpha preview at
`arkenv-v1.vercel.app` (all verified to resolve with HTTP 200)
- CI badge uses `branch=v1`, StackBlitz uses `tree/v1/...`, and GitHub
blob links use `blob/v1/...`
- Shared CDN assets (logo, demo GIF on `arkenv.js.org`) unchanged
- `packages/arkenv/README.md` is untouched (remains the CLI-focused npm
README)

## Validation

- `pnpm run typecheck` ✅
- `pnpm run test` ✅ (796 tests passed)
- `pnpm run fix` ✅ (no changes to the new README)

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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 v1, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`v1` is currently in **pre mode** so this branch has prereleases rather
than normal releases. If you want to exit prereleases, run `changeset
pre exit` on `v1`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @arkenv/nextjs@1.0.0-alpha.6

### Major Changes

- #### Remove framework `/shared` subpath exports
_[`#1297`](#1297)
[`68ed78e`](68ed78e)
[@yamcodes](https://github.com/yamcodes)_

Drop the `./shared` export from `@arkenv/nextjs` and `@arkenv/nuxt`.
Strict-layout internal schema modules should import `type` from
`@arkenv/core` instead. `/client` and `/server` subpath exports are
unchanged.

**BREAKING CHANGE:** Remove `@arkenv/nextjs/shared` and
`@arkenv/nuxt/shared` subpath exports.

  Migration:

  ```ts
  // Before
  import { type } from "@arkenv/nextjs/shared";

  // After
  import { type } from "@arkenv/core";
  ```

  Import mental model:

- **Flat layout:** `import arkenv from "@arkenv/nextjs"` (or
`@arkenv/nuxt`)
- **Strict layout:** `@arkenv/nextjs/client` and `@arkenv/nextjs/server`
(or Nuxt equivalents)
  - **Internal schema modules:** `import { type } from "@arkenv/core"`

### Patch Changes

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

<small>


[`90ac1e1`](90ac1e1)

</small>

- `@arkenv/build@0.0.2-alpha.0`

</details>
## @arkenv/nuxt@1.0.0-alpha.4

### Major Changes

- #### Remove framework `/shared` subpath exports
_[`#1297`](#1297)
[`68ed78e`](68ed78e)
[@yamcodes](https://github.com/yamcodes)_

Drop the `./shared` export from `@arkenv/nextjs` and `@arkenv/nuxt`.
Strict-layout internal schema modules should import `type` from
`@arkenv/core` instead. `/client` and `/server` subpath exports are
unchanged.

**BREAKING CHANGE:** Remove `@arkenv/nextjs/shared` and
`@arkenv/nuxt/shared` subpath exports.

  Migration:

  ```ts
  // Before
  import { type } from "@arkenv/nextjs/shared";

  // After
  import { type } from "@arkenv/core";
  ```

  Import mental model:

- **Flat layout:** `import arkenv from "@arkenv/nextjs"` (or
`@arkenv/nuxt`)
- **Strict layout:** `@arkenv/nextjs/client` and `@arkenv/nextjs/server`
(or Nuxt equivalents)
  - **Internal schema modules:** `import { type } from "@arkenv/core"`

### Minor Changes

- #### Align Nuxt flat layout across CLI, examples, and build resolution
_[`#1299`](#1299)
[`90ac1e1`](90ac1e1)
[@yamcodes](https://github.com/yamcodes)_

Forward-port flat layout support for Nuxt on v1 by aligning CLI
scaffolding, build-time validation, runtime proxy behavior, and
`@arkenv/build` layout resolution.

  Usage:

  ```ts
  // nuxt.config.ts
  export default defineNuxtConfig({
    modules: ["@arkenv/nuxt/module"],
    arkenv: { layout: "flat" },
  });
  ```

  ```ts
  // env.ts
  import arkenv from "@arkenv/nuxt";

  export const env = arkenv({
    DATABASE_URL: "string",
    NUXT_PUBLIC_API_URL: "string",
    NODE_ENV: "'development' | 'production' | 'test' = 'development'",
  });
  ```

- `arkenv` init wizard presents "Flat (Recommended)" for Nuxt and
scaffolds a flat `env.ts`
- `@arkenv/build` `resolveLayout()` accepts `"flat"` as an alias for the
single-file layout mode
  - Nuxt examples and playgrounds use flat layout conventions

### Patch Changes

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

<small>


[`90ac1e1`](90ac1e1)

</small>

- `@arkenv/build@0.0.2-alpha.0`

</details>
## arkenv@1.0.0-alpha.4

### Minor Changes

- #### Align Nuxt flat layout across CLI, examples, and build resolution
_[`#1299`](#1299)
[`90ac1e1`](90ac1e1)
[@yamcodes](https://github.com/yamcodes)_

Forward-port flat layout support for Nuxt on v1 by aligning CLI
scaffolding, build-time validation, runtime proxy behavior, and
`@arkenv/build` layout resolution.

  Usage:

  ```ts
  // nuxt.config.ts
  export default defineNuxtConfig({
    modules: ["@arkenv/nuxt/module"],
    arkenv: { layout: "flat" },
  });
  ```

  ```ts
  // env.ts
  import arkenv from "@arkenv/nuxt";

  export const env = arkenv({
    DATABASE_URL: "string",
    NUXT_PUBLIC_API_URL: "string",
    NODE_ENV: "'development' | 'production' | 'test' = 'development'",
  });
  ```

- `arkenv` init wizard presents "Flat (Recommended)" for Nuxt and
scaffolds a flat `env.ts`
- `@arkenv/build` `resolveLayout()` accepts `"flat"` as an alias for the
single-file layout mode
  - Nuxt examples and playgrounds use flat layout conventions

### Patch Changes

- #### Generate `.env` and `.env.example` files and configure pnpm
approved builds whitelisting during initialization
_[`#1292`](#1292)
[`3cdbac9`](3cdbac9)
[@yamcodes](https://github.com/yamcodes)_

- Generate default `.env` and `.env.example` files during initialization
if they do not exist to prevent Node/tsx `--env-file` boot crashes.
- Parse existing `.env` file and securely strip all values to generate
`.env.example` when `.env.example` is missing to avoid leaking user
credentials to source control.
- Automatically check and update `.gitignore` in existing projects to
ignore `.env` and `.env.local` files.
- Skip overwriting pre-existing files when their scaffolding action is
set to `"create"`.
- Configure pnpm build whitelisting for `esbuild` during project
scaffolding if `pnpm` is the detected package manager. This writes the
`onlyBuiltDependencies` field to `package.json` and creates or updates a
`pnpm-workspace.yaml` file with the `allowBuilds` configuration before
running the installation phase.
- Add a runtime guardrail to throw a friendly error when the CLI is
imported as a library to guide upgrading library users to
`@arkenv/core`.
## @arkenv/build@0.0.2-alpha.0

### Patch Changes

- #### Align Nuxt flat layout across CLI, examples, and build resolution
_[`#1299`](#1299)
[`90ac1e1`](90ac1e1)
[@yamcodes](https://github.com/yamcodes)_

Forward-port flat layout support for Nuxt on v1 by aligning CLI
scaffolding, build-time validation, runtime proxy behavior, and
`@arkenv/build` layout resolution.

  Usage:

  ```ts
  // nuxt.config.ts
  export default defineNuxtConfig({
    modules: ["@arkenv/nuxt/module"],
    arkenv: { layout: "flat" },
  });
  ```

  ```ts
  // env.ts
  import arkenv from "@arkenv/nuxt";

  export const env = arkenv({
    DATABASE_URL: "string",
    NUXT_PUBLIC_API_URL: "string",
    NODE_ENV: "'development' | 'production' | 'test' = 'development'",
  });
  ```

- `arkenv` init wizard presents "Flat (Recommended)" for Nuxt and
scaffolds a flat `env.ts`
- `@arkenv/build` `resolveLayout()` accepts `"flat"` as an alias for the
single-file layout mode
  - Nuxt examples and playgrounds use flat layout conventions

---------

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>
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 example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) playground Issues or Pull Requests concerning a playground. (Found in the `apps/playgrounds/` directory) tests This issue or PR is about adding, removing or changing tests www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant