Repository navigation
fix: Collapse init --host-preset/-H into --preset/-P only - #1927
Conversation
Keep only --preset / -P for hosting presets on arkenv init. Reject the legacy --host-preset / -H aliases as unknown arguments, update docs and tests, and add a breaking changeset for the arkenv CLI. Fixes #1914 Co-authored-by: Yam Borodetsky <[email protected]>
🦋 Changeset detectedLatest commit: 2d63338 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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/agent-plugin
arkenv
@arkenv/build
@arkenv/bun-plugin
@arkenv/core
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/rsbuild-plugin
@arkenv/standard
@arkenv/tanstack-addon
@arkenv/vite-plugin
commit: |
Pull in the bundled -yH unknown-argument assertions, tighter hosting-presets wording, and a clearer breaking-change diff. Co-authored-by: Yam Borodetsky <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Parser collapse —
hostPresetis removed fromFLAG_CONFIGinpackages/arkenv/src/cli/cli.ts, so--host-presetand-H(including bundled-yqH) now fall through to the standardUnknown argument: …path. Preset validation and thehostPresetgetter read onlyFLAG_CONFIG.preset, while the internalhostPresetcontract (InitInput, scaffold IR) is deliberately untouched. - Tests — value-taking-flag expansion cases move from
-Hto-P; a newRemoved host-preset aliasesdescribe asserts exact errors for--host-preset,-H, and bundled-yqH;--preset/-Phappy-path coverage across all presets (includingnoneand the invalid-value error) is retained. Verified locally:cli.test.ts(42) andhelp.test.ts(1) pass. - Docs and skill copy —
installation.mdx,reference/init.mdx,hosting-presets.mdx, andskills/arkenv/SKILL.mddrop the removed aliases..agents/skillsis a symlink toskills/, so there is no duplicate to update. - Changesets — adds a breaking
arkenv: majorchangeset, deletes the pending-Halias changeset, and updates stale--host-presetexamples in the pre-mode notes.
Two things worth recording, both in the PR's favour: -H was already released (#1362, packages/arkenv/CHANGELOG.md), so a major changeset is the correct call rather than an overstatement; and changesets 3 reads both .changeset/*.md and .changeset/pre/*.md (confirmed in @changesets/read), so the edits to the pre/ notes are release-relevant. No remaining --host-preset / -H references exist outside the new tests and changeset.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta since the prior review of cc747cc)
- Changeset copy —
#### Remove the--host-preset/-Hinit aliases; tighter prose, and the rename example now shows both--host-preset → --presetand-H → -P. Accurate. - Hosting-presets docs — the alias sentence becomes "The short form is
-P." Same meaning, cleaner. - Bundled-
-Htest — replaces the-yqH vercelcase with-yH, and now additionally assertscli.argsequals["init", "-y", "-H"]andisYesstaystruealongside theUnknown argument: -Herror. This is stronger than the previous assertion and still fails if-Hwere re-registered.
The rest of the commit is reconciliation with the closed duplicate #1922 and does not change behaviour. No further concerns.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
test (lts) timed out in env-module HMR revalidation (5s); prior commit on this branch was fully green. Co-authored-by: Yam Borodetsky <[email protected]>
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> Fixes #1913 ## Summary CLI schema discovery no longer auto-picks leftover strict-layout filenames (`env/server.ts`, `src/env/server.ts`). Discovery stays `--schema` → flat convention only (`env.ts`, `src/env.ts`, and related extensions), matching [ADR 0020](https://github.com/yamcodes/arkenv/blob/v1/docs/adr/0020-strict-layout-complexity-budget.md). Split-recipe projects keep working by pointing `--schema` at a loadable module (typically the client schema or a flat `env.ts`). Server modules that import `server-only` cannot be evaluated by the CLI's plain-Node Jiti loader. ## Changes - Remove `env/server.ts` / `src/env/server.ts` from `resolveSchemaPath` candidates - Unit + integration tests for ignored leftovers, flat convention (incl. `.mjs`), and `--schema` escape hatch - Clarify flat-only discovery in `reference/check.mdx`, ADR 0033, and the ArkEnv skill - Major changeset on `arkenv` with migration note (client/flat target; `server-only` caveat) ## Duplicate handling Absorbed ADR/skill/docs notes from parallel #1921 (closed as duplicate). Surviving PR for this cleanup. ## Review follow-up - Migration/`check` docs no longer recommend `--schema env/server.ts` when that file imports `server-only` ## Rebase Rebased onto latest `v1` (resolved `skills/arkenv/SKILL.md` conflict with collapsed `--preset` from #1927). ## Validation - Focused `resolve-schema-path` tests pass after rebase - Full CI pending after conflict resolution ## Test plan - [x] Unit tests assert `env/server.ts` / `src/env/server.ts` alone are not discovered - [x] Flat `env.ts` / `src/env.mjs` and explicit `--schema` still resolve - [x] Integration: only `env/server.ts` present → exit `2` / `CLI.SCHEMA_NOT_FOUND` <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-c911a2ec-a056-47e1-9304-a4ec396af30c?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-c911a2ec-a056-47e1-9304-a4ec396af30c&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <[email protected]>

Fixes #1914
Collapse the duplicate hosting-preset flag surface on
arkenv initto the canonical--preset/-Ppair.Changes
--host-preset/-Hfrom CLI flag parsing (unknown-argument behavior)--preset/-Pfor all presets includingnone-Halias changeset; add a breakingarkenvmajor changesetDeduped against #1922
Kept this PR (targets open #1914 + reconciles
.changeset/pre/). Adopted from #1922: bundled-yHtest assertions, hosting-presets wording, and the breaking-change diff. Closed #1922 as duplicate.Evidence
Help lists only
--preset, -P <preset>.