pretty-env 1.0.0 → 1.0.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 +28 -0
- package/README.md +6 -6
- package/cli/pretty-env-cli.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-03-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of pretty-env
|
|
12
|
+
- Core library with .env file parsing and validation
|
|
13
|
+
- Command-line interface (CLI) for validation and comparison
|
|
14
|
+
- Comprehensive security warnings for sensitive variables
|
|
15
|
+
- Support for required keys and allowed keys validation
|
|
16
|
+
- Pretty printing of loaded environment variables
|
|
17
|
+
- Full test coverage with Jest
|
|
18
|
+
- ESLint and Prettier configuration
|
|
19
|
+
- GitHub Actions CI workflow
|
|
20
|
+
- Detailed documentation and examples
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
- Zero-config usage: `require('pretty-env').load()`
|
|
24
|
+
- Validates .env file syntax and key names
|
|
25
|
+
- Warns on weak/missing credentials
|
|
26
|
+
- Detects common mistakes and naming convention issues
|
|
27
|
+
- Supports custom validation rules
|
|
28
|
+
- Environment variable reporting and analysis
|
package/README.md
CHANGED
|
@@ -107,16 +107,16 @@ Validate from terminal:
|
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
109
|
# Validate current .env
|
|
110
|
-
$ pretty-env validate
|
|
110
|
+
$ npx pretty-env validate
|
|
111
111
|
|
|
112
112
|
# Validate specific file
|
|
113
|
-
$ pretty-env validate .env.production
|
|
113
|
+
$ npx pretty-env validate .env.production
|
|
114
114
|
|
|
115
115
|
# Compare two files
|
|
116
|
-
$ pretty-env compare .env.example .env
|
|
116
|
+
$ npx pretty-env compare .env.example .env
|
|
117
117
|
|
|
118
118
|
# Show help
|
|
119
|
-
$ pretty-env help
|
|
119
|
+
$ npx pretty-env help
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
**Output example:**
|
|
@@ -378,7 +378,7 @@ module.exports = {
|
|
|
378
378
|
# deploy.sh
|
|
379
379
|
|
|
380
380
|
echo "📋 Validating .env..."
|
|
381
|
-
pretty-env validate .env.production
|
|
381
|
+
npx pretty-env validate .env.production
|
|
382
382
|
|
|
383
383
|
if [ $? -eq 0 ]; then
|
|
384
384
|
echo "✅ Env validation passed"
|
|
@@ -420,7 +420,7 @@ require('pretty-env').load({
|
|
|
420
420
|
|
|
421
421
|
```bash
|
|
422
422
|
# Make sure you're not deploying old config
|
|
423
|
-
pretty-env compare .env.example .env.production
|
|
423
|
+
npx pretty-env compare .env.example .env.production
|
|
424
424
|
|
|
425
425
|
# Fix any issues
|
|
426
426
|
npm run validate:env
|
package/cli/pretty-env-cli.js
CHANGED
|
@@ -125,7 +125,7 @@ function help() {
|
|
|
125
125
|
${colorize('pretty-env', 'bright')} - Validate and prettify .env files
|
|
126
126
|
|
|
127
127
|
${colorize('Usage:', 'bright')}
|
|
128
|
-
pretty-env [command] [options]
|
|
128
|
+
npx pretty-env [command] [options]
|
|
129
129
|
|
|
130
130
|
${colorize('Commands:', 'bright')}
|
|
131
131
|
validate [file] Validate .env file (default: .env)
|
|
@@ -133,10 +133,10 @@ ${colorize('Commands:', 'bright')}
|
|
|
133
133
|
help Show this help message
|
|
134
134
|
|
|
135
135
|
${colorize('Examples:', 'bright')}
|
|
136
|
-
$ pretty-env validate
|
|
137
|
-
$ pretty-env validate .env.production
|
|
138
|
-
$ pretty-env compare .env.example .env
|
|
139
|
-
$ pretty-env help
|
|
136
|
+
$ npx pretty-env validate
|
|
137
|
+
$ npx pretty-env validate .env.production
|
|
138
|
+
$ npx pretty-env compare .env.example .env
|
|
139
|
+
$ npx pretty-env help
|
|
140
140
|
`);
|
|
141
141
|
}
|
|
142
142
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pretty-env",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Validates and prettifies .env files with clear error messages. Warns on missing keys, typos, or insecure values. Drop-in replacement for dotenv.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|