Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/better-buses-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"arkenv": minor
---

Rename from `ark.env` to `arkenv`

BREAKING CHANGE:

Package renamed from `ark.env` to `arkenv`, main export renamed from `env` to `defineEnv`.

Before:
```ts
import ark, { host, port } from "ark.env";
const env = ark.env({
HOST: host,
PORT: port,
});
```

After:
```ts
import { defineEnv, host, port } from "arkenv";
const env = defineEnv({
HOST: host,
PORT: port,
});
```
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
"changelog": ["changesets-changelog-clean", { "repo": "yamcodes/ark.env" }],
"changelog": ["changesets-changelog-clean", { "repo": "yamcodes/arkenv" }],
"commit": false,
"fixed": [],
"linked": [],
Expand Down
7 changes: 7 additions & 0 deletions .changeset/icy-berries-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@arkenv/vite-plugin": patch
---

Use new `arkenv` package

This package has been updated to use the new `arkenv` package. No changes from your side are required.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to `ark.env`
# Contributing to ArkEnv

Thank you for considering a contribution to `ark.env`! As an open source project, `ark.env` welcomes contributions of all kinds.
Thank you for considering a contribution to ArkEnv! As an open source project, ArkEnv welcomes contributions of all kinds.


## Development Setup
Expand All @@ -15,8 +15,8 @@ Thank you for considering a contribution to `ark.env`! As an open source project
2. ### Clone the repository

```sh
git clone https://github.com/yamcodes/ark.env.git
cd ark.env
git clone https://github.com/yamcodes/arkenv.git
cd arkenv
```

3. ### Install dependencies
Expand Down Expand Up @@ -55,4 +55,4 @@ The changeset will be automatically used to bump versions and update the changel

## License

