Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
2f2a213
refactor: implement an adapter pattern for schema coercion and intern…
yamcodes Jan 6, 2026
33241e9
refactor: improve error handling and type import
yamcodes Jan 6, 2026
5b49975
refactor: Replace `any` with `$` from `@repo/scope` in `EnvSchema` an…
yamcodes Jan 6, 2026
8b4541f
refactor: rename `createEnv` to `defineEnv` in tests
yamcodes Jan 6, 2026
eb8e653
style: sort imports and exports
yamcodes Jan 6, 2026
9ea6040
style(adapters): Use type alias for SchemaAdapter
yamcodes Jan 6, 2026
1e840cf
refactor: Rename `arkenv` and `createEnv` to `defineEnv` for improved…
yamcodes Jan 6, 2026
39410ea
feat: Unify `arkenv` and `defineEnv` into a single `arkenv` entry poi…
yamcodes Jan 6, 2026
f26da4c
refactor(arkenv): Standardize env definition to arkenv
yamcodes Jan 6, 2026
cbaf60d
refactor(arkenv): consolidate env definition api
yamcodes Jan 6, 2026
135387f
test(arkenv): remove wrapped schema error test
yamcodes Jan 6, 2026
dea4a9e
style: apply consistent code formatting
yamcodes Jan 6, 2026
8e573be
style: Adjust import order in vite-plugin and remove extraneous blank…
yamcodes Jan 6, 2026
1b3ec12
Merge branch 'main' into optional-arkenv
yamcodes Jan 6, 2026
f58539f
feat(arkenv): expose arkenv main function
yamcodes Jan 6, 2026
952e306
refactor(arkenv): require mapping for arkenv() input
yamcodes Jan 8, 2026
af19930
feat(arkenv): Improve schema and validator support
yamcodes Jan 8, 2026
c2c69e5
fix(arkenv): set ArkEnvError class name
yamcodes Jan 8, 2026
2b65905
refactor(arkenv/errors): remove deprecated formatErrors function
yamcodes Jan 8, 2026
2e880c3
feat(arkenv): export formatIssues function
yamcodes Jan 8, 2026
ddf6f43
docs(arkenv): deprecate `createEnv` in favor of `arkenv`
yamcodes Jan 8, 2026
46d7032
style(test): format test expectations
yamcodes Jan 8, 2026
bb417f5
refactor(arkenv): remove redundant import
yamcodes Jan 8, 2026
27f1ae3
refactor(arkenv): inline schema validation adapters
yamcodes Jan 8, 2026
e7a9979
refactor(errors): simplify error handling
yamcodes Jan 8, 2026
449b58c
docs(coerce): clarify lazy loading support
yamcodes Jan 8, 2026
320ab09
refactor(errors): normalize error reporting
yamcodes Jan 8, 2026
814a301
feat(api): export createEnv function
yamcodes Jan 8, 2026
ac0f0e0
refactor: Standardize and refactor internal utilities
yamcodes Jan 8, 2026
b5f7c4a
test(vite-plugin): add real schema validator test
yamcodes Jan 8, 2026
735fd61
refactor(env): extract validator type detection
yamcodes Jan 9, 2026
7c2ba27
test(arkenv): Improve error assertions
yamcodes Jan 9, 2026
60d2647
test(arkenv): improve error throwing assertions
yamcodes Jan 9, 2026
3e041b1
test(arkenv): improve error throwing test logic
yamcodes Jan 9, 2026
61e14ac
Delete test
yamcodes Jan 9, 2026
899e80d
Merge branch 'main' into optional-arkenv
yamcodes Jan 9, 2026
d56066b
build: update zod dependency to 4.3.5
yamcodes Jan 9, 2026
54281c6
refactor(test): use toThrow for error assertions
yamcodes Jan 9, 2026
7fcd1d2
test(arkenv): refactor error throwing tests
yamcodes Jan 9, 2026
80f4f83
feat(arkenv): optimize for optional arktype and standard schema support
yamcodes Jan 9, 2026
4659bfd
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 9, 2026
db8a456
chore: extract cleanup andNaming refactors to separate branch
yamcodes Jan 9, 2026
18a04f1
chore: fix tests after naming revert
yamcodes Jan 9, 2026
d054b5d
feat: make arkenv default export and improve errors
yamcodes Jan 9, 2026
e71c510
refactor(arkenv): rename createEnv to arkenv
yamcodes Jan 9, 2026
78646aa
feat: Add Zod schema support for Vite/Bun plugins
yamcodes Jan 9, 2026
74dcbc5
test(bun-plugin): add test for Zod schema
yamcodes Jan 9, 2026
7d1db99
build: update dependencies and fix references
yamcodes Jan 9, 2026
4ca223d
test: improve test clarity and consistency
yamcodes Jan 9, 2026
1209f26
style(github-alerts): reformat font family declaration
yamcodes Jan 9, 2026
048b523
build(deps): update arkenv and zod versions
yamcodes Jan 9, 2026
3835cee
build(deps): update dependencies
yamcodes Jan 9, 2026
19fb4ce
build: update vite to 7.3.1
yamcodes Jan 9, 2026
27dcc0f
build: update dependencies
yamcodes Jan 9, 2026
2d2126c
feat: improve type inference and schema support
yamcodes Jan 9, 2026
329a8aa
refactor(types): improve InferType and type augmentation
yamcodes Jan 9, 2026
1fe3d79
refactor(types): simplify type inference logic
yamcodes Jan 9, 2026
371d3f4
feat(types): improve type inference and filtering
yamcodes Jan 9, 2026
44d73e4
refactor(types): handle any type in FilterByPrefix
yamcodes Jan 9, 2026
defd6ad
refactor(arkenv): improve type safety in create-env
yamcodes Jan 9, 2026
44f2cdd
refactor(arkenv): improve createEnv type inference
yamcodes Jan 9, 2026
846b136
refactor(arkenv): improve validator type detection
yamcodes Jan 9, 2026
0634a71
fix(arkenv): refine arktype module not found check
yamcodes Jan 9, 2026
bd03797
test(standard-schema): add validation failure test
yamcodes Jan 9, 2026
6be8ffa
feat(coerce): validate schema for toJsonSchema
yamcodes Jan 9, 2026
8dc3683
feat(coerce): improve schema validation and arktype dependency
yamcodes Jan 9, 2026
a50a39c
refactor(arkenv): remove unused validateStandard function
yamcodes Jan 9, 2026
4f30c4a
fix(arkenv): simplify arktype dependency check
yamcodes Jan 9, 2026
71c8006
refactor(coerce): simplify arktype require catch block
yamcodes Jan 9, 2026
d5c0ebc
feat(vite-plugin): integrate Zod for env var validation
yamcodes Jan 9, 2026
799c4e3
refactor(arkenv): improve ArkType validator detection
yamcodes Jan 9, 2026
36e3a9f
refactor(scope): lazy load ArkType dependency
yamcodes Jan 9, 2026
989160f
feat(scope): define ArkEnvScope and improve type safety
yamcodes Jan 9, 2026
5c6e05d
refactor(arkenv): Improve validator type detection
yamcodes Jan 9, 2026
da309c0
Merge branch 'main' into optional-arkenv
yamcodes Jan 9, 2026
ca5151e
Merge branch 'main' into optional-arkenv
yamcodes Jan 9, 2026
2197b0c
Merge branch 'main' into optional-arkenv
yamcodes Jan 9, 2026
eac1877
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
c6f9279
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
fbccf68
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 10, 2026
990b5a9
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
127fda4
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
7940446
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
9090795
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
21140da
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
bd6c405
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
74b2d34
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
5c4e7dd
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
6f4e8c9
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
34c7d34
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
48b5aee
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
ee99bd0
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
fb8b799
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
e3681e0
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
918ece4
Merge branch 'main' into optional-arkenv
yamcodes Jan 10, 2026
ecce88e
Merge branch 'main' into optional-arkenv
yamcodes Jan 12, 2026
7b0afc6
refactor(deps): internalize Standard Schema types`
yamcodes Jan 12, 2026
0ae6998
docs(types): add standard-schema spec link
yamcodes Jan 12, 2026
da6b3f8
style(lint): disable biome lint for copied types
yamcodes Jan 12, 2026
c928e18
feat(arkenv): add no-arktype playground
yamcodes Jan 12, 2026
869dff1
feat(examples): add without-arktype example
yamcodes Jan 12, 2026
a8f67ad
feat: introduce lazy ArkType loading
yamcodes Jan 12, 2026
b201bcc
feat(arkenv): add standard schema validation without arktype
yamcodes Jan 12, 2026
8ae32c8
refactor(arkenv): decouple arktype from default build
yamcodes Jan 13, 2026
c59a4af
refactor(lazy-type): cache ArkType module loading
yamcodes Jan 13, 2026
50be0c5
feat(arkenv): make ArkType an optional dependency
yamcodes Jan 13, 2026
830548b
refactor: improve internal type and logic consistency
yamcodes Jan 13, 2026
906f537
feat(arkenv): add advanced coercion and config options
yamcodes Jan 13, 2026
24a3722
refactor: Improve internal code clarity and maintainability
yamcodes Jan 13, 2026
da5ca1f
feat: improve createEnv type inference and schema flexibility
yamcodes Jan 13, 2026
8c28508
fix(lazy-type): prevent piping after type realization
yamcodes Jan 13, 2026
0206904
fix(types): update InferType for StandardSchemaV1
yamcodes Jan 13, 2026
f5b5b3d
docs(arkenv): update JSDoc for createEnv and deps
yamcodes Jan 13, 2026
54815b1
refactor(arkenv): improve JSDoc for config and fn
yamcodes Jan 13, 2026
2363ddf
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 13, 2026
135c17c
build(keywords): bundle @repo/scope in config
yamcodes Jan 13, 2026
950323d
chore(vite-plugin): remove duplicate keyword
yamcodes Jan 13, 2026
0f387cd
refactor(arkenv): relocate internal morph fns
yamcodes Jan 13, 2026
77539a0
test(arkenv/morphs): add unit tests for morph functions
yamcodes Jan 13, 2026
bf1f788
build(vitest): enable TS path aliases
yamcodes Jan 13, 2026
4ab9ecf
style(arkenv): reorder imports
yamcodes Jan 13, 2026
b32c1d5
refactor: remove @repo/keywords package
yamcodes Jan 13, 2026
4a8ee5b
refactor(internal): remove keywords package
yamcodes Jan 13, 2026
7bddd09
test(vitest): enable tsconfig paths plugin
yamcodes Jan 13, 2026
11590ad
refactor(arkenv): use Dict type for env variables
yamcodes Jan 13, 2026
30d392f
docs: Improve JSDoc comments for ArkEnvConfig
yamcodes Jan 13, 2026
dc3189b
docs(arkenv): improve onUndeclaredKey documentation
yamcodes Jan 13, 2026
88c5447
feat(arkenv): refactor coerce configuration
yamcodes Jan 13, 2026
f7f11dc
feat(coerce): Move arrayFormat to coerce config
yamcodes Jan 13, 2026
b38b221
refactor(arkenv): improve arrayFormat coercion logic
yamcodes Jan 13, 2026
732efd3
chore: Add npm test task and improve coerce logic
yamcodes Jan 13, 2026
74cf8ef
refactor(coerce): improve value coercion logic
yamcodes Jan 13, 2026
cfacdd3
fix(scope): assert port with number type
yamcodes Jan 13, 2026
16d7abf
refactor: Rename morph functions to be more descriptive
yamcodes Jan 13, 2026
b2159c6
docs(arkenv): Update type validator documentation
yamcodes Jan 13, 2026
900d939
refactor(arkenv): improve coercion config typing
yamcodes Jan 13, 2026
941a61f
fix(arkenv): remove unnecessary type assertion
yamcodes Jan 13, 2026
ce54c20
feat(arkenv): introduce coerce option
yamcodes Jan 13, 2026
1fdaaf4
fix(arkenv): preserve env var path in validation issues
yamcodes Jan 13, 2026
53c8bc4
fix(arkenv): Improve error message for empty schema
yamcodes Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
*.log


# environment variables
Expand Down
7 changes: 7 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
"problemMatcher": [],
"label": "changeset",
"detail": "changeset"
},
{
"type": "npm",
"script": "test",
"problemMatcher": [],
"label": "test",
"detail": "vitest"
}
]
}
4 changes: 3 additions & 1 deletion apps/www/content/docs/arkenv/coercion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ import arkenv from "arkenv";
const env = arkenv(
{ TAGS: "string[]" },
{
arrayFormat: "json",
coerce: {
arrayFormat: "json",
},
env: { TAGS: '["web", "app"]' }
}
);
Expand Down
8 changes: 4 additions & 4 deletions arkenv.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
"path": "packages/internal/scope",
"name": " @repo/scope"
},
{
"path": "packages/internal/keywords",
"name": " @repo/keywords"
},
{
"path": "tooling",
"name": "tooling"
Expand Down Expand Up @@ -129,6 +125,10 @@
"path": "examples/with-standard-schema",
"name": " with-standard-schema"
},
{
"path": "examples/without-arktype",
"name": " without-arktype"
},
{
"path": "examples/stackblitz",
"name": " stackblitz"
Expand Down
3 changes: 2 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ This directory contains a collection of example projects that demonstrate variou
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [basic](https://github.com/yamcodes/arkenv/tree/main/examples/basic) | Minimal example of _using ArkEnv in a [Node.js](https://nodejs.org/) app_ for learning the fundamentals. |
| [with-standard-schema](https://github.com/yamcodes/arkenv/tree/main/examples/with-standard-schema) | Example of _mixing ArkType with [Standard Schema](https://standardschema.dev/) validators like [Zod](https://zod.dev/)_. |
| [without-arktype](https://github.com/yamcodes/arkenv/tree/main/examples/without-arktype) | Example of _using ArkEnv without ArkType_, using [Zod](https://zod.dev/) for validation. |
| [with-bun](https://github.com/yamcodes/arkenv/tree/main/examples/with-bun) | Minimal example of _using ArkEnv in a [Bun](https://bun.sh/) app_. |
| [with-bun-react](https://github.com/yamcodes/arkenv/tree/main/examples/with-bun-react) | Minimal example of _using ArkEnv in a [Bun + React](https://bun.com/docs/guides/ecosystem/react) full-stack app_. |
| [with-vite-react](https://github.com/yamcodes/arkenv/tree/main/examples/with-vite-react) | Minimal example of _using ArkEnv in a [Vite](https://vite.dev/) + [React](https://react.dev/) app_. |
| [with-solid-start](https://github.com/yamcodes/arkenv/tree/main/examples/with-solid-start) | Minimal example of _using ArkEnv in a [SolidStart](https://start.solidjs.com) app_. |
| [with-solid-start](https://github.com/yamcodes/arkenv/tree/main/examples/with-solid-start) | Minimal example of _using ArkEnv in a [SolidStart](https://start.solidjs.com) app_. |

> These examples are written in TypeScript, [the recommended way to work with ArkEnv](https://github.com/yamcodes/arkenv/blob/main/packages/arkenv/README.md#typescript-requirements). That said, ArkEnv works with plain JavaScript. See the [basic-js](https://github.com/yamcodes/arkenv/tree/main/examples/basic-js) example for details and tradeoffs.

Expand Down
Loading