Skip to content

fix: Narrow bundler plugin options to build-time fields - #2012

Merged
yamcodes merged 6 commits into
v1from
cursor/narrow-plugin-options-d8ec
Sep 25, 2026
Merged

yamcodes merged 6 commits into
v1from
cursor/narrow-plugin-options-d8ec

Conversation

@yamcodes

@yamcodes yamcodes commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Fixes #2009

Vite, Bun, and Rsbuild plugins now accept only schemaPath, clientPrefix, logger, and logLevel. The build validates the environment loaded for that compile. Variables already set on process.env win over env files.

Passing env, coerce, onUndeclaredKey, arrayFormat, emptyAsUndefined, debugSecrets, or toJsonSchema throws a plugin-options error that points those fields at arkenv() in env.ts. A schema map or two-argument call still uses the removed schema/define error. arkenv() itself is unchanged.

Each plugin reference has a tests and programmatic builds section. Set the variable on process.env, run the build, and restore the previous value in finally so the next compile in the same process sees the original environment.

References for the three plugins describe that split. Changesets mark the three plugins as major and @arkenv/build as patch.

Open in Web Open in Cursor 

Vite, Bun, and Rsbuild plugins accept schemaPath, clientPrefix, logging, and a build-time env override. Runtime validation options throw a plugin-options error instead of being ignored.

Fixes #2009

Co-authored-by: Yam Borodetsky <[email protected]>
@changeset-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cc54878

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

This PR includes changesets to release 6 packages
Name Type
@arkenv/build Patch
@arkenv/vite-plugin Major
@arkenv/bun-plugin Major
@arkenv/rsbuild-plugin Major
@arkenv/nextjs Patch
@arkenv/nuxt Patch

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

@yamcodes yamcodes added @arkenv/build Issues or Pull Requests involving @arkenv/build @arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv enhancement New feature or improvement www Improvements or additions to arkenv.js.org labels Sep 25, 2026 — with Cursor
@github-actions github-actions Bot added docs Adds or changes documentation, or acts as documentation in and of itself @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv www Improvements or additions to arkenv.js.org tests This issue or PR is about adding, removing or changing tests @arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv labels Sep 25, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@arkenv/agent-plugin

npm i https://pkg.pr.new/@arkenv/agent-plugin@2012

arkenv

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

@arkenv/build

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

@arkenv/bun-plugin

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

@arkenv/core

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

@arkenv/fumadocs-ui

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

@arkenv/nextjs

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

@arkenv/nuxt

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

@arkenv/rsbuild-plugin

npm i https://pkg.pr.new/@arkenv/rsbuild-plugin@2012

@arkenv/standard

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

@arkenv/tanstack-addon

npm i https://pkg.pr.new/@arkenv/tanstack-addon@2012

@arkenv/vite-plugin

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

commit: cc54878

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — two minor polish notes inline.

Reviewed changes

  • Shared guard narrowed (packages/build/src/transform-options.ts): TRANSFORM_OPTION_KEYS drops the six runtime fields, RUNTIME_ONLY_OPTION_KEYS and pluginOptionNotSupportedMessage are added, and assertTransformModeCall throws the dedicated error for single-argument runtime keys while keeping SCHEMA_DEFINE_REMOVED for schema maps and two-argument calls.
  • Plugin option types narrowed: Vite, Bun, and Rsbuild *PluginFactoryConfig become TransformOptions & ArkEnvLogOptions, with env added to TransformOptions as the build-time override.
  • References + changesets: the three plugin reference tables describe the split and point runtime options at arkenv(); one major changeset covers the three plugins and a patch changeset covers @arkenv/build.
  • Tests: the shared guard gets unit coverage, and each plugin gets an integration test asserting a plugin-level env value overrides the dotenv/process value in the transformed client module.

The runtime merge was already in place (pluginConfig.env is spread last over the loaded environment in every plugin), so the claim in the PR body holds and no merge logic changed. The guard runs before splitPluginConfig, so JS callers passing runtime keys fail at factory-call time.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/build/src/transform-options.ts Resolved
cursoragent and others added 2 commits September 25, 2026 17:59
Several runtime keys now read "are not plugin options". The plugin reference tables list env's default as (none).

