dotenv-diff 2.1.6 → 2.1.7

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # dotenv-diff
2
2
 
3
+ ![Demo](./public/demo.gif)
4
+
3
5
  Easily compare your .env, .env.example, and other environment files (like .env.local, .env.production) to detect missing, extra, empty, or mismatched variables — and ensure they’re properly ignored by Git.
4
6
 
5
7
  Or scan your codebase to find out which environment variables are actually used in your code, and which ones are not.
@@ -35,6 +37,14 @@ dotenv-diff will automatically compare all matching .env* files in your project
35
37
  - `.env.production`
36
38
  - Any other .env.* file
37
39
 
40
+ ## Why dotenv-diff?
41
+
42
+ - **Prevent production issues**: Ensure all required environment variables are defined before deploying.
43
+ - **Avoid runtime errors**: Catch missing or misconfigured variables early in development.
44
+ - **Improve collaboration**: Keep your team aligned on necessary environment variables.
45
+ - **Enhance security**: Ensure sensitive variables are not accidentally committed to version control.
46
+ - **Scale confidently**: Perfect for turbo monorepos and multi-environment setups.
47
+
38
48
  ## Scan your codebase for environment variable usage
39
49
 
40
50
  ```bash
@@ -50,11 +60,11 @@ Use the `--ci` flag for automated environments. This enables strict mode where t
50
60
 
51
61
  And the `--example` option allows you to specify which `.env.example` file to compare against.
52
62
 
53
- ### Use it in Github Actions for at turborepo, Example:
63
+ ### Use it in Github Actions Example:
54
64
 
55
65
  ```yaml
56
66
  - name: Check environment variables
57
- run: dotenv-diff --ci --scan-usage --show-unused --example .env.example --include-files \"./src/**/*,../../packages/**/*\" --ignore VITE_MODE,NODE_ENV
67
+ run: dotenv-diff --ci --scan-usage --example .env.example --ignore VITE_MODE,NODE_ENV
58
68
  ```
59
69
 
60
70
  You can also change the comparison file by using the `--example` flag to point to a different `.env.example` file.
package/dist/src/index.js CHANGED
@@ -1,2 +1,4 @@
1
1
  export { parseEnvFile } from './lib/parseEnv.js';
2
2
  export { diffEnv } from './lib/diffEnv.js';
3
+ process.env.API_KEY = '12345'; // for testing purposes
4
+ process.env.NEW_API_KEY = '67890'; // for testing purposes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotenv-diff",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
5
  "description": "Find differences between .env and .env.example / .env.* files. And optionally scan your codebase to find environment variables in use.",
6
6
  "bin": {