envapt 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# envapt
|
|
2
2
|
|
|
3
|
+
## 5.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Embed the README into the published npm manifest so it renders on the package page. pnpm leaves the README out of the manifest by default, which left npmjs.com showing no README on every prior release.
|
|
8
|
+
|
|
3
9
|
## 5.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envapt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.1",
|
|
5
5
|
"description": "Type-safe environment variables for TypeScript. Zero-dependency .env loader and parser with the same API on Node, Bun, and Deno. Decorators, converters, and Standard Schema (zod/valibot/arktype) validation.",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
7
7
|
"exports": {
|
|
@@ -102,5 +102,6 @@
|
|
|
102
102
|
"cs:status": "changeset status",
|
|
103
103
|
"bump": "pnpm tsx ../../scripts/bump-jsr.ts",
|
|
104
104
|
"release": "pnpm run cs:publish"
|
|
105
|
-
}
|
|
105
|
+
},
|
|
106
|
+
"readme": "<img src=\"https://raw.githubusercontent.com/materwelonDhruv/envapt/main/.github/assets/logo.png\" width=\"120\" align=\"left\" alt=\"envapt logo\" />\n\n<h3>envapt</h3>\n\n<p>\n <strong>The apt way to handle environment variables.</strong><br/>\n Read them as typed values, with zero runtime dependencies.\n</p>\n\n<p>\n <a href=\"https://www.npmjs.com/package/envapt\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/envapt?logo=npm&logoColor=cb3838&label=%20&labelColor=103544&color=cb3838\"></a>\n <a href=\"https://www.npmjs.com/package/envapt\"><img alt=\"downloads\" src=\"https://img.shields.io/npm/dm/envapt?style=flat&color=f7f6e8&labelColor=103544&label=downloads\"></a>\n <a href=\"https://jsr.io/@materwelon/envapt\"><img alt=\"jsr\" src=\"https://jsr.io/badges/@materwelon/envapt\"></a>\n <img alt=\"CI\" src=\"https://img.shields.io/github/actions/workflow/status/materwelonDhruv/envapt/checks.yml?branch=main&label=tests&style=flat&logo=github&color=3fb950&labelColor=103544\">\n <a href=\"LICENSE\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/envapt?style=flat&color=e97826&logo=apache&label=\"></a>\n</p>\n\n<br clear=\"left\"/>\n\n`process.env` always hands you a `string | undefined`. envapt returns the type you asked for, with a\nfallback that removes `undefined` from the return type.\n\n```ts\nimport { Envapter } from 'envapt';\n\nconst port = Envapter.getNumber('PORT', 3000); // number, not string | undefined\n```\n\n**[Read the docs →](https://envapt.materwelon.dev)**\n\n## What you get\n\n- **Typed values.** A fallback removes `undefined` from the return type. Built-in converters cover\n numbers, booleans, bigint, JSON, URLs, regular expressions, dates, durations, and arrays, or pass\n your own function or a Standard Schema validator (zod, valibot, arktype).\n- **Zero runtime dependencies.** envapt ships its own `.env` parser, so nothing is added to your\n dependency tree.\n- **Runs on Node, Bun, and Deno.** Node `>=20`, Bun `>=1.3`, Deno `>=2.5`; ESM and CJS.\n- **`.env` loading built in.** A per-environment file cascade, `${VAR}` templates, and strict /\n required checks.\n\n## Install\n\n```sh\nnpm install envapt\npnpm add envapt\nyarn add envapt\nbun add envapt\ndeno add jsr:@materwelon/envapt\n```\n\n## Quick start\n\nRead values functionally with `Envapter`, or bind them to class fields with the `@Envapt` decorator.\nBoth share the same parsing, converters, and cache.\n\n### Functional\n\nRead a value from any call site, in JavaScript or TypeScript. No build step.\n\n```ts\nimport { Envapter, Converters } from 'envapt';\n\nconst port = Envapter.getNumber('PORT', 3000);\nconst origins = Envapter.getUsing('ALLOWED_ORIGINS', Converters.array(), []);\n```\n\n### Decorator\n\nBind a value to a class field. TypeScript, with `experimentalDecorators` in your `tsconfig.json`.\n\n```ts\nimport { Envapt, Converters } from 'envapt';\n\nclass Config {\n @Envapt('PORT', { converter: Converters.Number, fallback: 3000 })\n declare static readonly port: number;\n}\n```\n\n## Documentation\n\nThe guide, converter reference, validation, configuration, and the v4 to v5 migration live at\n**[envapt.materwelon.dev](https://envapt.materwelon.dev)**.\n\n## Agent skill\n\nInstall the envapt agent skill so AI coding tools use the correct API:\n\n```sh\nnpx skills add materwelonDhruv/envapt\n```\n\n---\n\n<p align=\"center\"><sub>Built by <a href=\"https://github.com/materwelondhruv\">@materwelonDhruv</a> · Apache 2.0</sub></p>\n"
|
|
106
107
|
}
|