dotenv-diff 2.1.1 → 2.1.2

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.
Files changed (2) hide show
  1. package/README.md +21 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -63,6 +63,26 @@ You can also change the comparison file by using the `--example` flag to point t
63
63
  dotenv-diff --scan-usage --example .env.example.staging --ci
64
64
  ```
65
65
 
66
+ ## Use it in a Turborepo Monorepo
67
+
68
+ In a monorepo setup (e.g. with Turborepo), you often have multiple apps under apps/ and shared packages under packages/.
69
+ You can run dotenv-diff from one app and still include files from sibling apps or packages.
70
+
71
+ For example, if you want to scan from the apps/app1 folder and also include code in packages/auth, you can do:
72
+
73
+ ```json
74
+ {
75
+ "scripts": {
76
+ "dotenv-diff": "dotenv-diff --scan-usage --example .env.example --include-files '../../packages/**/*' --ignore VITE_MODE"
77
+ }
78
+ }
79
+ ```
80
+
81
+ This will:
82
+ - Compare the variables used in your `apps/app1` code against `apps/app1/.env.example`.
83
+ - Also scan files in `../../packages`(like `packages/components/src/..`)
84
+ - Ignore variables like VITE_MODE that you only use in special cases.
85
+
66
86
  ## Show unused variables
67
87
 
68
88
  Use `--show-unused` together with `--scan-usage` to list variables that are defined in `.env` but never used in your codebase:
@@ -158,12 +178,11 @@ Or provide just an example file and let the tool locate the appropriate `.env`:
158
178
  dotenv-diff --example .env.example.production
159
179
  ```
160
180
 
161
- ## CI usage
181
+ ## Automatically create missing files
162
182
 
163
183
  Run non-interactively in CI environments with:
164
184
 
165
185
  ```bash
166
- dotenv-diff --ci # never create files, exit 1 if required files are missing
167
186
  dotenv-diff --yes # auto-create missing files without prompts
168
187
  ```
169
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotenv-diff",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to find differences between .env and .env.example / .env.* files. And optionally scan your codebase to find out which environment variables are actually used in your code.",
6
6
  "bin": {