Skip to content

Releases: variableland/env

@vlandoss/env@0.2.1

19 May 03:12
7a84732

Choose a tag to compare

Patch Changes

  • #11 91534e9 Thanks @rqbazan! - Drop the type-fest dependency. PartialDeep is now defined locally in src/lib/types.ts with an equivalent shape, so the public surface of Config<S> and Defaults<S> is unchanged. One fewer transitive dep for consumers.

@vlandoss/env@0.2.0

16 May 06:42

Choose a tag to compare

Minor Changes

  • #6 d150a70 Thanks @rqbazan! - BREAKING Rename <ClientEnv /> (in @vlandoss/env/react) to <EnvScript />. The new name stops suggesting client-side use and reflects what the component actually does: emit a <script> tag with the server-resolved env so the browser can read it during SSR or SSG hydration. The entrypoint path (@vlandoss/env/react) is unchanged. The wire format is also unchanged: the DOM id="env" and window.__env global stay identical, so HTML served by an older build continues to hydrate correctly.

    Renames included:

    • Component: ClientEnvEnvScript
    • Props: ClientEnvPropsEnvScriptProps
    • Constants: CLIENT_ENV_SCRIPT_IDENV_SCRIPT_ID, CLIENT_ENV_GLOBAL_IDENV_GLOBAL_ID

    Migration: replace <ClientEnv …> with <EnvScript …>. If you imported the constants from the core entrypoint, update those imports too.

  • #6 d150a70 Thanks @rqbazan! - BREAKING Rename @vlandoss/env/node to @vlandoss/env/fs. The entrypoint has always been about file-system access on a Node-compatible runtime — the new name reflects that it works on Node, Bun, and Deno (not just Node), and that it does not work on Workers/Edge. The dynamic-import path resolution now uses pathToFileURL so Deno can load absolute paths correctly.

    Migration: replace from "@vlandoss/env/node" with from "@vlandoss/env/fs".

Patch Changes

  • #6 d150a70 Thanks @rqbazan! - Replace lodash.merge with defu for the internal merge that combines defaults + config + envOverride. The precedence (env > config > defaults) is unchanged.

    This fixes a silent shallow-merge regression on V8 isolate runtimes (Cloudflare Workers, Vercel Edge, Next.js Edge): lodash.merge relies on isPlainObject, which returns false when the object originates from a different realm than the merger. The fallback path then assigns by reference instead of deep-merging, which caused leaf values present in config (e.g. db.LOGGING: true) to be dropped whenever envOverride touched the same parent branch.

    defu is realm-agnostic and reliably deep-merges in all the runtimes supported by the core.

  • #6 d150a70 Thanks @rqbazan! - Polish the package README to match the new docs site language — soften technical references to process.env, separate the optional zod install, and align the tagline with the rest of the documentation.

  • #6 d150a70 Thanks @rqbazan! - readEnv() no longer throws ReferenceError on runtimes where process is not defined (e.g. Cloudflare Workers without nodejs_compat). It now returns {} so callers can supply the environment explicitly via defineEnv({ runtimeEnv }) — the idiomatic pattern in Worker fetch(req, env, ctx) handlers. Behavior on Node, Bun, Deno, browsers, and Edge runtimes that polyfill process.env is unchanged.

@vlandoss/env@0.1.2

13 May 23:39
2a41ee4

Choose a tag to compare

Patch Changes

  • #4 4e05752 Thanks @rqbazan! - Slim down package README and move full documentation to the new Fumadocs site

@vlandoss/env@0.1.1

13 May 22:08
94ba0a8

Choose a tag to compare

Patch Changes

  • #2 f2d9b91 Thanks @rqbazan! - - Fix homepage URL in package.json after flattening the monorepo (packages/envpackage).
    • Add keywords to package.json for npm discoverability.

@vlandoss/env@0.1.0

13 May 03:42
ef3f99b

Choose a tag to compare

Minor Changes

  • 42c6eb7 Thanks @rqbazan! - Initial public release of @vlandoss/env under the @vlandoss scope.

    Contract-first environment configuration with typed schemas and per-runtime entrypoints:

    • @vlandoss/env — runtime-agnostic core (schema, defineEnv, envName, readEnv).
    • @vlandoss/env/nodeloadConfig with auto-discovery or {env} template.
    • @vlandoss/env/viteenvConfig Vite plugin (#config alias + __ENV_NAME__ build-time inject).
    • @vlandoss/env/react<ClientEnv /> for SSR/SSG.
    • @vlandoss/env/zod — opt-in opinionated Zod primitives (port, host, bool, logLevel, secret).