Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .changeset/shiny-brooms-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"arkenv": minor
---

#### Remove `ArkEnvError` import from "arkenv"

The `ArkEnvError` class is now only available via:

```ts
import { ArkEnvError } from "arkenv/core";
```
26 changes: 17 additions & 9 deletions packages/arkenv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"build": "tsdown",
"size": "size-limit --json > .size-limit.json",
"size": "size-limit",
"test:once": "pnpm test",
"typecheck": "tsc --noEmit",
"clean": "rimraf dist node_modules",
Expand Down Expand Up @@ -83,17 +83,25 @@
},
"size-limit": [
{
"path": [
"dist/index.mjs",
"dist/standard.mjs",
"dist/core.mjs"
],
"limit": "3 kB",
"name": "arkenv",
"path": "dist/index.mjs",
"limit": "2 kB",
"import": "*",
"ignore": [
"arktype",
"node:module"
"arktype"
]
},
{
"name": "arkenv/standard",
"path": "dist/standard.mjs",
"limit": "1.1 kB",
"import": "*"
},
{
"name": "arkenv/core",
"path": "dist/core.mjs",
"limit": "500 B",
"import": "*"
}
]
}
3 changes: 2 additions & 1 deletion packages/arkenv/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const formatInternalErrors = (errors: ValidationIssue[]): string =>
*
* @example
* ```ts
* import arkenv, { ArkEnvError } from 'arkenv';
* import arkenv from 'arkenv';
* import { ArkEnvError } from 'arkenv/core';
*
* try {
* const env = arkenv({
Expand Down
1 change: 0 additions & 1 deletion packages/arkenv/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export { createEnv };
* https://arktype.io/docs/type-api
*/
export const type = $.type;
export { ArkEnvError } from "./core";
export type { ArkEnvConfig, EnvSchema } from "./create-env";

/**
Expand Down
3 changes: 1 addition & 2 deletions packages/bun-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
"arktype",
"node:path",
"node:fs",
"node:process",
"node:module"
"node:process"
]
}
]
Expand Down
3 changes: 1 addition & 2 deletions packages/vite-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
"import": "*",
"ignore": [
"vite",
"arktype",
"node:module"
"arktype"
]
}
]
Expand Down
Loading