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
22 changes: 0 additions & 22 deletions .changeset/clever-ties-search.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/fast-cloths-decide.md

This file was deleted.

22 changes: 22 additions & 0 deletions packages/arkenv/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# ArkEnv

## 0.7.6

### Patch Changes

- #### Support type definitions for schema reuse _[`2424391`](https://github.com/yamcodes/arkenv/commit/24243912101b8a1ef944a3d4d15747196a1a2215) [@yamcodes](https://github.com/yamcodes)_

`arkenv()` and `@arkenv/vite-plugin` now accept both raw schema objects and type definitions created with ArkType's `type()` function. This allows you to define your schema once and reuse it across your application, which is especially useful for multi-runtime setups like Vite where you need the same schema in both `vite.config.ts` and client code.

```ts
import arkenv, { type } from "arkenv";

// Define schema once
const Env = type({
PORT: "number.port",
HOST: "string.host",
});

// Reuse it in multiple places
const configEnv = arkenv(Env, process.env);
const testEnv = arkenv(Env, { PORT: "3000", HOST: "localhost" });
```

## 0.7.5

### Patch 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.7.5",
"version": "0.7.6",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
38 changes: 38 additions & 0 deletions packages/vite-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @arkenv/vite-plugin

## 0.0.17

### Patch Changes

- #### Support type definitions for schema reuse _[`2424391`](https://github.com/yamcodes/arkenv/commit/24243912101b8a1ef944a3d4d15747196a1a2215) [@yamcodes](https://github.com/yamcodes)_

`arkenv()` and `@arkenv/vite-plugin` now accept both raw schema objects and type definitions created with ArkType's `type()` function. This allows you to define your schema once and reuse it across your application, which is especially useful for multi-runtime setups like Vite where you need the same schema in both `vite.config.ts` and client code.

```ts
import arkenv, { type } from "arkenv";

// Define schema once
const Env = type({
PORT: "number.port",
HOST: "string.host",
});

// Reuse it in multiple places
const configEnv = arkenv(Env, process.env);
const testEnv = arkenv(Env, { PORT: "3000", HOST: "localhost" });
```

- #### Fix security issue where server-only environment variables were exposed to client code _[`#386`](https://github.com/yamcodes/arkenv/pull/386) [`efc75c9`](https://github.com/yamcodes/arkenv/commit/efc75c91d3f6b01e541d946a55c196579f86556f) [@yamcodes](https://github.com/yamcodes)_

The plugin now automatically filters to only expose variables matching Vite's configured prefix (defaults to `VITE_`), preventing sensitive server-side configuration from leaking into the client bundle.

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

<small>

[`2424391`](https://github.com/yamcodes/arkenv/commit/24243912101b8a1ef944a3d4d15747196a1a2215)

</small>

- `arkenv@0.7.6`

</details>

## 0.0.16

### 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.16",
"version": "0.0.17",
"author": "Yam Borodetsky <yam@yam.codes>",
"repository": {
"type": "git",
Expand Down