Conversation
…timizing standard error mapping
🦋 Changeset detectedLatest commit: 9ee78fe The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen 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 |
arkenv
@arkenv/build
@arkenv/bun-plugin
@arkenv/core
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/standard
@arkenv/vite-plugin
commit: |
Open
…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
Contributor
📦 Bundle Size Report
✅ All size limits passed! |
…s in CONTRIBUTING.md
Version Packages (alpha)
…ce for all integrations
…ents for Nuxt and Next.js documentation
…nal peer dependencies
6609c40 to
822659c
Compare
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>
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://arkenv-v1.vercel.app