Repository navigation
Conversation
Delete the phantom safe option from public config types so /safe subpaths remain the only safe-mode entry points. Fixes #1917. Co-authored-by: Yam Borodetsky <[email protected]>
🦋 Changeset detectedLatest commit: 3fb5ca6 The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This PR removes the reserved phantom safe?: false field from the public main-factory config types and updates docs, tests, and the changeset to match. Reviewed the full 18-file diff, plus linked issue #1917 and its plan comment.
- Config types: dropped
safe?: falsefromArkEnvConfig(packages/core/src/arkenv.ts),ParseStandardConfig(packages/internal/utils/src/parse-standard.ts), and Nuxt's localCoreArkenvtype; reworded therecordIfCapturingJSDoc that referenced migrating off{ safe: true }. - No-op alias collapses:
SafeArkenvConfig/SafeStandardEnvConfigand the Vite/Bun/Rsbuild*PluginFactoryConfigtypes drop their now-redundantOmit<..., "safe">wrappers (structurally identical, so plugin public shapes are unchanged). StandardEnvConfig: now a plain alias ofParseStandardConfig, with reworded JSDoc.- Docs: removed the
### safesection and shared-fields mention inreference/options, relocated the framework-plugins/safeCallout to the section intro, and droppedsafefrom the validators index,defining-your-schema, and the three plugin reference tables. - Tests: added
not.toHaveProperty("safe")type-regression guards forArkEnvConfigand a newpackages/standard/src/type-regression.test-d.ts. - Changeset: new
.changeset/pre/remove-reserved-safe-false.mdwith major bumps for@arkenv/coreand@arkenv/standardand a migration diff.
Verification: turbo run typecheck --filter=@arkenv/core --filter=@arkenv/standard passes (including the new src/*.test-d.ts files). The negative assertion was confirmed to fail (TS2554) when safe is present, so it is a real regression guard rather than theatre. A grep sweep found zero remaining safe?: declarations, Omit<..., "safe"> wrappers, .safe runtime reads, or docs listing safe as a main-factory option. The { safe: true } mentions in docs/CONTEXT.md / ADR 0017 are pre-existing and were already stale before this PR, so they are out of scope here.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental review of the commit pushed after the prior review. Delta since dc5a639:
3fb5ca6—[autofix.ci] apply automated fixes: cosmetic only. Trimmed the Markdown table column widths inreference/bun-plugin,reference/rsbuild-plugin, andreference/vite-plugin(thePlusrow still reads "AllArkEnvConfigfields", nosafe), and re-sorted imports inpackages/core/src/type-regression.test-d.tsandpackages/standard/src/type-regression.test-d.ts.
No semantic or behavioral change in the delta. Re-ran turbo run typecheck --filter=@arkenv/core --filter=@arkenv/standard (pass) and mdxlint over the six changed MDX files (no issues found) at this head.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Use expectTypeOf.not.toHaveProperty for safe regressions, restore /safe pointer on StandardEnvConfig JSDoc, and tighten the changeset. Co-authored-by: Yam Borodetsky <[email protected]>
|
Closing as a duplicate of #1924 (same change for #1912; #1917 was already closed as a duplicate of that issue). Useful bits from this PR (cleaner |

Fixes #1917
Removes the reserved phantom
safe?: falsefield from public main-factory config types (ArkEnvConfig/StandardEnvConfig/ParseStandardConfig). Safe-mode remains available only via@arkenv/core/safeand@arkenv/standard/safe.Changes
safe?: falsefrom core, standard, and shared parse-standard config typesOmit<..., "safe">wrappers in/safeentry points and plugin factory configssafeis no longer listedsafeis not a config propertysafe: falsefrom call sites)Out of scope
/safebehavior and return shapeValidation
pnpm run typecheck— passpnpm run check/pnpm run fix— passpnpm run testlocally hit unrelated env-resolution flakes in vite-plugin temp fixtures and one CLI check exit-code assertion; relying on CI for the authoritative suite