Skip to content

Commit 56fd8b8

Browse files
Version Packages (alpha)
1 parent 882c0ce commit 56fd8b8

9 files changed

Lines changed: 265 additions & 54 deletions

File tree

.changeset/pre.json

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,61 @@
11
{
2-
"mode": "pre",
3-
"tag": "alpha",
4-
"initialVersions": {
5-
"arkenv-cli-playground": "0.0.0",
6-
"bun-react-playground": "0.1.0",
7-
"vite-playground": "0.0.0",
8-
"vite-legacy-playground": "0.0.0",
9-
"@repo/playwright-www": "0.0.0",
10-
"www": "0.0.0",
11-
"arkenv": "0.11.1",
12-
"@arkenv/bun-plugin": "0.1.7",
13-
"@arkenv/cli": "0.2.10",
14-
"@arkenv/fumadocs-ui": "0.0.8",
15-
"@repo/scope": "0.1.3",
16-
"@repo/types": "0.1.0",
17-
"@arkenv/nextjs": "0.0.7",
18-
"@arkenv/vite-plugin": "0.1.1",
19-
"@arkenv/build": "0.0.1",
20-
"@arkenv/nuxt": "0.0.1",
21-
"@arkenv/core": "1.0.0-alpha.2",
22-
"@repo/utils": "0.1.3",
23-
"@arkenv/standard": "1.0.0-alpha.2",
24-
"@repo/log": "0.0.1"
25-
},
26-
"changesets": [
27-
"add-host-preset-add-command",
28-
"drop-example-e-alias",
29-
"epg3nspi",
30-
"fix-nuxt-proxy-coercion",
31-
"forward-port-hosting-presets",
32-
"forward-port-keywords-typetable",
33-
"host-preset-alias",
34-
"improve-npm-keywords",
35-
"init-v1",
36-
"injectable-logger-api",
37-
"machine-actionable-error-codes",
38-
"nuxt-augment-config-key",
39-
"nuxt-flat-layout-cli-alignment",
40-
"nuxt-module-options-jsdoc-v1",
41-
"nuxt-strict-auto-extend",
42-
"reconcile-v0-features",
43-
"remove-framework-shared-exports",
44-
"rename-create-env-to-arkenv",
45-
"standard-mode-flat-layout",
46-
"standard-mode-packaging",
47-
"trim-short-flag-aliases",
48-
"unified-error-normalization",
49-
"unify-coercion",
50-
"valibot-example-registry"
51-
]
2+
"mode": "pre",
3+
"tag": "alpha",
4+
"initialVersions": {
5+
"arkenv-cli-playground": "0.0.0",
6+
"bun-react-playground": "0.1.0",
7+
"vite-playground": "0.0.0",
8+
"vite-legacy-playground": "0.0.0",
9+
"@repo/playwright-www": "0.0.0",
10+
"www": "0.0.0",
11+
"arkenv": "0.11.1",
12+
"@arkenv/bun-plugin": "0.1.7",
13+
"@arkenv/cli": "0.2.10",
14+
"@arkenv/fumadocs-ui": "0.0.8",
15+
"@repo/scope": "0.1.3",
16+
"@repo/types": "0.1.0",
17+
"@arkenv/nextjs": "0.0.7",
18+
"@arkenv/vite-plugin": "0.1.1",
19+
"@arkenv/build": "0.0.1",
20+
"@arkenv/nuxt": "0.0.1",
21+
"@arkenv/core": "1.0.0-alpha.2",
22+
"@repo/utils": "0.1.3",
23+
"@arkenv/standard": "1.0.0-alpha.2",
24+
"@repo/log": "0.0.1"
25+
},
26+
"changesets": [
27+
"add-host-preset-add-command",
28+
"add-host-presets-phase-4",
29+
"add-host-strict-layouts-forward-port",
30+
"bun-env-module-transform",
31+
"drop-example-e-alias",
32+
"epg3nspi",
33+
"fix-nuxt-proxy-coercion",
34+
"forward-port-hosting-presets",
35+
"forward-port-keywords-typetable",
36+
"host-preset-alias",
37+
"improve-npm-keywords",
38+
"init-v1",
39+
"injectable-logger-api",
40+
"machine-actionable-error-codes",
41+
"nuxt-augment-config-key",
42+
"nuxt-boot-gate-thin-accessors",
43+
"nuxt-flat-layout-cli-alignment",
44+
"nuxt-module-options-jsdoc-v1",
45+
"nuxt-skip-setup-before-boot-gate",
46+
"nuxt-strict-auto-extend",
47+
"nuxt-strict-client-shared-auto-extend",
48+
"reconcile-v0-features",
49+
"remove-framework-shared-exports",
50+
"rename-create-env-to-arkenv",
51+
"standard-isolation-guards",
52+
"standard-mode-flat-layout",
53+
"standard-mode-packaging",
54+
"trim-short-flag-aliases",
55+
"unified-error-normalization",
56+
"unify-coercion",
57+
"valibot-example-registry",
58+
"vite-env-module-transform",
59+
"walk-back-env-starters"
60+
]
5261
}