Co-authored-by: Yam Borodetsky <[email protected]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the two commits landed after the prior pullfrog review (d08214e) — both polish fixes to the two minor notes raised there.

  • Pluralized the plugin-option error — pluginOptionNotSupportedMessage now emits are not plugin options for multiple keys and is not a plugin option for one, with a test asserting the plural form (packages/build/src/transform-options.ts).
  • Corrected the env default in the references — the three plugin reference tables now list env as (none) rather than "loaded environment", matching the logger/logLevel rows and the fact that omitting the option simply leaves the loaded environment in place (apps/www/content/docs/reference/{vite,bun,rsbuild}-plugin.mdx).
  • Extended guard tests — added coverage asserting the plural message and the accepted env override.

Both prior inline threads are addressed and resolved; no new concerns.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

cursoragent and others added 3 commits September 25, 2026 19:08
Bundler plugins no longer accept env. The build reads the loaded environment, and process.env already wins over env files.

Co-authored-by: Yam Borodetsky <[email protected]>
…tions-d8ec

# Conflicts:
#	apps/www/content/docs/reference/rsbuild-plugin.mdx
#	packages/bun-plugin/src/plugin.test.ts
#	packages/rsbuild-plugin/src/index.test.ts
#	packages/vite-plugin/src/index.test.ts

Co-authored-by: Yam Borodetsky <[email protected]>
Document setting and restoring process.env for tests and scripts that
call Vite, Bun, or Rsbuild in-process.

Co-authored-by: Yam Borodetsky <[email protected]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The delta drops the plugin-level env build-time override. That directly contradicts the linked issue's product call and acceptance criteria (#2009: "Keep env as a build-time override"; "Passing env still overrides values loaded for that build"), so the PR as written can no longer satisfy Fixes #2009. Please restore env as a build-time override, or get the issue's product call and criteria revised first.

Reviewed changes

This run re-reviewed the three commits landed after the prior pullfrog approval (a6ae0f0) plus the origin/v1 merge.

  • Dropped the plugin env override (ca1f7dd4) — env moved from TRANSFORM_OPTION_KEYS/TransformOptions into RUNTIME_ONLY_OPTION_KEYS, *PluginFactoryConfig lost ParseStandardConfig, and all three refreshTransformState implementations now read only the loaded environment (vite loadEnv, bun process.env, rsbuild envLoad.parsed + process.env).
  • Reference docs reworked — the env option row was removed from the Vite/Bun/Rsbuild tables, the runtime-options callout now lists env, and each page gained a "Tests and programmatic builds" section showing process.env assignment with a finally restore.
  • Changesets — updated to state env is rejected and the build reads the loaded environment (env added to the "including env" breaking-change copy).
  • Tests — guard tests assert env yields the plugin-options error; the previous per-plugin env-override integration tests were deleted.

The remaining narrowing (rejecting coerce/toJsonSchema/etc. with a dedicated message, keeping SCHEMA_DEFINE_REMOVED for schema maps and two-arg calls) is sound and well covered. The prior two polish threads are resolved; no open Pullfrog threads remain.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/build/src/transform-options.ts Resolved
@yamcodes

Copy link
Copy Markdown
Owner Author

@pullfrog review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Narrowed the shared plugin-option guard — TRANSFORM_OPTION_KEYS now holds only schemaPath, clientPrefix, logger, logLevel; the runtime fields moved to RUNTIME_ONLY_OPTION_KEYS, and assertTransformModeCall throws a dedicated pluginOptionNotSupportedMessage for them while a schema map / two-argument call still gets SCHEMA_DEFINE_REMOVED.
  • Dropped the plugin env override — Vite, Bun, and Rsbuild now validate the environment each build already has (loadEnv(...) / process.env); pluginConfig.env is no longer merged.
  • Trimmed plugin config types — factory configs are now TransformOptions & ArkEnvLogOptions, so ParseStandardConfig (and its runtime fields) is no longer part of the plugin option surface.
  • Updated reference docs and changesets — the three plugin references document the build-time/runtime split, the process.env recipe, and major/patch bumps; tests pin the new key sets and rejection messages across @arkenv/build and all three plugins.

