Update dependency arkenv to ~0.12.0#363
Merged
Merged
Conversation
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 contains the following updates:
~0.11.0->~0.12.0Release Notes
yamcodes/arkenv (arkenv)
v0.12.2Compare Source
Patch Changes
Expose
getSchemaKeyshelper#1191a3e32db@yamcodesExpose
getSchemaKeyshelper and widenRuntimeEnvironmenttype to support typed framework runtime configurations.Handle pre-parsed primitives gracefully in coercion logic
#120612ed4f3@yamcodesUpdated the core coercion logic to defensively skip values that are not strings. This ensures ArkEnv won't crash or behave unpredictably when passed configuration objects that have already been parsed into numbers, booleans, or complex objects by other systems (such as Nuxt's
runtimeConfig).Fix coercion to prevent in-place mutation of environment config objects
#120612ed4f3@yamcodesRefactor
applyCoercionto perform non-mutating updates on environment configuration data. Clone objects and arrays along the validation path instead of modifying them in-place, preventing runtime crashes on frozen configuration objects (e.g., framework runtime configurations) and avoiding side-effects on reusable config objects.Usage:
v0.12.1Compare Source
Patch Changes
Add
emptyAsUndefinedoption to treat empty env values as missing#11883bfbcb7@yamcodesAdd a new
emptyAsUndefinedconfiguration option to bothcreateEnv(ArkType mode) andarkenv/standard(Standard Schema mode). When enabled, environment variables set to empty strings (e.g.,PORT=in a.envfile) are treated as if they were missing, allowing defaults to apply and preventing unnecessary validation errors for numeric, boolean, or array types.Usage:
emptyAsUndefined: false).v0.12.0Compare Source
Minor Changes
Add Standard JSON Schema coercion to
arkenv/standard#115488b0eee@yamcodesIntroduce opt-out type coercion for standard mode (
arkenv/standard). This coercion only works if the validator is a standard JSON Schema compliant validator (e.g., Zod, Valibot, or custom schemas that implement theStandardJSONSchemaV1interface). This automatically enables coercion for environment variables without relying on ArkType's runtime footprint.If you need to disable coercion, explicitly pass
{ coerce: false }in your configuration:BREAKING CHANGE: Coercion is now enabled by default in
arkenv/standard. This will automatically coerce environment variables to their expected types (e.g., strings containing numbers, booleans, or dates will be converted to their respective types) based on the JSON Schema of your validators. It's unlikely to affect you unless you were relying on validation failing for uncoerced string inputs, or have custom schemas that expect raw strings instead of coerced values.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.