By contributing your code to the `ark.env` GitHub repository, you agree to license your contributions under the MIT License.
By contributing your code to the ArkEnv GitHub repository, you agree to license your contributions under the MIT License.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<a href="https://yam.codes/ark.env">
<img alt="ark.env - Typesafe Environment Variables" src="https://og.tailgraph.com/og?titleFontFamily=JetBrains+Mono&textFontFamily=Inter&title=ark.env&titleTailwind=text-[%23e9eef9]%20font-bold%20relative%20decoration-%5Brgb(180,215,255)%5D%20decoration-wavy%20decoration-[5px]%20underline%20underline-offset-[16px]%20text-5xl%20mb-8&text=Typesafe%20Environment%20Variables&textTailwind=text-[%238b9dc1]%20text-3xl&bgTailwind=bg-gradient-to-b%20from-[%23061a3a]%20to-black" width="645px">
<a href="https://yam.codes/arkenv">
<img alt="arkenv - Typesafe Environment Variables" src="https://og.tailgraph.com/og?titleFontFamily=JetBrains+Mono&textFontFamily=Inter&title=ArkEnv&titleTailwind=text-[%23e9eef9]%20font-bold%20relative%20decoration-%5Brgb(180,215,255)%5D%20decoration-wavy%20decoration-[5px]%20underline%20underline-offset-[16px]%20text-5xl%20mb-8&text=Typesafe%20environment%20variables%20powered%20by%20ArkType&textTailwind=text-[%238b9dc1]%20text-3xl&bgTailwind=bg-gradient-to-b%20from-[%23061a3a]%20to-black" width="645px">
</a>
<br />
<a href="https://github.com/yamcodes/ark.env/actions/workflows/tests.yml?query=branch%3Amain"><img alt="Tests Status" src="https://github.com/yamcodes/ark.env/actions/workflows/tests.yml/badge.svg?event=push&branch=main"></a>
<a href="https://bundlephobia.com/package/ark.env"><img alt="Bundle Size" src="https://img.shields.io/bundlephobia/min/ark.env?label=bundle%20size&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMzcgMTU3IiB3aWR0aD0iMTM3IiBoZWlnaHQ9I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ljh6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTk0LjI2IDkxLjIzYzEyLjItNy41NCAyMC4yNS0yMC4zOCAyMC4yNS0zNC45NCAwLTMuOS0uNS03LjYtMS41LTExLjFDMTEyLjggMjEgOTMuMiAxLjUgNjguOTggMS41UzI1IDIxLjAyIDI0Ljg3IDQ1LjJjLTEuMDUgMy41Mi0xLjYgNy4yMy0xLjYgMTEuMDUgMCAxNi41NCAxMC40MyAzMC45IDI1LjYgMzcuNzItLjEgMS40LS4xIDIuODItLjEgNC4yNiAwIDIzLjIyIDEwLjIyIDQyLjA0IDIyLjkgNDIuMDQgMTIuNjUgMCAyMi45Mi0xOC44IDIyLjkyLTQyLjAzIDAtMi40LS4yLTQuOC0uNC03LjF6Ii8+PC9zdmc+"></a>
<a href="https://www.npmjs.com/package/ark.env?activeTab=versions"><img alt="Total Downloads" src="https://badgen.net/npm/dt/ark.env?icon=npm&color=blue&label=downloads"></a>
<a href="https://www.npmjs.com/package/ark.env?activeTab=dependencies"><img alt="Dependency Count" src="https://badgen.net/bundlephobia/dependency-count/ark.env?icon=npm&color=blue&label=dependencies"></a>
<a href="https://github.com/yamcodes/arkenv/actions/workflows/tests.yml?query=branch%3Amain"><img alt="Tests Status" src="https://github.com/yamcodes/arkenv/actions/workflows/tests.yml/badge.svg?event=push&branch=main"></a>
<a href="https://bundlephobia.com/package/arkenv"><img alt="Bundle Size" src="https://img.shields.io/bundlephobia/min/arkenv?label=bundle%20size&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMzcgMTU3IiB3aWR0aD0iMTM3IiBoZWlnaHQ9IjE1NyI+PHJlY3QgZmlsbD0iI2ZmZiIgeD0iNjIuMzEiIHk9IjEwMi4zMSIgd2lkdGg9IjE2Ljc0IiBoZWlnaHQ9IjE1Ljk0IiByeD0iNy45NyIvPjxyZWN0IGZpbGw9IiNmZmYi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uMiAxLjUgNjguOTggMS41UzI1IDIxLjAyIDI0Ljg3IDQ1LjJjLTEuMDUgMy41Mi0xLjYgNy4yMy0xLjYgMTEuMDUgMCAxNi41NCAxMC40MyAzMC45IDI1LjYgMzcuNzItLjEgMS40LS4xIDIuODItLjEgNC4yNiAwIDIzLjIyIDEwLjIyIDQyLjA0IDIyLjkgNDIuMDQgMTIuNjUgMCAyMi45Mi0xOC44IDIyLjkyLTQyLjAzIDAtMi40LS4yLTQuOC0uNC03LjF6Ii8+PC9zdmc+"></a>
<a href="https://www.npmjs.com/package/arkenv?activeTab=versions"><img alt="Total Downloads" src="https://badgen.net/npm/dt/arkenv?icon=npm&color=blue&label=downloads"></a>
<a href="https://www.npmjs.com/package/arkenv?activeTab=dependencies"><img alt="Dependency Count" src="https://badgen.net/bundlephobia/dependency-count/arkenv?icon=npm&color=blue&label=dependencies"></a>
<a href="https://arktype.io/"><img alt="Powered By ArkType" src="https://badgen.net/static/powered by/ArkType"></a>
</p>

Expand All @@ -16,43 +16,43 @@
<summary>npm</summary>

```sh
npm install ark.env arktype
npm install arkenv arktype
```
</details>

<details>
<summary>pnpm</summary>

```sh
pnpm add ark.env arktype
pnpm add arkenv arktype
```
</details>

<details>
<summary>Yarn</summary>

```sh
yarn add ark.env arktype
yarn add arkenv arktype
```
</details>

<details>
<summary>Bun</summary>

```sh
bun add ark.env arktype
bun add arkenv arktype
```
</details>

## Quickstart

