Conversation
this fixes an issue where createEnv conflicted (since it had the same name) and removed from the bundle completely.
|
WalkthroughReplaces "Validator mode" terminology with an "Entry point" model, removes Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
📦 Bundle Size Report
✅ All size limits passed! |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/www/content/docs/arkenv/how-to/load-environment-variables.mdx (1)
219-221:⚠️ Potential issue | 🟡 Minor
z.url()is Zod 4-only syntax, inconsistent withstandard.mdx's own example.
z.url()was introduced in Zod 4 as a top-level format helper. The companionstandard.mdxpage (also in this PR) usesz.string().url()in its usage example and explicitly documents support forzod@^3.24.0, which only supports the method form. The code here will fail with the documented Zod version requirement.Using
z.url()creates a silent inconsistency for readers comparing the two pages and breaks the stated compatibility target.✏️ Suggested fix for consistency with standard.mdx
- DATABASE_URL: z.url(), + DATABASE_URL: z.string().url(),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/content/docs/arkenv/how-to/load-environment-variables.mdx` around lines 219 - 221, The schema uses z.url() (seen on the DATABASE_URL entry) which is Zod 4-only; to remain consistent with the documented Zod version and the standard.mdx example, replace z.url() with z.string().url() in the schema (keep PORT as z.coerce.number().int().min(0).max(65535) unchanged) so the code works with zod@^3.24.0 and matches the other example.
🧹 Nitpick comments (2)
apps/www/content/docs/arkenv/integrations/standard-schema.mdx (1)
39-39: Minor style: consider varying the “avoid ArkType” phrasing.
It repeats the tip just above; a small reword could improve flow.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/content/docs/arkenv/integrations/standard-schema.mdx` at line 39, The sentence "Ensure you're using `arktype@>=2.1.28`, or import from `arkenv/standard` if you want to avoid ArkType" is repetitive with the previous tip; rephrase it to vary wording and improve flow (e.g., "Use `arktype@>=2.1.28`, or alternatively import from `arkenv/standard` to opt out of ArkType") while keeping the same references (`arktype@>=2.1.28`, `arkenv/standard`, and the notion of avoiding ArkType); update only that line in the paragraph so the meaning stays identical but the phrasing differs from the prior sentence.apps/www/content/docs/arkenv/standard.mdx (1)
37-37: Zod version range doesn't reflect current Zod 4 stable status.Zod 4 is now stable and is what users get with
npm install zod. The requirementzod@^3.24.0is technically correct as the minimum for Standard Schema support, since 3.24 is the first version to support Standard Schema, but it's missing explicit Zod 4 coverage. New users installing Zod today will get Zod 4 and should know that's also supported.Consider updating to clarify both are supported:
✏️ Suggested fix
-A validator that implements Standard Schema (e.g. `zod@^3.24.0`, `valibot@^1.0.0`). +A validator that implements Standard Schema (e.g. `zod@^3.24.0 || ^4.0.0`, `valibot@^1.0.0`).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/content/docs/arkenv/standard.mdx` at line 37, Update the zod version mention in the sentence that currently reads "A validator that implements Standard Schema (e.g. `zod@^3.24.0`, `valibot@^1.0.0`)." to explicitly include Zod 4 support (e.g. change the snippet to something like `zod@^3.24.0 || ^4.0.0` or reword to "Zod 3.24+ (including Zod 4) and valibot@^1.0.0") so the docs reflect that both Zod v3.24+ and Zod v4 are supported.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/www/content/docs/arkenv/quickstart.mdx`:
- Line 15: The link text "paired with ArkType" currently points to
/docs/arkenv/standard (the ArkType-free page); update the href for that anchor
so it targets the ArkType integration/setup page (the page that documents the
ArkType-powered default entry point) instead of /docs/arkenv/standard — locate
the anchor with text "paired with ArkType" in quickstart.mdx and replace its
href with the correct ArkType page URL (e.g., the dedicated ArkType integration
route used in the docs).
In `@apps/www/content/docs/arkenv/standard.mdx`:
- Line 18: Update the table row for "Automatic coercion" so it no longer uses
the ❌ (unavailable) icon; change the icon to ⚠️ and keep the "Validator-defined"
note to indicate coercion is available but not automatic. Specifically, in the
row currently showing "| **Automatic coercion** | ✅ Yes | ❌ Validator-defined
|", replace the third cell's ❌ with ⚠️ (so it reads "| **Automatic coercion** |
✅ Yes | ⚠️ Validator-defined |") to match the example usage like
z.coerce.number().
- Line 15: The table row for "ArkType DSL" in the arkenv/standard docs is
misleading; change the cell that currently reads "⚠️ Via `type(...)`" to
explicitly indicate ArkType DSL is not supported (e.g., "❌ No") or add a brief
note that support only exists if the user separately installs ArkType (not
recommended); update the entry for arkenv/standard and any adjacent explanatory
text referring to `type(...)` to reflect that `type()` is provided by ArkType,
not by arkenv/standard, so it should not be advertised as native or first-class.
---
Outside diff comments:
In `@apps/www/content/docs/arkenv/how-to/load-environment-variables.mdx`:
- Around line 219-221: The schema uses z.url() (seen on the DATABASE_URL entry)
which is Zod 4-only; to remain consistent with the documented Zod version and
the standard.mdx example, replace z.url() with z.string().url() in the schema
(keep PORT as z.coerce.number().int().min(0).max(65535) unchanged) so the code
works with zod@^3.24.0 and matches the other example.
---
Nitpick comments:
In `@apps/www/content/docs/arkenv/integrations/standard-schema.mdx`:
- Line 39: The sentence "Ensure you're using `arktype@>=2.1.28`, or import from
`arkenv/standard` if you want to avoid ArkType" is repetitive with the previous
tip; rephrase it to vary wording and improve flow (e.g., "Use
`arktype@>=2.1.28`, or alternatively import from `arkenv/standard` to opt out of
ArkType") while keeping the same references (`arktype@>=2.1.28`,
`arkenv/standard`, and the notion of avoiding ArkType); update only that line in
the paragraph so the meaning stays identical but the phrasing differs from the
prior sentence.
In `@apps/www/content/docs/arkenv/standard.mdx`:
- Line 37: Update the zod version mention in the sentence that currently reads
"A validator that implements Standard Schema (e.g. `zod@^3.24.0`,
`valibot@^1.0.0`)." to explicitly include Zod 4 support (e.g. change the snippet
to something like `zod@^3.24.0 || ^4.0.0` or reword to "Zod 3.24+ (including Zod
4) and valibot@^1.0.0") so the docs reflect that both Zod v3.24+ and Zod v4 are
supported.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
apps/www/app/(home)/page.tsxapps/www/content/docs/arkenv/coercion.mdxapps/www/content/docs/arkenv/how-to/load-environment-variables.mdxapps/www/content/docs/arkenv/integrations/standard-schema.mdxapps/www/content/docs/arkenv/meta.jsonapps/www/content/docs/arkenv/quickstart.mdxapps/www/content/docs/arkenv/standard.mdxapps/www/content/docs/arkenv/validator-mode.mdxapps/www/content/docs/bun-plugin/index.mdxapps/www/content/docs/vite-plugin/index.mdxpackages/arkenv/ARCHITECTURE.mdpackages/arkenv/src/arktype/README.md
💤 Files with no reviewable changes (1)
- apps/www/content/docs/arkenv/validator-mode.mdx
| arkenv arktype | ||
| ``` | ||
| ArkEnv works best when [paired with ArkType](/docs/arkenv/validator-mode). | ||
| ArkEnv works best when [paired with ArkType](/docs/arkenv/standard). |
There was a problem hiding this comment.
Link target contradicts link text — "paired with ArkType" links to the ArkType-free entry point.
The anchor text says "paired with ArkType" but the href points to /docs/arkenv/standard, which is the dedicated page for using ArkEnv without ArkType. A user clicking this link will land on the exact opposite of what the text implies.
The previous target (/docs/arkenv/validator-mode) was removed in this PR, and /docs/arkenv/standard was used as a replacement, but it's semantically wrong here. The link should point to a page that explains the benefits of the ArkType-powered default entry point — not the ArkType-free alternative.
✏️ Suggested fix (example targets)
- ArkEnv works best when [paired with ArkType](/docs/arkenv/standard).
+ ArkEnv works best when paired with ArkType. See [arkenv/standard](/docs/arkenv/standard) if you want to skip ArkType.Or, if a dedicated ArkType integration/setup page exists, link to that instead.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ArkEnv works best when [paired with ArkType](/docs/arkenv/standard). | |
| ArkEnv works best when paired with ArkType. See [arkenv/standard](/docs/arkenv/standard) if you want to skip ArkType. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/www/content/docs/arkenv/quickstart.mdx` at line 15, The link text
"paired with ArkType" currently points to /docs/arkenv/standard (the
ArkType-free page); update the href for that anchor so it targets the ArkType
integration/setup page (the page that documents the ArkType-powered default
entry point) instead of /docs/arkenv/standard — locate the anchor with text
"paired with ArkType" in quickstart.mdx and replace its href with the correct
ArkType page URL (e.g., the dedicated ArkType integration route used in the
docs).
| | **ArkType DSL** | ✅ Native | ⚠️ Via `type(...)` | | ||
| | **ArkEnv keywords** (`"number.port"`, `"string.host"`) | ✅ Yes | ❌ No | | ||
| | **Standard Schema** (Zod, Valibot, Typia) | ✅ Yes | ✅ Yes | | ||
| | **Automatic coercion** | ✅ Yes | ❌ Validator-defined | |
There was a problem hiding this comment.
❌ Validator-defined sends a mixed signal in the coercion row.
The ❌ icon conventionally reads as "unavailable," but coercion IS available in arkenv/standard (e.g., z.coerce.number() in the usage example on line 30) — just driven by the validator rather than ArkEnv itself. Using ⚠️ instead would better communicate "available, but not automatic."
✏️ Suggested fix
-| **Automatic coercion** | ✅ Yes | ❌ Validator-defined |
+| **Automatic coercion** | ✅ Yes | ⚠️ Validator-defined |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | **Automatic coercion** | ✅ Yes | ❌ Validator-defined | | |
| | **Automatic coercion** | ✅ Yes | ⚠️ Validator-defined | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/www/content/docs/arkenv/standard.mdx` at line 18, Update the table row
for "Automatic coercion" so it no longer uses the ❌ (unavailable) icon; change
the icon to ⚠️ and keep the "Validator-defined" note to indicate coercion is
available but not automatic. Specifically, in the row currently showing "|
**Automatic coercion** | ✅ Yes | ❌ Validator-defined |", replace the third
cell's ❌ with ⚠️ (so it reads "| **Automatic coercion** | ✅ Yes | ⚠️
Validator-defined |") to match the example usage like z.coerce.number().
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/www/app/(home)/page.tsx (1)
28-28:newprop is redundant — the component default is alreadytrue.The
AnnouncementBadgecomponent declaresnew: newBadge = true, so passingnewexplicitly is a no-op. Drop it to avoid confusion.♻️ Proposed cleanup
- <AnnouncementBadge new href="docs/arkenv/standard#arkenvstandard"> + <AnnouncementBadge href="docs/arkenv/standard#arkenvstandard">🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/app/`(home)/page.tsx at line 28, The AnnouncementBadge usage passes the redundant boolean prop "new" even though the component's default sets newBadge = true; remove the explicit new prop from the <AnnouncementBadge> element in page.tsx to avoid a no-op and potential confusion—locate the JSX tag <AnnouncementBadge new href="docs/arkenv/standard#arkenvstandard"> and change it to omit the new prop so the component relies on its default.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/with-bun-react/package.json`:
- Line 14: Replace the semver range dependency "@arkenv/bun-plugin": "^0.1.5" in
package.json with the workspace protocol so the monorepo resolves the local
package; locate the dependency entry for "@arkenv/bun-plugin" and change its
value to "workspace:*" to reference the packages/bun-plugin workspace.
---
Nitpick comments:
In `@apps/www/app/`(home)/page.tsx:
- Line 28: The AnnouncementBadge usage passes the redundant boolean prop "new"
even though the component's default sets newBadge = true; remove the explicit
new prop from the <AnnouncementBadge> element in page.tsx to avoid a no-op and
potential confusion—locate the JSX tag <AnnouncementBadge new
href="docs/arkenv/standard#arkenvstandard"> and change it to omit the new prop
so the component relies on its default.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
examples/with-bun-react/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
apps/www/app/(home)/page.tsxexamples/with-bun-react/package.jsonpackages/arkenv/package.json
| }, | ||
| "dependencies": { | ||
| "@arkenv/bun-plugin": "^0.1.4", | ||
| "@arkenv/bun-plugin": "^0.1.5", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for `@arkenv/bun-plugin` package definition
echo "=== Searching for `@arkenv/bun-plugin` package definition ==="
fd 'package.json' --exclude 'node_modules' --exec grep -l '"name".*"@arkenv/bun-plugin"' {} \;
echo ""
echo "=== Listing packages/ directory structure ==="
fd 'package.json' 'packages/' -type f | head -20
echo ""
echo "=== Checking for bun-plugin in packages ==="
find packages -maxdepth 2 -type d -name '*bun*' 2>/dev/null
echo ""
echo "=== Listing all workspace package names ==="
fd 'package.json' 'packages/' -type f -exec sh -c 'echo "File: $1"; grep -A1 '"'"'"name"'"'"' "$1" | head -2' _ {} \;Repository: yamcodes/arkenv
Length of output: 669
Use workspace:* protocol for the workspace dependency @arkenv/bun-plugin.
This package is defined in the monorepo at packages/bun-plugin, so it must use the workspace:* protocol instead of a semver range.
Fix
- "@arkenv/bun-plugin": "^0.1.5",
+ "@arkenv/bun-plugin": "workspace:*",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@arkenv/bun-plugin": "^0.1.5", | |
| "@arkenv/bun-plugin": "workspace:*", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@examples/with-bun-react/package.json` at line 14, Replace the semver range
dependency "@arkenv/bun-plugin": "^0.1.5" in package.json with the workspace
protocol so the monorepo resolves the local package; locate the dependency entry
for "@arkenv/bun-plugin" and change its value to "workspace:*" to reference the
packages/bun-plugin workspace.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/www/content/docs/arkenv/integrations/standard-schema.mdx (1)
17-19:⚠️ Potential issue | 🟡 MinorSpecify Zod v4 in the install command since the example uses
z.url().The code example on line 32 uses
z.url(), which is a Zod v4 standalone API that does not exist in Zod v3 (where it'sz.string().url()instead). The install snippet should specifyzod@^4to ensure users get the correct version and avoid runtime errors.Suggested fix
```package-install -arkenv arktype zod +arkenv arktype zod@^4</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@apps/www/content/docs/arkenv/integrations/standard-schema.mdxaround lines
17 - 19, Update the package-install snippet to pin Zod v4 so the example using
z.url() matches the installed package; change the install command shown (the
backticked block containing "arkenv arktype zod") to specify zod@^4 (e.g.,
"arkenv arktype zod@^4") so the example using z.url() will work with Zod v4.</details> </blockquote></details> </blockquote></details>🧹 Nitpick comments (2)
apps/www/content/docs/arkenv/quickstart.mdx (2)
15-15: Fix resolves the previous semantic mismatch — consider linking to the ArkType setup docs for deeper guidance.The prior broken link (pointing to the ArkType-free
arkenv/standardpage) is now corrected. Optionally, pointing directly to the ArkType setup guide (https://arktype.io/docs/intro/setup) instead of the homepage would give readers a more actionable next step — consistent with the same reference already used on line 52.✏️ Optional improvement
- ArkEnv works best when paired with [ArkType](https://arktype.io). + ArkEnv works best when paired with [ArkType](https://arktype.io/docs/intro/setup).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/content/docs/arkenv/quickstart.mdx` at line 15, Update the ArkType link to point to the ArkType setup docs rather than the homepage: replace the existing link in the sentence "ArkEnv works best when paired with [ArkType](https://arktype.io)" so it uses "https://arktype.io/docs/intro/setup" to provide a direct, actionable setup guide (this change should match the reference already used on line 52 of the same document).
15-15: Fix resolves the prior semantic mismatch — optionally link directly to the ArkType setup guide.The link now correctly points to
https://arktype.ioinstead of the ArkType-freearkenv/standardpage. As a minor polish, linking to the setup guide (https://arktype.io/docs/intro/setup) — already referenced on line 52 — would give readers a more actionable next step.✏️ Optional improvement
- ArkEnv works best when paired with [ArkType](https://arktype.io). + ArkEnv works best when paired with [ArkType](https://arktype.io/docs/intro/setup).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/www/content/docs/arkenv/quickstart.mdx` at line 15, Update the ArkType link in the "ArkEnv works best when paired with [ArkType](https://arktype.io)" sentence to point directly to the ArkType setup guide URL (https://arktype.io/docs/intro/setup) so readers have an actionable next step; locate the exact text "ArkEnv works best when paired with [ArkType](https://arktype.io)" and replace the current href with the setup guide URL.🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Outside diff comments: In `@apps/www/content/docs/arkenv/integrations/standard-schema.mdx`: - Around line 17-19: Update the package-install snippet to pin Zod v4 so the example using z.url() matches the installed package; change the install command shown (the backticked block containing "arkenv arktype zod") to specify zod@^4 (e.g., "arkenv arktype zod@^4") so the example using z.url() will work with Zod v4. --- Nitpick comments: In `@apps/www/content/docs/arkenv/quickstart.mdx`: - Line 15: Update the ArkType link to point to the ArkType setup docs rather than the homepage: replace the existing link in the sentence "ArkEnv works best when paired with [ArkType](https://arktype.io)" so it uses "https://arktype.io/docs/intro/setup" to provide a direct, actionable setup guide (this change should match the reference already used on line 52 of the same document). - Line 15: Update the ArkType link in the "ArkEnv works best when paired with [ArkType](https://arktype.io)" sentence to point directly to the ArkType setup guide URL (https://arktype.io/docs/intro/setup) so readers have an actionable next step; locate the exact text "ArkEnv works best when paired with [ArkType](https://arktype.io)" and replace the current href with the setup guide URL.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/www/content/docs/arkenv/integrations/standard-schema.mdxapps/www/content/docs/arkenv/quickstart.mdxapps/www/content/docs/arkenv/standard.mdxapps/www/content/docs/vite-plugin/index.mdx🚧 Files skipped from review as they are similar to previous changes (2)
- apps/www/content/docs/arkenv/standard.mdx
- apps/www/content/docs/vite-plugin/index.mdx
Summary by CodeRabbit
Documentation
Chores