-
Notifications
You must be signed in to change notification settings - Fork 5
arkenv/standard dedicated import #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
9cef134
feat: implement three-tier export architecture with dedicated entries…
yamcodes 0bd952e
feat: reorganize ArkEnv export surface into three tiers with dedicate…
yamcodes 326a999
feat: add single validation implementation requirement for main and s…
yamcodes bc551cd
feat: implement three-tier export architecture with dedicated entries…
yamcodes 8541b2b
feat: complete implementation of three-tier export architecture with …
yamcodes 12d6272
fix: reorder exports in core and index files for consistency
yamcodes d67ea7b
Merge branch 'main' into arkenv-standard-import
yamcodes 9c3f296
fix: update import paths to use "arkenv" instead of "arkenv/arktype" …
yamcodes 3558137
fix: update import paths to use "arkenv" instead of "arkenv/arktype" …
yamcodes 824ce87
fix: update import statements to use "arkenv" for consistency across …
yamcodes 141a170
fix: consolidate arkenv imports in Vite configuration files for consi…
yamcodes f575cc4
fix: update import statements to remove file extensions for consistency
yamcodes d884933
fix: add assertion to ensure bundle contains no arktype references
yamcodes e5edfe7
fix: refactor export surface by removing arktype sub-path and adding …
yamcodes 6d953e0
fix: enhance import structure and formatting for consistency across f…
yamcodes 4525906
Typecheck fixes
yamcodes cbbd408
bump limit to 3k
yamcodes 4ef4ac8
CR changes
yamcodes 324fd6f
Update docs to reflect new type name
yamcodes 3999074
style: standardize em dash to hyphen in docs and code
yamcodes 61cf498
docs: document new entry points for arktype and standard
yamcodes 0db0820
docs: Correct hyphen in arkenv/core description
yamcodes ff60f50
docs: document `arkenv/standard` entrypoint
yamcodes 8d4aea1
docs: clarify arkenv import instructions
yamcodes 1bc288c
refactor(arkenv): improve type definitions and robustness
yamcodes c0ffb61
docs(imports): consolidate arkenv imports
yamcodes 468938f
docs: update arktype export & dependency docs
yamcodes a968bbf
docs: update arkenv quickstart and vite docs
yamcodes 77ada53
Merge branch 'main' into arkenv-standard-import
yamcodes 0b83d15
address all code review notes in files
yamcodes 0d5a8de
make 'src/index.ts' the sot for 'type'
yamcodes 85acc4c
remove 'validator: "standard"' option from main 'createEnv'
yamcodes 6fe2c6f
fix build and failing tests
yamcodes da40c64
address modified plan in commit
yamcodes 7bdb199
sync examples
yamcodes 7e83152
Merge branch 'main'
yamcodes e1b78d3
fix typecheck
yamcodes 03c7d8d
fix formatting
yamcodes 204640c
take care of all validator: "standard" references
yamcodes 477f7b3
fix low-risk redos pattern
yamcodes 02704b4
fix cr comments
yamcodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| "arkenv": minor | ||
| "@arkenv/vite-plugin": patch | ||
| --- | ||
|
|
||
| #### Add `arkenv/standard` import for non-ArkType consumers | ||
|
|
||
| `arkenv` now ships three separate imports: | ||
|
|
||
| - **`arkenv`** (main): ArkType-first. Includes `createEnv`, `type`, and `ArkEnvError`. The `type` helper, previously at `arkenv/arktype`, has moved here. | ||
| - **`arkenv/standard`**: ArkType-free. A standalone `createEnv` for Standard Schema validators (Zod, Valibot, etc.) with zero ArkType in the bundle. | ||
| - **`arkenv/core`**: Mode-agnostic primitives - `ArkEnvError` and `ValidationIssue`. | ||
|
|
||
| **For Standard Schema users** (Zod, Valibot, etc.), import from `arkenv/standard` directly, without passing `{ validator: "standard" }` on every call: | ||
|
|
||
| ```ts | ||
| // ❌ Before | ||
| import { createEnv } from "arkenv"; | ||
| import { z } from "zod"; | ||
|
|
||
| const env = createEnv( | ||
| { PORT: z.coerce.number() }, | ||
| { validator: "standard" }, | ||
| ); | ||
|
|
||
| // ✅ After | ||
| import { createEnv } from "arkenv/standard"; | ||
| import { z } from "zod"; | ||
|
|
||
| const env = createEnv({ PORT: z.coerce.number() }); | ||
| ``` | ||
|
|
||
| **For `arkenv/arktype` users**, the `type` helper has moved to the main entry: | ||
|
|
||
| ```ts | ||
| // ❌ Before | ||
| import { type } from "arkenv/arktype"; | ||
|
|
||
| // ✅ After | ||
| import { type } from "arkenv"; // 'type' is the ArkEnv helper, not a TS type modifier | ||
| ``` | ||
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.