> [!TIP]
> Find more examples in the [examples](https://github.com/yamcodes/ark.env/tree/main/examples) directory.
> Find more examples in the [examples](https://github.com/yamcodes/arkenv/tree/main/examples) directory.

```ts
import ark, { host, port } from 'ark.env';
import { defineEnv, host, port } from 'arkenv';

const env = ark.env({
const env = defineEnv({
HOST: host, // valid IP address or localhost
PORT: port, // valid port number (0-65535)
NODE_ENV: "'development' | 'production' | 'test'",
Expand All @@ -75,12 +75,12 @@ console.log(env.NODE_ENV); // (property) NODE_ENV: "development" | "production"

## Documentation

For detailed documentation and examples, please visit our [documentation site](https://yam.codes/ark.env).
For detailed documentation and examples, please visit our [documentation site](https://yam.codes/arkenv).

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/yamcodes/ark.env/blob/main/CONTRIBUTING.md) for more information.
Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/yamcodes/arkenv/blob/main/CONTRIBUTING.md) for more information.

## Thanks / Inspiration

Find projects and people who helped or inspired the creation of `ark.env` in [THANKS.md](https://github.com/yamcodes/ark.env/blob/main/THANKS.md). Thank you 🙏
Find projects and people who helped or inspired the creation of ArkEnv in [THANKS.md](https://github.com/yamcodes/arkenv/blob/main/THANKS.md). Thank you 🙏
4 changes: 2 additions & 2 deletions THANKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

I'd like to thank the following projects and people for their help and inspiration:

- [znv](https://github.com/lostfictions/znv) - Basically `ark.env` but for [Zod](https://zod.dev/). Major inspiration for this project.
- [ArkType](https://arktype.dev/) - `ark.env` is here thanks to the brilliance of ArkType. If you somehow haven't already, please check it out. Seriously, it's amazing!
- [znv](https://github.com/lostfictions/znv) - Basically ArkEnv but for [Zod](https://zod.dev/). Major inspiration for this project.
- [ArkType](https://arktype.dev/) - ArkEnv is here thanks to the brilliance of ArkType. If you somehow haven't already, please check it out. Seriously, it's amazing!

Thank you 🙏
6 changes: 3 additions & 3 deletions apps/docs/.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GitHub repository URL
# Example: https://github.com/yamcodes/ark.env
# Example: https://github.com/yamcodes/arkenv
NEXT_PUBLIC_GITHUB_URL=

# StackBlitz GitHub repository slug
# Example: yamcodes/ark.env/tree/main/examples/basic
# Example: yamcodes/arkenv/tree/main/examples/basic
NEXT_PUBLIC_STACKBLITZ_GITHUB_REPO_SLUG=

# Sentry Data Source Name (DSN)
Expand All @@ -19,5 +19,5 @@ SENTRY_AUTH_TOKEN=
SENTRY_ORG=

# Sentry project
# Example: ark.env
# Example: arkenv
SENTRY_PROJECT=
6 changes: 3 additions & 3 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `ark.env` Documentation Site
# ArkEnv Documentation Site

Welcome to the `ark.env` documentation site!
Welcome to the ArkEnv documentation site!

:rocket: We are live on [yam.codes/ark.env](https://yam.codes/ark.env).
:rocket: We are live on [yam.codes/arkenv](https://yam.codes/arkenv).
4 changes: 2 additions & 2 deletions apps/docs/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const bricolageGrotesque = Bricolage_Grotesque({
});

export const metadata: Metadata = {
title: "ark.env: Typesafe Environment Variables",
title: "arkenv: Typesafe Environment Variables",
description:
"ark.env is a tool for managing environment variables in your project.",
"arkenv is a tool for managing environment variables in your project.",
};

export default function HomePage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function generateMetadata(props: {
if (!page) notFound();

return {
title: `${page.data.title} · ark.env`,
title: `${page.data.title} · arkenv`,
description: page.data.description,
};
}
4 changes: 3 additions & 1 deletion apps/docs/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { useEffect } from "react";

export default function GlobalError({
error,
}: { error: Error & { digest?: string } }) {
}: {
error: Error & { digest?: string };
}) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
Expand Down
5 changes: 3 additions & 2 deletions apps/docs/app/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

code,
pre {
font-family: var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo,
Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-family:
var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo, Monaco,
Consolas, "Liberation Mono", "Courier New", monospace;
}
}

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/app/styles/components/github-alerts.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
--rehype-github-alerts-warning-color: rgb(154, 103, 0);
--rehype-github-alerts-caution-color: rgb(209, 36, 47);
--rehype-github-alerts-default-space: 1rem;
--rehype-github-alerts-default-fontFamily: -apple-system, BlinkMacSystemFont,
"Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji";
--rehype-github-alerts-default-fontFamily:
-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
--rehype-github-alerts-default-fontWeight: 500;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/page/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function Logo({ className }: { className?: string }) {
className,
)}
>
ark.env
arkenv
</code>
);
}
2 changes: 1 addition & 1 deletion apps/docs/components/page/stackblitz-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function StackBlitzDemo() {
sdk.embedGithubProject(
embedRef.current,
process.env.NEXT_PUBLIC_STACKBLITZ_GITHUB_REPO_SLUG ??
"yamcodes/ark.env/tree/main/examples/basic",
"yamcodes/arkenv/tree/main/examples/basic",
{
openFile: "index.ts",
view: "editor",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Slot } from "@radix-ui/react-slot";
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";

import { cn } from "~/lib/utils/cn";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/ui/toast.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import * as ToastPrimitives from "@radix-ui/react-toast";
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react";

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const BASE_URL = "/ark.env";
export const BASE_URL = "/arkenv";
6 changes: 3 additions & 3 deletions apps/docs/content/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `ark.env` Documentation
# ArkEnv Documentation

Welcome to the `ark.env` documentation!
Welcome to the ArkEnv documentation!

You can also view the documentation on our [docsite](https://yam.codes/ark.env).
You can also view the documentation on our [docsite](https://yam.codes/arkenv).
12 changes: 6 additions & 6 deletions apps/docs/content/docs/examples.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Start with an example
icon: FolderCode
description: Explore our collection of examples to get started with ark.env
description: Explore our collection of examples to get started with arkenv
---

## Examples
Expand All @@ -15,18 +15,18 @@ description: Explore our collection of examples to get started with ark.env
</thead>
<tbody>
<tr>
<td><a href="https://github.com/yamcodes/ark.env/tree/main/examples/basic">basic</a></td>
<td>Minimal example of <em>using <code>ark.env</code> in a <a href="https://nodejs.org/">Node.js</a> app</em> for learning the fundamentals.</td>
<td><a href="https://github.com/yamcodes/arkenv/tree/main/examples/basic">basic</a></td>
<td>Minimal example of <em>using <code>arkenv</code> in a <a href="https://nodejs.org/">Node.js</a> app</em> for learning the fundamentals.</td>
</tr>
<tr>
<td><a href="https://github.com/yamcodes/ark.env/tree/main/examples/with-bun">with-bun</a></td>
<td>Minimal example of <em>using <code>ark.env</code> in a <a href="https://bun.sh/">Bun</a> app</em>.</td>
<td><a href="https://github.com/yamcodes/arkenv/tree/main/examples/with-bun">with-bun</a></td>
<td>Minimal example of <em>using <code>arkenv</code> in a <a href="https://bun.sh/">Bun</a> app</em>.</td>
</tr>
</tbody>
</table>

## Next steps

<Cards>
<Card title="Contributing an example" href="https://github.com/yamcodes/ark.env/tree/main/examples#contributing-examples" description="Contribute an example to the project" />
<Card title="Contributing an example" href="https://github.com/yamcodes/arkenv/tree/main/examples#contributing-examples" description="Contribute an example to the project" />
</Cards>
14 changes: 7 additions & 7 deletions apps/docs/content/docs/guides/environment-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ spec:

## Validation and Typesafety

ark.env helps ensure your environment variables are valid:
arkenv helps ensure your environment variables are valid:

```typescript title="src/config/env.ts"
import ark, { host, port } from 'ark.env';
import { defineEnv, host, port } from 'arkenv';

export const env = ark.env({
export const env = defineEnv({
// Required variables with validation
DATABASE_HOST: host,
DATABASE_PORT: port,
Expand Down Expand Up @@ -209,10 +209,10 @@ export const env = ark.env({
Create a configuration factory to handle different environments:

```typescript title="src/config/index.ts"
import ark, { host, port } from 'ark.env';
import { defineEnv, host, port } from 'arkenv';

const createConfig = () => {
const env = ark.env({
const env = defineEnv({
NODE_ENV: "'development' | 'test' | 'production'",
DATABASE_HOST: host,
DATABASE_PORT: port,
Expand All @@ -235,9 +235,9 @@ export const config = createConfig();
Use environment variables for feature flags:

```typescript title="src/config/features.ts"
import ark from 'ark.env';
import { defineEnv } from 'arkenv';

export const env = ark.env({
export const env = defineEnv({
"ENABLE_BETA_FEATURES?": 'boolean = false',
"MAINTENANCE_MODE?": 'boolean = false',
"ALLOWED_ORIGINS?": 'string[] = []'
Expand Down
Loading
Loading