Skip to content

Commit 6fb278b

Browse files
committed
chore(release): bump to v1.3.1 with multi-environment mode
1 parent f12e8f6 commit 6fb278b

File tree

17 files changed

+1472
-143
lines changed

17 files changed

+1472
-143
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7777

7878
---
7979

80+
## [1.3.1] - 2025-10-30
81+
82+
### Added - Core Package v1.3.1
83+
- **Multi-Environment Mode Parameter**: New `mode` parameter for automatic multi-file loading
84+
- Simple API: `config({ mode: process.env.DOTENV_GUARD_MODE || 'development' })`
85+
- Auto-loads files in priority order: `.env` β†’ `.env.local` β†’ `.env.[mode]` β†’ `.env.[mode].local`
86+
- Hostname-based mode selection: `config({ mode: os.hostname() === 'ubuntu' ? 'production' : 'development' })`
87+
- Environment variable based: `config({ mode: process.env.HOSTNAME === 'prod-server' ? 'production' : 'development' })`
88+
- Works with validation: `config({ mode: 'production', validator: true })`
89+
- Mode-specific schema support: auto-loads `env.schema.[mode].json` if exists
90+
- 100% backward compatible - existing `path` parameter still works
91+
- When both `mode` and `path` provided, `mode` takes precedence
92+
93+
### Improved - Core Package v1.3.1
94+
- **Test Coverage**: Increased from 90.99% to 97.74%
95+
- Added 21 new test cases (101 β†’ 122 tests)
96+
- New test files: `test/index.test.js`, `test/esm.test.mjs`
97+
- Enhanced edge case coverage for error handling
98+
- ESM export testing for `index.mjs`
99+
- Legacy getter functionality tests
100+
- Validation edge cases (enum, regex failures)
101+
- Encryption edge cases (invalid formats, missing files)
102+
- **Documentation**: Enhanced with mode parameter examples
103+
- Added comprehensive usage examples for multi-environment mode
104+
- Hostname-based configuration patterns
105+
- Docker/Kubernetes deployment examples
106+
- New example file: `example/with-mode.js`
107+
- Updated API reference with mode parameter details
108+
109+
### Changed - Core Package v1.3.1
110+
- **File Loading**: Support for absolute paths in `loadEnv()` and `loadSchema()`
111+
- Enables seamless integration with multi-env file loading
112+
- Both relative and absolute paths now supported
113+
- **README Badge**: Updated coverage badge from 91.4% to 97.7%
114+
115+
### Fixed - Core Package v1.3.1
116+
- **Path Resolution**: Fixed double `process.cwd()` join when using multi-env mode
117+
- `getEnvFiles()` returns absolute paths, properly handled by `loadEnv()`
118+
- No more path resolution conflicts
119+
120+
### Changed - Vite Plugin v0.4.1
121+
- **Version Bump**: 0.4.0 β†’ 0.4.1
122+
- **Core Dependency**: Updated to `@ibnushahraa/dotenv-guard@^1.3.1`
123+
124+
### Changed - Nuxt Module v0.1.0-beta.1
125+
- **Version Bump**: 0.1.0-beta.0 β†’ 0.1.0-beta.1
126+
- **Core Dependency**: Updated to `@ibnushahraa/dotenv-guard@^1.3.1`
127+
128+
---
129+
80130
## [1.2.0] - 2025-10-03
81131

82132
### Changed

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
[![npm version](https://img.shields.io/npm/v/@ibnushahraa/dotenv-guard.svg?style=flat-square)](https://www.npmjs.com/package/@ibnushahraa/dotenv-guard)
44
[![npm downloads](https://img.shields.io/npm/dm/@ibnushahraa/dotenv-guard.svg?style=flat-square)](https://www.npmjs.com/package/@ibnushahraa/dotenv-guard)
5+
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@ibnushahraa/dotenv-guard?style=flat-square&label=size)](https://bundlephobia.com/package/@ibnushahraa/dotenv-guard)
56
[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
67
[![CI](https://github.com/ibnushahraa/dotenv-guard/actions/workflows/test.yml/badge.svg)](https://github.com/ibnushahraa/dotenv-guard/actions)
8+
[![Known Vulnerabilities](https://snyk.io/test/github/ibnushahraa/dotenv-guard/badge.svg?style=flat-square)](https://snyk.io/test/github/ibnushahraa/dotenv-guard)
9+
[![Security](https://img.shields.io/badge/security-AES--256--GCM-blue?style=flat-square&logo=lock)](https://github.com/ibnushahraa/dotenv-guard#features)
710

811
πŸ” Secure & validate your `.env` files with **encryption**, **schema validation**, and **CLI tools**.
912
Think of it as **dotenv on steroids** β€” with guardrails for production-ready apps.

0 commit comments

Comments
Β (0)