packages/arkenv/CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# @arkenv/core
22

3+
## 1.0.0-alpha.10
4+
5+
### Minor Changes
6+
7+
- #### Add hosting presets for Cloudflare, Railway, Render, and Fly.io _[`#1469`](https://github.com/yamcodes/arkenv/pull/1469) [`a64bd57`](https://github.com/yamcodes/arkenv/commit/a64bd5752a29dcce66fcc0b507320a700a0a5b6e) [@yamcodes](https://github.com/yamcodes)_
8+
9+
Add hosting presets for Cloudflare, Railway, Render, and Fly.io to the interactive prompt selections in both `arkenv init` and `arkenv add host`.
10+
11+
Usage:
12+
13+
```bash
14+
npx arkenv@latest add host cloudflare
15+
```
16+
17+
or
18+
19+
```bash
20+
npx arkenv@latest init --host-preset cloudflare
21+
```
22+
23+
- #### Support `arkenv add host` for strict multi-file layouts _[`#1434`](https://github.com/yamcodes/arkenv/pull/1434) [`a3d93be`](https://github.com/yamcodes/arkenv/commit/a3d93bedf30fcc46bdaad5966486345dd8f9d75b) [@yamcodes](https://github.com/yamcodes)_
24+
25+
Support `arkenv add host [provider]` in projects with strict multi-file layouts (`client.ts` and `server.ts`). Automatically partition preset variables into client-prefixed keys for `client.ts` and server-only keys for `server.ts`. Align help text and docs so `add host` is not described as flat-`env.ts`-only.
26+
27+
Usage:
28+
29+
```bash
30+
npx arkenv@latest add host [provider]
31+
```
32+
33+
- #### Auto-extend shared schema in Nuxt strict-layout client entry _[`#1422`](https://github.com/yamcodes/arkenv/pull/1422) [`b1d8bad`](https://github.com/yamcodes/arkenv/commit/b1d8badc33523ea80a5d54683d503ad214337e80) [@yamcodes](https://github.com/yamcodes)_
34+
35+
**`@arkenv/nuxt`:** When the module runs in strict layout, omitting `extends` in `env/client.ts` auto-merges `SharedSchema` from `env/internal/shared.ts` via `#arkenv/shared-schema`. Applies to both `@arkenv/nuxt/client` and `@arkenv/nuxt/standard/client`. The server entry continues to auto-merge the composed client env.
36+
37+
**`arkenv` (CLI):** The Nuxt strict scaffold now emits that simplified client template (no manual `SharedSchema` import or `extends` block). Next.js scaffolds remain unchanged.
38+
39+
Usage:
40+
41+
```ts
42+
import arkenv from "@arkenv/nuxt/client";
43+
44+
export const env = arkenv({
45+
NUXT_PUBLIC_API_URL: "string",
46+
});
47+
```
48+
49+
Auto-merge only runs when the `extends` key is omitted. Any explicit `extends` - including `extends: []` or a custom list - is used as-is and opts out of auto-merge. Strict layout still requires `env/internal/shared.ts` with a `SharedSchema` export — that schema may be empty (`type({})`) when you have no shared variables. A missing file or unusable export fails with a clear diagnostic (rather than silently treating shared as empty).
50+
351
## 1.0.0-alpha.9
452

553
### Minor Changes

