chore: update versions#7
Merged
Merged
Conversation
Releases: @vlandoss/env@0.2.0 [skip ci]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@vlandoss/env@0.2.0
Minor Changes
#6
d150a70Thanks @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 DOMid="env"andwindow.__envglobal stay identical, so HTML served by an older build continues to hydrate correctly.Renames included:
ClientEnv→EnvScriptClientEnvProps→EnvScriptPropsCLIENT_ENV_SCRIPT_ID→ENV_SCRIPT_ID,CLIENT_ENV_GLOBAL_ID→ENV_GLOBAL_IDMigration: replace
<ClientEnv …>with<EnvScript …>. If you imported the constants from the core entrypoint, update those imports too.#6
d150a70Thanks @rqbazan! - BREAKING Rename@vlandoss/env/nodeto@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 usespathToFileURLso Deno can load absolute paths correctly.Migration: replace
from "@vlandoss/env/node"withfrom "@vlandoss/env/fs".Patch Changes
#6
d150a70Thanks @rqbazan! - Replacelodash.mergewithdefufor the internal merge that combinesdefaults + 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.mergerelies onisPlainObject, which returnsfalsewhen 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 inconfig(e.g.db.LOGGING: true) to be dropped wheneverenvOverridetouched the same parent branch.defu is realm-agnostic and reliably deep-merges in all the runtimes supported by the core.
#6
d150a70Thanks @rqbazan! - Polish the package README to match the new docs site language — soften technical references toprocess.env, separate the optionalzodinstall, and align the tagline with the rest of the documentation.#6
d150a70Thanks @rqbazan! -readEnv()no longer throwsReferenceErroron runtimes whereprocessis not defined (e.g. Cloudflare Workers withoutnodejs_compat). It now returns{}so callers can supply the environment explicitly viadefineEnv({ runtimeEnv })— the idiomatic pattern in Workerfetch(req, env, ctx)handlers. Behavior on Node, Bun, Deno, browsers, and Edge runtimes that polyfillprocess.envis unchanged.