Skip to content

(v1) Internal vs. Published Packages Strategy for Build-time and Runtime Code - #1202

Merged
yamcodes merged 22 commits into
v1from
1199-distribution-implement-standard-mode-packaging-strategy
Jun 23, 2026
Merged

(v1) Internal vs. Published Packages Strategy for Build-time and Runtime Code#1202
yamcodes merged 22 commits into
v1from
1199-distribution-implement-standard-mode-packaging-strategy

Conversation

@yamcodes

@yamcodes yamcodes commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Closes #1197

@changeset-bot

changeset-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 57b30a5

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

This PR includes changesets to release 4 packages
Name Type
@arkenv/nextjs Major
@arkenv/nuxt Major
@arkenv/vite-plugin Major
@arkenv/bun-plugin Major

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

@github-actions github-actions Bot added the docs Adds or changes documentation, or acts as documentation in and of itself label Jun 13, 2026
@yamcodes
yamcodes changed the base branch from dev to v1 June 13, 2026 07:50
@yamcodes
yamcodes force-pushed the 1199-distribution-implement-standard-mode-packaging-strategy branch from f329ce9 to 8e35d3c Compare June 16, 2026 03:55
@github-actions github-actions Bot added the @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI label Jun 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

arkenv

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

@arkenv/build

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

@arkenv/bun-plugin

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

@arkenv/cli

npm i https://pkg.pr.new/@arkenv/cli@1202

@arkenv/fumadocs-ui

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

@arkenv/nextjs

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

@arkenv/nuxt

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

@arkenv/vite-plugin

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

commit: 57b30a5

Comment thread docs/adr/0010-runtime-shared-logic-strategy.md Outdated
Comment thread docs/adr/0010-runtime-shared-logic-strategy.md
@yamcodes yamcodes changed the title Distribution: Implement Standard Mode Packaging Strategy (Split core into @arkenv/core and @arkenv/standard) (v1) Distribution: Implement Standard Mode Packaging Strategy (Split core into @arkenv/core and @arkenv/standard) Jun 18, 2026
@github-actions github-actions Bot added @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv @arkenv/bun-plugin Issues or Pull Requests involving the Bun plugin for ArkEnv @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 labels Jun 19, 2026
@yamcodes
yamcodes marked this pull request as ready for review June 19, 2026 15:36

