feat: Make env/internal/shared.ts optional in strict layout (dev/v0)#1503
Merged
yamcodes merged 1 commit intoJul 25, 2026
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
🦋 Changeset detectedLatest commit: 8884fae The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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/cli
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/vite-plugin
commit: |
Contributor
📦 Bundle Size Report
✅ All size limits passed! |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — makes env/internal/shared.ts optional in strict layout by extracting a shared isStrictLayoutDir() helper and relaxing the auto-detection and explicit-validation checks to require only client.ts + server.ts.
- Extract
isStrictLayoutDir()— new exported function inpackages/build/src/index.tsthat checks forclient.ts+server.tswithout touchingshared.ts. Replaces the old inlinecheckStrictclosure at all 4 call sites. - Relax
resolveLayoutexplicit validation —layout: "strict"now only requiresclient.tsto exist; thesharedPathcheck is removed. Error message updated accordingly. - Update
findSchemaPath— usesisStrictLayoutDir()so directories withoutshared.tsare discovered as strict layouts. - Documentation updates — Next.js and Nuxt strict-layout docs, plus JSDoc on both
ArkEnvConfigOptions.layouttypes now describeshared.tsas optional. - Tests — 4 new tests in
packages/build/src/index.test.tscovering auto-detection,findSchemaPath, and explicit-strict-without-client error path.
DeepSeek Pro (free via Pullfrog for OSS) (GPT Sol not used — the program covers this model; add its provider key to run your pick) | 𝕏
yamcodes
deleted the
1448-make-envinternalsharedts-optional-in-strict-layout-devv0
branch
July 25, 2026 14:35
6 tasks
cursor Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
Drop internal aliases/stub wording; keep the usage-first tone from the changeset skill and the original #1503 notes. Co-authored-by: Yam Borodetsky <hi@yam.codes>
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.

Fixes #1448
Summary
findSchemaPathnow treatclient.ts+server.tsas enough;internal/shared.tsis optional (empty when absent)layout: "strict"only requiresclient.tsTest plan
pnpm run typecheck/pnpm run test -- --run/pnpm run fixpassenv/with onlyclient.ts+server.tsauto-detects as strictlayout: "strict"succeeds withoutinternal/shared.tsinit --strictstill scaffoldsshared.tsMade with Cursor