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
44 changes: 0 additions & 44 deletions .changeset/dull-socks-return.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/social-teeth-peel.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
"arkenv": "^0.3.0",
"arkenv": "^0.4.0",
"arktype": "^2.1.22"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "bun build index.ts --outdir ./dist"
},
"dependencies": {
"arkenv": "^0.3.0",
"arkenv": "^0.4.0",
"arktype": "^2.0.4",
"chalk": "^5.4.1"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/with-vite-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
"@arkenv/vite-plugin": "^0.0.6",
"arkenv": "^0.3.0",
"@arkenv/vite-plugin": "^0.0.7",
"arkenv": "^0.4.0",
"arktype": "^2.0.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Expand Down
45 changes: 45 additions & 0 deletions packages/arkenv/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# ArkEnv

## 0.4.0

### Minor Changes

- ## Improved type inference and scope-based validation _[`#129`](https://github.com/yamcodes/arkenv/pull/129) [`dd15b60`](https://github.com/yamcodes/arkenv/commit/dd15b608281b04eaac1bf93d3911a234e7e7565d) [@yamcodes](https://github.com/yamcodes)_

The `createEnv` function got a facelift with better TypeScript inference and introduced a new scope-based validation system.

**Key improvements:**

- **Better ecosystem integration**: Use `string.host` and `number.port` in your schemas, as if they were native ArkType keywords
- **Cleaner API**: No need to awkwardly import `host` and `port` types anymore

### Before:

`host` and `port` had to be manually imported from the `arkenv` package, and used as arguments to the `createEnv` function.

```ts
import { createEnv, host, port } from "arkenv";

const env = createEnv({
HOST: host, // Validates IP addresses or "localhost"
PORT: port, // Validates port numbers (0-65535)
NODE_ENV: "string", // Standard string validation
});
```

### After:

Now you can use `string.host` and `number.port` in your schemas, in a way that is much more natural and idiomatic within the ArkType ecosystem.

```ts
import { createEnv } from "arkenv";

const env = createEnv({
HOST: "string.host", // Validates IP addresses or "localhost"
PORT: "number.port", // Validates port numbers (0-65535)
NODE_ENV: "string", // Standard string validation
});
```

### BREAKING CHANGE:

- We are no longer exporting `host` and `port` types. Use `string.host` and `number.port` instead.

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/arkenv/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "arkenv",
"type": "module",
"version": "0.3.0",
"version": "0.4.0",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
18 changes: 18 additions & 0 deletions packages/vite-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @arkenv/vite-plugin

## 0.0.7

### Patch Changes

- Upgraded ArkType peer dependency from `^2.0.0` to `^2.1.22` for compatibility with the latest version of ArkEnv _[`#129`](https://github.com/yamcodes/arkenv/pull/129) [`dd15b60`](https://github.com/yamcodes/arkenv/commit/dd15b608281b04eaac1bf93d3911a234e7e7565d) [@yamcodes](https://github.com/yamcodes)_

<details><summary>Updated 1 dependency</summary>

<small>

[`dd15b60`](https://github.com/yamcodes/arkenv/commit/dd15b608281b04eaac1bf93d3911a234e7e7565d)

</small>

- `arkenv@0.4.0`

</details>

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arkenv/vite-plugin",
"version": "0.0.6",
"version": "0.0.7",
"author": "Yam Borodetsky <yam@yam.codes>",
"repository": {
"type": "git",
Expand Down