@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 — establishes the distribution and versioning strategy for ArkEnv v1 by moving arkenv to peer dependencies in all framework plugins, documenting 3 architecture decisions, and updating the changeset skill for standard SemVer.

  • Lock arkenv and @arkenv/cli in version lockstep via changeset fixed config per ADR 0011 — ensures CLI codegen output stays compatible with core engine internals.
  • Move arkenv to peerDependencies in all 4 framework plugins (@arkenv/nextjs, @arkenv/nuxt, @arkenv/vite-plugin, @arkenv/bun-plugin) — uses workspace:^ for published caret range, preventing duplicate engine instances that break ArkType structural typing.
  • Add arkenv to devDependencies with workspace:* in all plugins — maintains local monorepo development while keeping consumers lean.
  • Add ADR 0007 documenting the asymmetric packaging strategy — split engines into separate packages (@arkenv/core / @arkenv/standard) but keep plugins as single packages with subpath exports.
  • Add ADR 0010 documenting the inlined internal packages strategy — @repo/* packages bundled at publish time via tsdown to avoid public utility packages and cascading version bumps.
  • Add ADR 0011 documenting the hybrid versioning model — fixed inner circle (arkenv + @arkenv/cli), independent outer ring (framework plugins + build utilities), with workspace:* / workspace:^ / workspace:~ protocol guidance.
  • Update changeset skill for v1+ standard SemVer — major for breaking changes, minor for new features, patch for fixes.
  • Fix "Arkenv" → "ArkEnv" typo in historic CLI changelog entries.

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

@arkenv-bot

arkenv-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (Asia/Almaty)
arkenv Ready Ready Preview, Comment Jun 23 2026, 11:32 PM (Asia/Almaty)

Comment thread .changeset/config.json Outdated
Comment thread .changeset/epg3nspi.md
Comment thread docs/adr/0010-runtime-shared-logic-strategy.md

@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.

ℹ️ The ADR rewrite is clean but left a few stale references to the old hybrid model in the Context and Consequences sections — see inline comments.

Reviewed changes — renames ADR 0011 from "Hybrid Versioning Strategy" to "Independent Versioning Strategy" and removes the fixed lockstep between arkenv and @arkenv/cli from the changeset config.

  • Drop fixed version lockstep between arkenv and @arkenv/cli in .changeset/config.json — the CLI is now treated as an independent package that versions on its own schedule.
  • Rewrite ADR 0011 Decision section to fully independent versioning — removes the "Inner Circle (Fixed / Locked)" section, adds @arkenv/cli to the independent outer ring, and explains the CLI doesn't depend on deep arkenv internals.

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

Comment thread docs/adr/0011-independent-versioning-strategy.md Outdated
Comment thread docs/adr/0011-independent-versioning-strategy.md Outdated
Comment thread docs/adr/0011-independent-versioning-strategy.md Outdated
Comment thread docs/adr/0011-independent-versioning-strategy.md Outdated
@yamcodes

Copy link
Copy Markdown
Owner Author

Addressed all review comments:

  • Clarified that arkenv and @arkenv/cli are already versioned independently.
  • Explained that peerDependency for arkenv is strictly required across all framework plugins and integrations to prevent singleton skew.
  • Confirmed that the Arkenv casing is already correct.
  • Clarified that the ADR does not contradict the existence of @arkenv/build.

@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 — one minor suggestion inline.

Reviewed changes — switches peer dependencies from workspace:^ to the hardcoded ^1.0.0 range (Wide Peer strategy) across all 4 framework plugins and updates ADR 0007 documentation to match.

  • Switch peer deps to hardcoded ^1.0.0 in @arkenv/nextjs, @arkenv/nuxt, @arkenv/vite-plugin, and @arkenv/bun-plugin — solves the Artificial Floor problem where workspace:^ would pin published plugins to the monorepo's current arkenv version.
  • Update ADR 0007 table and rationale to document the Wide Peer strategy — explains why hardcoding the minimum version decouples plugin releases from core engine version churn.

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

Comment thread .changeset/epg3nspi.md Outdated
yamcodes added 2 commits June 20, 2026 19:01
…ement-standard-mode-packaging-strategy

# Conflicts:
#	apps/www/content/docs/nextjs/layouts/simple.mdx
@github-actions github-actions Bot added the www Improvements or additions to arkenv.js.org label Jun 23, 2026
@yamcodes yamcodes changed the title (v1) Distribution: Implement Standard Mode Packaging Strategy (Split core into @arkenv/core and @arkenv/standard) (v1) Distribution: Implement Standard Mode Packaging Strategy Jun 23, 2026

@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 — merges the v1 base branch into the feature branch, bringing in upstream changes from other PRs that have landed on v1 since the branch was last synced.

  • Merged v1 branch — brings in upstream renames (createEnvarkenv), version bumps to 1.0.0-alpha.1 across packages, changelog entries, coercion model unification, documentation updates, and agent context file updates. All merge cleanly with no conflicts against this PR's changes.
  • Removed stale changesets.changeset/init-v1.md, pre.json, rename-create-env-to-arkenv.md, and unify-coercion.md were cleaned up by the upstream v1 branch.

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

@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.

✅ All prior feedback addressed — no new issues found.

Reviewed changes — one commit addressing the open review thread from the prior Pullfrog review.

  • Fixed changeset version range.changeset/epg3nspi.md updated from ^1.0.0-alpha.1 to ^1.0.0 to match the actual peerDependencies range in all 4 plugin package.json files.
  • Fixed AutoTypeTable pathoptions.mdx updated from create-env.ts to arkenv.ts to match the upstream file rename.

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

@yamcodes yamcodes changed the title (v1) Distribution: Implement Standard Mode Packaging Strategy (v1) Internal vs. Published Packages Strategy for Build-time and Runtime Code Jun 23, 2026
@yamcodes
yamcodes merged commit 763270c into v1 Jun 23, 2026
20 checks passed
@yamcodes
yamcodes deleted the 1199-distribution-implement-standard-mode-packaging-strategy branch June 23, 2026 18:31
@arkenv-bot arkenv-bot Bot mentioned this pull request Jun 23, 2026
yamcodes pushed a commit that referenced this pull request Jun 23, 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/bun-plugin@1.0.0-alpha.3

### Major Changes

- #### Move `arkenv` to peer dependencies in framework plugins
_[`#1202`](#1202)
[`763270c`](763270c)
[@yamcodes](https://github.com/yamcodes)_

Framework plugins no longer declare `arkenv` as a regular dependency.
`arkenv` is now declared as a `peerDependency` with a caret range
(`^1.0.0`), ensuring a single shared instance across all plugins and the
host application.

This change prevents duplicate instances of `arkenv` in `node_modules`,
which could break ArkType structural typing and schema validation at
runtime.

  Plugins affected:

  - `@arkenv/nextjs`
  - `@arkenv/nuxt`
  - `@arkenv/vite-plugin`
  - `@arkenv/bun-plugin`

  Before:

  ```bash
  npm install @arkenv/nextjs
  ```

  After:

  ```bash
  npm install arkenv @arkenv/nextjs
  ```

**BREAKING CHANGE:** Users must now install `arkenv` alongside the
plugin. Previously, `arkenv` was automatically pulled in as a regular
dependency.
## @arkenv/nextjs@1.0.0-alpha.3

### Major Changes

- #### Move `arkenv` to peer dependencies in framework plugins
_[`#1202`](#1202)
[`763270c`](763270c)
[@yamcodes](https://github.com/yamcodes)_

Framework plugins no longer declare `arkenv` as a regular dependency.
`arkenv` is now declared as a `peerDependency` with a caret range
(`^1.0.0`), ensuring a single shared instance across all plugins and the
host application.

This change prevents duplicate instances of `arkenv` in `node_modules`,
which could break ArkType structural typing and schema validation at
runtime.

  Plugins affected:

  - `@arkenv/nextjs`
  - `@arkenv/nuxt`
  - `@arkenv/vite-plugin`
  - `@arkenv/bun-plugin`

  Before:

  ```bash
  npm install @arkenv/nextjs
  ```

  After:

  ```bash
  npm install arkenv @arkenv/nextjs
  ```

**BREAKING CHANGE:** Users must now install `arkenv` alongside the
plugin. Previously, `arkenv` was automatically pulled in as a regular
dependency.
## @arkenv/nuxt@1.0.0-alpha.1

### Major Changes

- #### Move `arkenv` to peer dependencies in framework plugins
_[`#1202`](#1202)
[`763270c`](763270c)
[@yamcodes](https://github.com/yamcodes)_

Framework plugins no longer declare `arkenv` as a regular dependency.
`arkenv` is now declared as a `peerDependency` with a caret range
(`^1.0.0`), ensuring a single shared instance across all plugins and the
host application.

This change prevents duplicate instances of `arkenv` in `node_modules`,
which could break ArkType structural typing and schema validation at
runtime.

  Plugins affected:

  - `@arkenv/nextjs`
  - `@arkenv/nuxt`
  - `@arkenv/vite-plugin`
  - `@arkenv/bun-plugin`

  Before:

  ```bash
  npm install @arkenv/nextjs
  ```

  After:

  ```bash
  npm install arkenv @arkenv/nextjs
  ```

**BREAKING CHANGE:** Users must now install `arkenv` alongside the
plugin. Previously, `arkenv` was automatically pulled in as a regular
dependency.
## @arkenv/vite-plugin@1.0.0-alpha.3

### Major Changes

- #### Move `arkenv` to peer dependencies in framework plugins
_[`#1202`](#1202)
[`763270c`](763270c)
[@yamcodes](https://github.com/yamcodes)_

Framework plugins no longer declare `arkenv` as a regular dependency.
`arkenv` is now declared as a `peerDependency` with a caret range
(`^1.0.0`), ensuring a single shared instance across all plugins and the
host application.

This change prevents duplicate instances of `arkenv` in `node_modules`,
which could break ArkType structural typing and schema validation at
runtime.

  Plugins affected:

  - `@arkenv/nextjs`
  - `@arkenv/nuxt`
  - `@arkenv/vite-plugin`
  - `@arkenv/bun-plugin`

  Before:

  ```bash
  npm install @arkenv/nextjs
  ```

  After:

  ```bash
  npm install arkenv @arkenv/nextjs
  ```

**BREAKING CHANGE:** Users must now install `arkenv` alongside the
plugin. Previously, `arkenv` was automatically pulled in as a regular
dependency.

---------

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/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 docs Adds or changes documentation, or acts as documentation in and of itself www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant