Skip to content

Commit a94cac4

Browse files
committed
merge from neon-env
1 parent 60cf251 commit a94cac4

File tree

6 files changed

+18
-106
lines changed

6 files changed

+18
-106
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
* text eol=lf
2-
pnpm-lock.yaml linguist-generated=true text eol=lf

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ To get ready to work on the codebase, please do the following:
1212
2. Run `pnpm install --frozen-lockfile`
1313
3. Code!
1414
4. Run `node --run check`, `node --run typecheck` and `node --run test`
15-
5. [Submit a pull request](https://github.com/SuperchupuDev/neon-env/compare)
15+
5. [Submit a pull request](https://github.com/itslukej/typed-env/compare)

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
# neon-env
1+
# typed-env
22

3-
> Basically [typed-env](https://www.npmjs.com/package/typed-env), but with support for choices and maintained.
3+
[![npm version](https://img.shields.io/npm/v/typed-env.svg?maxAge=3600)](https://npmjs.com/package/typed-env)
4+
[![monthly downloads](https://img.shields.io/npm/dm/typed-env.svg?maxAge=3600)](https://npmjs.com/package/typed-env)
45

56
A typed environment variable parser with support for choices, custom parsers, and more.
67

7-
## Installation
8-
9-
> Node.js ^14.18.0, v16 or newer is required. [See issue #1](https://github.com/SuperchupuDev/neon-env/issues/1#issuecomment-1296366710).
10-
11-
```sh-session
12-
npm i neon-env
13-
```
14-
158
## Usage
169

1710
```ts
18-
import { createEnv } from 'neon-env';
11+
import { createEnv } from 'typed-env';
1912

2013
const env = createEnv({
2114
PORT: { type: 'number', default: 80 }
@@ -35,7 +28,7 @@ env.PORT; // number
3528
### Choices
3629

3730
```ts
38-
import { createEnv } from 'neon-env';
31+
import { createEnv } from 'typed-env';
3932

4033
const env = createEnv({
4134
NODE_ENV: {
@@ -47,14 +40,12 @@ const env = createEnv({
4740
env.NODE_ENV; // 'development' | 'production'
4841
```
4942

50-
As of 0.2.0, you no longer need to add `as const` to the choices array to get the best type safety.
51-
5243
### Parser
5344

5445
You can pass a `parser` function to return your own custom type
5546

5647
```ts
57-
import { createEnv } from 'neon-env';
48+
import { createEnv } from 'typed-env';
5849

5950
const env = createEnv({
6051
HOMEPAGE: { parser: url => new URL(url) }

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "neon-env",
3-
"version": "0.2.2",
4-
"description": "Typed env parser",
2+
"name": "typed-env",
3+
"version": "2.0.0",
4+
"description": "Typed environment variable parser",
55
"scripts": {
6-
"build": "tsup",
6+
"build": "tsdown",
77
"changelog": "auto-changelog -p --commit-limit false",
88
"check": "biome check",
99
"format": "biome format --write",
@@ -24,7 +24,10 @@
2424
"files": [
2525
"dist"
2626
],
27-
"author": "Superchupu",
27+
"contributors": [
28+
"Luke James <[email protected]>",
29+
"Superchupu"
30+
],
2831
"license": "MIT",
2932
"keywords": [
3033
"environment variables",
@@ -37,12 +40,12 @@
3740
],
3841
"repository": {
3942
"type": "git",
40-
"url": "git+https://github.com/SuperchupuDev/neon-env.git"
43+
"url": "git+https://github.com/itslukej/typed-env.git"
4144
},
4245
"bugs": {
43-
"url": "https://github.com/SuperchupuDev/neon-env/issues"
46+
"url": "https://github.com/itslukej/typed-env/issues"
4447
},
45-
"homepage": "https://github.com/SuperchupuDev/neon-env#readme",
48+
"homepage": "https://github.com/itslukej/typed-env#readme",
4649
"devDependencies": {
4750
"@biomejs/biome": "^1.9.4",
4851
"@types/node": "^22.15.21",

0 commit comments

Comments
 (0)