The guard change is a real breaking change but it is intentional and matches #2009: the old-minus-new key set (env, coerce, onUndeclaredKey, arrayFormat, debugSecrets, emptyAsUndefined) is fully contained in RUNTIME_ONLY_OPTION_KEYS, so no call that should stay valid is rejected, and logger/logLevel-only and empty-object calls still resolve to transform mode. The Bun loaded = process.env aliasing is safe because loadValidatedEnv snapshots process.env before seeding and restores it from that snapshot in finally. The reference docs' "process.env wins over env files" claim holds for Vite (loadEnv assigns process.env after parsed env files) and Rsbuild (spread order), and Bun's Bun.build process loads .env into process.env itself.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@yamcodes
yamcodes merged commit 87f3743 into v1 Sep 25, 2026
19 checks passed
@yamcodes
yamcodes deleted the cursor/narrow-plugin-options-d8ec branch September 25, 2026 20:00
@arkenv-bot arkenv-bot Bot mentioned this pull request Sep 25, 2026
yamcodes pushed a commit that referenced this pull request Sep 25, 2026
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/[email protected]

### Major Changes

- #### Remove the SharedSchema key extractors
_[`#2011`](#2011)
[`9483c3c`](9483c3c)
[@yamcodes](https://github.com/yamcodes)_

	
`extractSharedKeys` and `extractSharedBlock` are no longer exported from
`@arkenv/build`. `@arkenv/nextjs/config` and `@arkenv/nuxt` (including
`@arkenv/nuxt/standard/config`) no longer re-export `extractSharedKeys`.
Shared keys in a flat `arkenv()` call still come from `extractKeys` and
`classifyEnvKeys`.
	
**BREAKING CHANGE**: Those helpers scanned source for a `SharedSchema =
{ ... }` assignment. Classify a flat `arkenv()` call instead.
	
	```ts
	import { classifyEnvKeys } from "@arkenv/build";
	
	const { sharedKeys } = classifyEnvKeys(source, ["NEXT_PUBLIC_"]);
	```

### Patch Changes

- #### Reject runtime keys in the plugin option guard
_[`#2012`](#2012)
[`87f3743`](87f3743)
[@yamcodes](https://github.com/yamcodes)_

	
The shared transform-option guard now treats `env`, `coerce`,
`onUndeclaredKey`, `arrayFormat`, `emptyAsUndefined`, `debugSecrets`,
and `toJsonSchema` as unsupported plugin options. The build reads the
loaded environment.
## @arkenv/[email protected]

### Major Changes

- #### Export only `arkenvPlugin` from the Bun plugin
_[`#2015`](#2015)
[`7417dd7`](7417dd7)
[@yamcodes](https://github.com/yamcodes)_

	
`@arkenv/bun-plugin` and `@arkenv/bun-plugin/standard` now export
`arkenvPlugin` as the default and the only named export. The
`arkenvBunPlugin` and `hybrid` aliases have been removed. `arkenvPlugin`
is still both a factory and a plugin object with `name`, `target`, and
`setup`.
	
	```ts
	import arkenvPlugin from "@arkenv/bun-plugin";
	
	await Bun.build({
	  plugins: [arkenvPlugin],
	});
	```
	
**BREAKING CHANGE**: `arkenvBunPlugin` and `hybrid` are no longer
exported. Use `arkenvPlugin` instead.
- #### Reject runtime options on bundler plugins
_[`#2012`](#2012)
[`87f3743`](87f3743)
[@yamcodes](https://github.com/yamcodes)_

	
Vite, Bun, and Rsbuild plugins now accept only `schemaPath`,
`clientPrefix`, `logger`, and `logLevel`. The build validates the
environment loaded for that compile. Variables already set on
`process.env` win over env files.
	
	```ts
	import { arkenvPlugin } from "@arkenv/vite-plugin";
	
	export default {
	  plugins: [arkenvPlugin({ schemaPath: "src/env.ts" })],
	};
	```
	
Set `env`, `coerce`, `onUndeclaredKey`, `arrayFormat`,
`emptyAsUndefined`, `debugSecrets`, and `toJsonSchema` on `arkenv()` in
`env.ts`. The plugin rejects those keys.
	
	```ts
	import arkenv from "@arkenv/core";
	
	export const env = arkenv(
	  { PORT: "number" },
	  { coerce: true, onUndeclaredKey: "reject" },
	);
	```
	
**BREAKING CHANGE**: Plugin option types no longer include runtime
`arkenv()` fields, including `env`. Passing them now throws.
	
	```diff
	- arkenvPlugin({ env: { PORT: "3000" }, coerce: true })
	+ arkenvPlugin({ schemaPath: "src/env.ts" })
	```

### Patch Changes

<details><summary>Updated 3 dependencies</summary>

<small>


[`87f3743`](87f3743)
[`9483c3c`](9483c3c)
[`089ef43`](089ef43)

</small>

- `@arkenv/[email protected]`
- `@arkenv/[email protected]`
- `@arkenv/[email protected]`

</details>
## @arkenv/[email protected]

### Major Changes

- #### Remove the SharedSchema key extractors
_[`#2011`](#2011)
[`9483c3c`](9483c3c)
[@yamcodes](https://github.com/yamcodes)_

	
`extractSharedKeys` and `extractSharedBlock` are no longer exported from
`@arkenv/build`. `@arkenv/nextjs/config` and `@arkenv/nuxt` (including
`@arkenv/nuxt/standard/config`) no longer re-export `extractSharedKeys`.
Shared keys in a flat `arkenv()` call still come from `extractKeys` and
`classifyEnvKeys`.
	
**BREAKING CHANGE**: Those helpers scanned source for a `SharedSchema =
{ ... }` assignment. Classify a flat `arkenv()` call instead.
	
	```ts
	import { classifyEnvKeys } from "@arkenv/build";
	
	const { sharedKeys } = classifyEnvKeys(source, ["NEXT_PUBLIC_"]);
	```

### Patch Changes

<details><summary>Updated 3 dependencies</summary>

<small>


[`87f3743`](87f3743)
[`9483c3c`](9483c3c)
[`089ef43`](089ef43)

</small>

- `@arkenv/[email protected]`
- `@arkenv/[email protected]`
- `@arkenv/[email protected]`

</details>
## @arkenv/[email protected]

### Major Changes

- #### Remove the SharedSchema key extractors
_[`#2011`](#2011)
[`9483c3c`](9483c3c)
[@yamcodes](https://github.com/yamcodes)_

	
`extractSharedKeys` and `extractSharedBlock` are no longer exported from
`@arkenv/build`. `@arkenv/nextjs/config` and `@arkenv/nuxt` (including
`@arkenv/nuxt/standard/config`) no longer re-export `extractSharedKeys`.
Shared keys in a flat `arkenv()` call still come from `extractKeys` and
`classifyEnvKeys`.
	
**BREAKING CHANGE**: Those helpers scanned source for a `SharedSchema =
{ ... }` assignment. Classify a flat `arkenv()` call instead.
	
	```ts
	import { classifyEnvKeys } from "@arkenv/build";
	
	const { sharedKeys } = classifyEnvKeys(source, ["NEXT_PUBLIC_"]);
	```

### Patch Changes

<details><summary>Updated 3 dependencies</summary>

<small>


[`87f3743`](87f3743)
[`9483c3c`](9483c3c)
[`089ef43`](089ef43)

</small>

- `@arkenv/[email protected]`
- `@arkenv/[email protected]`
- `@arkenv/[email protected]`

</details>
## @arkenv/[email protected]

### Major Changes

- #### Export only `arkenvPlugin` from the Rsbuild plugin
_[`#2015`](#2015)
[`7417dd7`](7417dd7)
[@yamcodes](https://github.com/yamcodes)_

	
`@arkenv/rsbuild-plugin` and `@arkenv/rsbuild-plugin/standard` now
export `arkenvPlugin` as the default and the only named export. The
`arkenvRsbuildPlugin` alias has been removed.
	
	```ts
	import { arkenvPlugin } from "@arkenv/rsbuild-plugin";
	
	export default defineConfig({
	  plugins: [arkenvPlugin()],
	});
	```
	
**BREAKING CHANGE**: `arkenvRsbuildPlugin` is no longer exported. Import
`arkenvPlugin` instead.
- #### Reject runtime options on bundler plugins
_[`#2012`](#2012)
[`87f3743`](87f3743)
[@yamcodes](https://github.com/yamcodes)_

	
Vite, Bun, and Rsbuild plugins now accept only `schemaPath`,
`clientPrefix`, `logger`, and `logLevel`. The build validates the
environment loaded for that compile. Variables already set on
`process.env` win over env files.
	
	```ts
	import { arkenvPlugin } from "@arkenv/vite-plugin";
	
	export default {
	  plugins: [arkenvPlugin({ schemaPath: "src/env.ts" })],
	};
	```
	
Set `env`, `coerce`, `onUndeclaredKey`, `arrayFormat`,
`emptyAsUndefined`, `debugSecrets`, and `toJsonSchema` on `arkenv()` in
`env.ts`. The plugin rejects those keys.
	
	```ts
	import arkenv from "@arkenv/core";
	
	export const env = arkenv(
	  { PORT: "number" },
	  { coerce: true, onUndeclaredKey: "reject" },
	);
	```
	
**BREAKING CHANGE**: Plugin option types no longer include runtime
`arkenv()` fields, including `env`. Passing them now throws.
	
	```diff
	- arkenvPlugin({ env: { PORT: "3000" }, coerce: true })
	+ arkenvPlugin({ schemaPath: "src/env.ts" })
	```

### Patch Changes

<details><summary>Updated 3 dependencies</summary>

<small>


[`87f3743`](87f3743)
[`9483c3c`](9483c3c)
[`089ef43`](089ef43)

</small>

- `@arkenv/[email protected]`
- `@arkenv/[email protected]`
- `@arkenv/[email protected]`

</details>
## @arkenv/[email protected]

### Major Changes

- #### Export only `arkenvPlugin` from the Vite plugin
_[`#2015`](#2015)
[`7417dd7`](7417dd7)
[@yamcodes](https://github.com/yamcodes)_

	
`@arkenv/vite-plugin` and `@arkenv/vite-plugin/standard` now export
`arkenvPlugin` as the default and the only named export. The
`arkenvVitePlugin` alias has been removed.
	
	```ts
	import arkenvPlugin from "@arkenv/vite-plugin";
	
	export default defineConfig({
	  plugins: [arkenvPlugin()],
	});
	```
	
**BREAKING CHANGE**: `arkenvVitePlugin` is no longer exported. Import
`arkenvPlugin` instead.
- #### Reject runtime options on bundler plugins
_[`#2012`](#2012)
[`87f3743`](87f3743)
[@yamcodes](https://github.com/yamcodes)_

	
Vite, Bun, and Rsbuild plugins now accept only `schemaPath`,
`clientPrefix`, `logger`, and `logLevel`. The build validates the
environment loaded for that compile. Variables already set on
`process.env` win over env files.
	
	```ts
	import { arkenvPlugin } from "@arkenv/vite-plugin";
	
	export default {
	  plugins: [arkenvPlugin({ schemaPath: "src/env.ts" })],
	};
	```
	
Set `env`, `coerce`, `onUndeclaredKey`, `arrayFormat`,
`emptyAsUndefined`, `debugSecrets`, and `toJsonSchema` on `arkenv()` in
`env.ts`. The plugin rejects those keys.
	
	```ts
	import arkenv from "@arkenv/core";
	
	export const env = arkenv(
	  { PORT: "number" },
	  { coerce: true, onUndeclaredKey: "reject" },
	);
	```
	
**BREAKING CHANGE**: Plugin option types no longer include runtime
`arkenv()` fields, including `env`. Passing them now throws.
	
	```diff
	- arkenvPlugin({ env: { PORT: "3000" }, coerce: true })
	+ arkenvPlugin({ schemaPath: "src/env.ts" })
	```

### Patch Changes

<details><summary>Updated 3 dependencies</summary>

<small>


[`87f3743`](87f3743)
[`9483c3c`](9483c3c)
[`089ef43`](089ef43)

</small>

- `@arkenv/[email protected]`
- `@arkenv/[email protected]`
- `@arkenv/[email protected]`

</details>
## [email protected]

### Minor Changes

- #### Stop installing the agent skill during init
_[`#1984`](#1984)
[`2c1dd0f`](2c1dd0f)
[@yamcodes](https://github.com/yamcodes)_

	
`arkenv init` no longer prompts for or installs the ArkEnv agent skill,
including under `--yes`. When the skill is not already in the project,
the next-steps note still prints `npx skills add yamcodes/arkenv`.
`@arkenv/agent-plugin` already includes the skill.
- #### Scaffold `arkenvPlugin` in Vite and Rsbuild configs
_[`#2015`](#2015)
[`7417dd7`](7417dd7)
[@yamcodes](https://github.com/yamcodes)_

	
`arkenv init` now writes `arkenvPlugin` into new Vite and Rsbuild config
entries. Vite binds the default import as `arkenvPlugin`. Rsbuild
imports the named `arkenvPlugin`.
	
	```ts
	import arkenvPlugin from "@arkenv/vite-plugin";
	
	export default defineConfig({
	  plugins: [arkenvPlugin()],
	});
	```

### Patch Changes

- #### Scaffold Zod and Valibot init on standard mode
_[`#2020`](#2020)
[`a3815e6`](a3815e6)
[@yamcodes](https://github.com/yamcodes)_

	
`arkenv init` no longer installs `arktype` when you choose Zod or
Valibot. Next.js, Nuxt, Vite, Rsbuild, and Bun now scaffold the
`/standard` integration entry, and Next.js and Nuxt also install
`@arkenv/standard`.
	
	```ts
	import arkenv from "@arkenv/nuxt/standard";
	import * as z from "zod";
	
	export const env = arkenv({
	  DATABASE_URL: z.url(),
	});
	```
	
Re-running init replaces the other engine's entry. A Nuxt app that still
registers `@arkenv/nuxt/module` switches to
`@arkenv/nuxt/standard/module` when you choose Zod or Valibot, and the
same replacement applies to the Next.js, Vite, and Rsbuild imports.
Choosing ArkType switches those entries back.
	
ArkType init is unchanged: it still installs `arktype` and uses the
ArkType integration entry.
## @arkenv/[email protected]

### Patch Changes

- #### Parse audit sources with the TypeScript 7 sync API
_[`#1990`](#1990)
[`f3039bf`](f3039bf)
[@yamcodes](https://github.com/yamcodes)_

	
The agent plugin audit now parses source files through
`typescript/unstable/sync` instead of the classic TypeScript compiler
API.
- #### Point init refusals at nextActions
_[`#1977`](#1977)
[`dd2fa82`](dd2fa82)
[@yamcodes](https://github.com/yamcodes)_

	
Agent instructions now tell you to retry only when a refusal's
`nextActions` include a `run-command` with `--force`.
## @arkenv/[email protected]

### Patch Changes

- #### Restore keyword suggestions inside inline schemas
_[`#1975`](#1975)
[`089ef43`](089ef43)
[@yamcodes](https://github.com/yamcodes)_

	
A partial keyword in an inline schema string suggests ArkType keywords
again. `arkenv({ PORT: "n" })` offers `never`, `null`, and `number`. The
same suggestions are back on `arkenv` from `@arkenv/core/safe`.
	
	```ts
	import arkenv from "@arkenv/core";
	
	export const env = arkenv({
	  PORT: "number.port = 3000",
	});
	```
## @arkenv/[email protected]

### Patch Changes

- #### Scaffold `arkenvPlugin` in the TanStack add-on
_[`#2015`](#2015)
[`7417dd7`](7417dd7)
[@yamcodes](https://github.com/yamcodes)_

	
The TanStack CLI add-on now registers the Vite plugin as `arkenvPlugin`.
	
	```ts
	import arkenvPlugin from "@arkenv/vite-plugin";
	
	export default defineConfig({
	  plugins: [arkenvPlugin()],
	});
	```
- #### Point TanStack add-on dependencies at the current release
_[`#1978`](#1978)
[`888e6c2`](888e6c2)
[@yamcodes](https://github.com/yamcodes)_

	
Scaffolded TanStack Start apps now install `@arkenv/core`,
`@arkenv/standard`, and `@arkenv/vite-plugin` at `^1.0.0-rc.2`, which
matches the versions on npm `latest` and still accepts `1.0.0` when it
publishes.
	
	Usage:
	
	```bash
npx @tanstack/cli create my-app --add-ons
https://arkenv.js.org/tanstack/info.json
	```
## @arkenv/[email protected]

No changes in this release.

Co-authored-by: arkenv-bot[bot] <237618717+arkenv-bot[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/build Issues or Pull Requests involving @arkenv/build @arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv docs Adds or changes documentation, or acts as documentation in and of itself enhancement New feature or improvement 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.

Narrow bundler plugin options to build-time fields

2 participants