From 91901e80f82fa48e0943dbe25f46a808ad4ca600 Mon Sep 17 00:00:00 2001 From: "vland-bot[bot]" <282456776+vland-bot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 03:10:55 +0000 Subject: [PATCH] RELEASING: Releasing 1 package(s) Releases: @vlandoss/env@0.5.1 [skip ci] --- .changeset/browser-envname-fallback.md | 7 ------- package/CHANGELOG.md | 8 ++++++++ package/package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 .changeset/browser-envname-fallback.md diff --git a/.changeset/browser-envname-fallback.md b/.changeset/browser-envname-fallback.md deleted file mode 100644 index b9a5049..0000000 --- a/.changeset/browser-envname-fallback.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@vlandoss/env": patch ---- - -Clarify that the `envConfig()` Vite plugin is required for **any** non-development browser build, not just custom modes. - -In the browser, `envName()`'s `readEnv()` only reads `window.__env` — never `process.env` — so a pure SPA can't see `NODE_ENV` / `VITE_ENV`. Without the plugin's `__ENV_NAME__` inject, `envName()` falls back to `"development"` (silently shipping the dev config to every environment), regardless of the `--mode` or `VITE_ENV` used at build time. The docs and the `__ENV_NAME__` JSDoc previously stated the browser would fall back to `"production"`, which is only true on the server. diff --git a/package/CHANGELOG.md b/package/CHANGELOG.md index fbfb142..d9b2550 100644 --- a/package/CHANGELOG.md +++ b/package/CHANGELOG.md @@ -1,5 +1,13 @@ # @vlandoss/env +## 0.5.1 + +### Patch Changes + +- [#28](https://github.com/variableland/env/pull/28) [`8634e59`](https://github.com/variableland/env/commit/8634e597e332a798f752341d04745df74bc5a777) Thanks [@rqbazan](https://github.com/rqbazan)! - Clarify that the `envConfig()` Vite plugin is required for **any** non-development browser build, not just custom modes. + + In the browser, `envName()`'s `readEnv()` only reads `window.__env` — never `process.env` — so a pure SPA can't see `NODE_ENV` / `VITE_ENV`. Without the plugin's `__ENV_NAME__` inject, `envName()` falls back to `"development"` (silently shipping the dev config to every environment), regardless of the `--mode` or `VITE_ENV` used at build time. The docs and the `__ENV_NAME__` JSDoc previously stated the browser would fall back to `"production"`, which is only true on the server. + ## 0.5.0 ### Minor Changes diff --git a/package/package.json b/package/package.json index a1f0c2a..914dfa1 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "@vlandoss/env", - "version": "0.5.0", + "version": "0.5.1", "description": "Contract-first environment configuration with typed schemas", "homepage": "https://github.com/variableland/env/tree/main/package#readme", "bugs": {