packages/arkenv/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arkenv",
33
"type": "module",
4-
"version": "1.0.0-alpha.9",
4+
"version": "1.0.0-alpha.10",
55
"description": "Interactive CLI for scaffolding ArkEnv projects",
66
"bin": {
77
"arkenv": "./dist/index.cjs"

packages/bun-plugin/CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,72 @@
11
# @arkenv/bun-plugin
22

3+
## 1.0.0-alpha.7
4+
5+
### Minor Changes
6+
7+
- #### Add `env.ts` transform for Bun fullstack apps _[`#1459`](https://github.com/yamcodes/arkenv/pull/1459) [`5fc1c6a`](https://github.com/yamcodes/arkenv/commit/5fc1c6a95a3d2a96ef7302750b1104188b230048) [@yamcodes](https://github.com/yamcodes)_
8+
9+
Let the Bun plugin discover your `env.ts` and expose a shared `env` object that works in both client and server code. On the client (`Bun.build` / `[serve.static]`), public (`BUN_PUBLIC_*`) values are inlined at build time and server-only keys throw if read; on the server (`bun run` / `Bun.serve`), `env.ts` still runs normally and validates against the real environment at boot. The plugin does not rewrite your `env.ts` file on disk.
10+
11+
Works with `@arkenv/bun-plugin` and `@arkenv/bun-plugin/standard`.
12+
13+
Usage:
14+
15+
```ts
16+
// bunfig.toml — zero-config browser transform
17+
// [serve.static]
18+
// plugins = ["@arkenv/bun-plugin"]
19+
20+
// or explicitly in Bun.build:
21+
import arkenv from "@arkenv/bun-plugin";
22+
23+
await Bun.build({
24+
entrypoints: ["./src/index.html"],
25+
target: "browser",
26+
plugins: [arkenv], // finds src/env.ts or env.ts
27+
// or: arkenv({ schemaPath: "src/env.ts", clientPrefix: "BUN_PUBLIC_" })
28+
});
29+
```
30+
31+
```ts
32+
// src/env.ts
33+
import arkenv from "@arkenv/core";
34+
35+
export const env = arkenv({
36+
DATABASE_URL: "string",
37+
BUN_PUBLIC_API_URL: "string",
38+
});
39+
```
40+
41+
```ts
42+
import { env } from "./env";
43+
44+
env.BUN_PUBLIC_API_URL; // available on client and server
45+
env.DATABASE_URL; // server only — throws if read in the browser
46+
```
47+
48+
Passing a schema to `arkenv(schema)` (the previous `process.env` rewrite API) continues to work unchanged as SPA mode.
49+
50+
### Patch Changes
51+
52+
- #### Clarify Standard Mode missing-schema guidance with a Zod example _[`#1457`](https://github.com/yamcodes/arkenv/pull/1457) [`6cca0cf`](https://github.com/yamcodes/arkenv/commit/6cca0cf8459d6b2e75bd7b163388ab9d0a8bb782) [@yamcodes](https://github.com/yamcodes)_
53+
54+
When `@arkenv/bun-plugin/standard` cannot find `env.ts`, show an illustrative Zod starter (any Standard Schema validator works — Zod is just the most common):
55+
56+
```ts
57+
import arkenv from "@arkenv/standard";
58+
import { z } from "zod";
59+
60+
export default arkenv({
61+
BUN_PUBLIC_API_URL: z.string(),
62+
BUN_PUBLIC_DEBUG: z.enum(["true", "false"]),
63+
});
64+
```
65+
66+
- #### Drop embedded env.ts starters and warn when the Nuxt module finds no schema _[`#1468`](https://github.com/yamcodes/arkenv/pull/1468) [`0150e73`](https://github.com/yamcodes/arkenv/commit/0150e73713facc58e05508a19f72042ac40c90e6) [@yamcodes](https://github.com/yamcodes)_
67+
68+
Keep missing-schema guidance short and host-parity consistent: Bun no longer embeds ArkType/Zod starters in the hybrid discovery error (prefer `arkenv init` / docs). When the Nuxt module is registered but no schema file is found, log a build warning and skip setup instead of failing silently.
69+
370
## 1.0.0-alpha.6
471

572
### Patch Changes

packages/bun-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arkenv/bun-plugin",
3-
"version": "1.0.0-alpha.6",
3+
"version": "1.0.0-alpha.7",
44
"author": "Yam Borodetsky <yam@yam.codes>",
55
"repository": {
66
"type": "git",

packages/nuxt/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# @arkenv/nuxt
22

3+
## 1.0.0-alpha.10
4+
5+
### Minor Changes
6+
7+
- #### Auto-extend shared schema in Nuxt strict-layout client entry _[`#1422`](https://github.com/yamcodes/arkenv/pull/1422) [`b1d8bad`](https://github.com/yamcodes/arkenv/commit/b1d8badc33523ea80a5d54683d503ad214337e80) [@yamcodes](https://github.com/yamcodes)_
8+
9+
**`@arkenv/nuxt`:** When the module runs in strict layout, omitting `extends` in `env/client.ts` auto-merges `SharedSchema` from `env/internal/shared.ts` via `#arkenv/shared-schema`. Applies to both `@arkenv/nuxt/client` and `@arkenv/nuxt/standard/client`. The server entry continues to auto-merge the composed client env.
10+
11+
**`arkenv` (CLI):** The Nuxt strict scaffold now emits that simplified client template (no manual `SharedSchema` import or `extends` block). Next.js scaffolds remain unchanged.
12+
13+
Usage:
14+
15+
```ts
16+
import arkenv from "@arkenv/nuxt/client";
17+
18+
export const env = arkenv({
19+
NUXT_PUBLIC_API_URL: "string",
20+
});
21+
```
22+
23+
Auto-merge only runs when the `extends` key is omitted. Any explicit `extends` - including `extends: []` or a custom list - is used as-is and opts out of auto-merge. Strict layout still requires `env/internal/shared.ts` with a `SharedSchema` export — that schema may be empty (`type({})`) when you have no shared variables. A missing file or unusable export fails with a clear diagnostic (rather than silently treating shared as empty).
24+
25+
### Patch Changes
26+
27+
- #### Coerce Nuxt public env overrides instead of leaving them as strings _[`#1458`](https://github.com/yamcodes/arkenv/pull/1458) [`3667b7e`](https://github.com/yamcodes/arkenv/commit/3667b7e9a1bc4547e247a9f4783d7a4e6c12782f) [@yamcodes](https://github.com/yamcodes)_
28+
29+
**Bug:** With a numeric (or boolean) public schema key, setting a deploy-time override made Nitro put a _string_ into `runtimeConfig.public`. That string won, so `env` lied about the type on server and client.
30+
31+
```diff
32+
// env.ts
33+
export const env = arkenv({
34+
NUXT_PUBLIC_PORT: "number",
35+
});
36+
37+
// Deploy / Nitro boot: NUXT_PUBLIC_PORT=4000
38+
- env.NUXT_PUBLIC_PORT; // "4000" (string) — schema said number
39+
+ env.NUXT_PUBLIC_PORT; // 4000 (number) — coerced after the override
40+
```
41+
42+
Same import surface. As a side effect, `@arkenv/nuxt` / `@arkenv/nuxt/client` no longer ship the validator into the browser bundle.
43+
44+
- Skip all Nuxt module setup (including boot-gate hooks) when no schema file is found, matching the warn-and-bail contract. _[`#1165`](https://github.com/yamcodes/arkenv/pull/1165) [`882c0ce`](https://github.com/yamcodes/arkenv/commit/882c0ce0d62ffa3922816ad83a4a92c89f0ef764) [@yamcodes](https://github.com/yamcodes)_
45+
- #### Drop embedded env.ts starters and warn when the Nuxt module finds no schema _[`#1468`](https://github.com/yamcodes/arkenv/pull/1468) [`0150e73`](https://github.com/yamcodes/arkenv/commit/0150e73713facc58e05508a19f72042ac40c90e6) [@yamcodes](https://github.com/yamcodes)_
46+
47+
Keep missing-schema guidance short and host-parity consistent: Bun no longer embeds ArkType/Zod starters in the hybrid discovery error (prefer `arkenv init` / docs). When the Nuxt module is registered but no schema file is found, log a build warning and skip setup instead of failing silently.
48+
349
## 1.0.0-alpha.9
450

551
### Patch Changes

packages/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arkenv/nuxt",
3-
"version": "1.0.0-alpha.9",
3+
"version": "1.0.0-alpha.10",
44
"author": "Yam Borodetsky <yam@yam.codes>",
55
"repository": {
66
"type": "git",

packages/vite-plugin/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# @arkenv/vite-plugin
22

3+
## 1.0.0-alpha.7
4+
5+
### Minor Changes
6+
7+
- #### Add `env.ts` transform for Vite fullstack apps _[`#1423`](https://github.com/yamcodes/arkenv/pull/1423) [`e1cf6db`](https://github.com/yamcodes/arkenv/commit/e1cf6db6fac038528c7b956df2315de3ecd97f24) [@yamcodes](https://github.com/yamcodes)_
8+
9+
Let the Vite plugin discover your `env.ts` and expose a shared `env` object that works in both client and server code. On the client, public (`VITE_*`) values are inlined at build time and server-only keys throw if read; on the server/SSR, `env.ts` still runs normally and validates against the real environment at boot. The plugin does not rewrite your `env.ts` file on disk.
10+
11+
Works with `@arkenv/vite-plugin` and `@arkenv/vite-plugin/standard`.
12+
13+
Usage:
14+
15+
```ts
16+
// vite.config.ts
17+
import arkenv from "@arkenv/vite-plugin";
18+
19+
export default {
20+
plugins: [arkenv()], // finds src/env.ts or env.ts
21+
// or: arkenv({ schemaPath: "src/env.ts", clientPrefix: "VITE_" })
22+
};
23+
```
24+
25+
```ts
26+
// src/env.ts
27+
import arkenv from "@arkenv/core";
28+
29+
export const env = arkenv({
30+
DATABASE_URL: "string",
31+
VITE_API_URL: "string",
32+
});
33+
```
34+
35+
```ts
36+
import { env } from "./env";
37+
38+
env.VITE_API_URL; // available on client and server
39+
env.DATABASE_URL; // server only — throws if read in the browser
40+
```
41+
42+
Passing a schema to `arkenv(schema)` (the previous `import.meta.env` define API) continues to work unchanged.
43+
344
## 1.0.0-alpha.6
445

546
### Patch Changes

packages/vite-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arkenv/vite-plugin",
3-
"version": "1.0.0-alpha.6",
3+
"version": "1.0.0-alpha.7",
44
"author": "Yam Borodetsky <yam@yam.codes>",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)