Skip to content

Version Packages#225

Merged
yamcodes merged 1 commit intomainfrom
changeset-release/main
Oct 13, 2025
Merged

Version Packages#225
yamcodes merged 1 commit intomainfrom
changeset-release/main

Conversation

@arkenv-bot
Copy link
Contributor

@arkenv-bot arkenv-bot bot commented Oct 13, 2025

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

@arkenv/vite-plugin@0.0.14

Patch Changes

  • Support array defaults using type().default() syntax #224 ecf9b64 @yamcodes

    Fix to an issue where type("array[]").default(() => [...]) syntax was not accepted by the plugin due to overly restrictive type constraints. The plugin now accepts any string-keyed record while still maintaining type safety through ArkType's validation system.

    New Features
    • Array defaults to empty using type("string[]").default(() => []) syntax
    • Support for complex array types with defaults
    • Mixed schemas combining string-based and type-based defaults
    Example
    // vite.config.ts
    import arkenv from "@arkenv/vite-plugin";
    import { type } from "arkenv";
    
    export default defineConfig({
      plugins: [
        arkenv({
          ALLOWED_ORIGINS: type("string[]").default(() => ["localhost"]),
          FEATURE_FLAGS: type("string[]").default(() => []),
          PORT: "number.port",
        }),
      ],
    });

    [!NOTE]
    This is the same fix as in arkenv@0.7.2 (the core library), but for the Vite plugin.

  • Fix import.meta.env not respecting morphed environment variables #227 d41878f @yamcodes

    The Vite plugin now properly exposes transformed environment variables through import.meta.env.

    Previously, type transformations (string → number, string → boolean) and default values were lost because the plugin only called createEnv() without integrating the results with Vite's environment system.

    Now the plugin uses Vite's define option to expose the morphed values, ensuring all schema transformations are respected.

@vercel
Copy link

vercel bot commented Oct 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Oct 13, 2025 3:14pm

@github-actions github-actions bot added docs Improvements or additions to documentation @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv labels Oct 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/arkenv@225
npm i https://pkg.pr.new/@arkenv/vite-plugin@225

commit: ebc16fa

@github-actions github-actions bot force-pushed the changeset-release/main branch from f8e6ee5 to 4f6eb75 Compare October 13, 2025 15:13
@yamcodes yamcodes merged commit 0ab77a2 into main Oct 13, 2025
3 checks passed
@yamcodes yamcodes deleted the changeset-release/main branch October 13, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant