dotenv-diff 2.3.11 → 2.3.12
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 +138 -5
- package/README.md +112 -205
- package/dist/src/cli/run.js +6 -2
- package/dist/src/cli/run.js.map +1 -1
- package/dist/src/commands/compare.d.ts +1 -1
- package/dist/src/commands/compare.d.ts.map +1 -1
- package/dist/src/commands/compare.js.map +1 -1
- package/dist/src/commands/scanUsage.js +15 -2
- package/dist/src/commands/scanUsage.js.map +1 -1
- package/dist/src/config/types.d.ts +3 -1
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/core/determineComparisonFile.d.ts +7 -5
- package/dist/src/core/determineComparisonFile.d.ts.map +1 -1
- package/dist/src/core/determineComparisonFile.js +8 -3
- package/dist/src/core/determineComparisonFile.js.map +1 -1
- package/dist/src/core/envPairing.d.ts +9 -0
- package/dist/src/core/envPairing.d.ts.map +1 -0
- package/dist/src/core/envPairing.js +33 -0
- package/dist/src/core/envPairing.js.map +1 -0
- package/dist/src/core/helpers/resolveFromCwd.d.ts +11 -4
- package/dist/src/core/helpers/resolveFromCwd.d.ts.map +1 -1
- package/dist/src/core/helpers/resolveFromCwd.js +11 -4
- package/dist/src/core/helpers/resolveFromCwd.js.map +1 -1
- package/dist/src/core/scanJsonOutput.d.ts.map +1 -1
- package/dist/src/core/scanJsonOutput.js +1 -11
- package/dist/src/core/scanJsonOutput.js.map +1 -1
- package/dist/src/core/secretDetectors.d.ts.map +1 -1
- package/dist/src/core/secretDetectors.js +5 -0
- package/dist/src/core/secretDetectors.js.map +1 -1
- package/dist/src/index.js +5 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/codeBaseScanner.d.ts.map +1 -1
- package/dist/src/services/codeBaseScanner.js +1 -0
- package/dist/src/services/codeBaseScanner.js.map +1 -1
- package/dist/src/services/duplicates.d.ts +2 -4
- package/dist/src/services/duplicates.d.ts.map +1 -1
- package/dist/src/services/duplicates.js.map +1 -1
- package/dist/src/services/fileWalker.d.ts +7 -5
- package/dist/src/services/fileWalker.d.ts.map +1 -1
- package/dist/src/services/fileWalker.js +2 -2
- package/dist/src/services/fileWalker.js.map +1 -1
- package/dist/src/services/scanOutputToConsole.d.ts +8 -6
- package/dist/src/services/scanOutputToConsole.d.ts.map +1 -1
- package/dist/src/services/scanOutputToConsole.js +3 -11
- package/dist/src/services/scanOutputToConsole.js.map +1 -1
- package/dist/src/ui/scan/printHeader.d.ts.map +1 -1
- package/dist/src/ui/scan/printHeader.js +0 -3
- package/dist/src/ui/scan/printHeader.js.map +1 -1
- package/dist/src/ui/scan/printStats.d.ts +1 -0
- package/dist/src/ui/scan/printStats.d.ts.map +1 -1
- package/dist/src/ui/scan/printStats.js +2 -0
- package/dist/src/ui/scan/printStats.js.map +1 -1
- package/dist/src/ui/shared/printAutoFix.js +1 -1
- package/dist/src/ui/shared/printAutoFix.js.map +1 -1
- package/dist/src/ui/shared/printConfigStatus.d.ts +2 -2
- package/dist/src/ui/shared/printConfigStatus.d.ts.map +1 -1
- package/dist/src/ui/shared/printConfigStatus.js +5 -3
- package/dist/src/ui/shared/printConfigStatus.js.map +1 -1
- package/package.json +18 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,108 +1,168 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
|
|
2
3
|
All notable changes to this project will be documented in this file.
|
|
3
4
|
This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/).
|
|
4
5
|
|
|
5
6
|
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
-
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
-
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
-
|
|
19
|
+
|
|
20
|
+
## [2.3.12] - 2025-12-18
|
|
21
|
+
|
|
6
22
|
### Added
|
|
7
|
-
|
|
23
|
+
|
|
24
|
+
- Added warnings count to scan usage stats.
|
|
8
25
|
|
|
9
26
|
### Changed
|
|
10
|
-
|
|
27
|
+
|
|
28
|
+
- Updated dependencies to latest versions.
|
|
29
|
+
- Moved `healthScore` further down on the console output for better visibility of issues.
|
|
30
|
+
- Removed used variables output from scan usage to reduce noise.
|
|
31
|
+
- Removed header output from scan usage to reduce noise.
|
|
32
|
+
- Shortened config file path in CLI output to show only the filename.
|
|
33
|
+
- Updated README documentation for better clarity.
|
|
11
34
|
|
|
12
35
|
### Fixed
|
|
13
|
-
|
|
36
|
+
|
|
37
|
+
- Fixed false positive secret detection for certain harmless attribute keys in codebase scanner.
|
|
38
|
+
- Fixed print fix bug
|
|
14
39
|
|
|
15
40
|
## [2.3.11] - 2025-12-13
|
|
41
|
+
|
|
16
42
|
### Changed
|
|
43
|
+
|
|
17
44
|
- Removed low severity secrets from codebase scanner results, because it made too much noise.
|
|
18
45
|
|
|
19
46
|
## [2.3.10] - 2025-12-11
|
|
47
|
+
|
|
20
48
|
### Added
|
|
49
|
+
|
|
21
50
|
- More jsDocs for better code documentation.
|
|
22
51
|
- t3-env integration to validate environment variable usage against T3 stack schema.
|
|
23
52
|
|
|
24
53
|
### Fixed
|
|
54
|
+
|
|
25
55
|
- Removed unused code for old --no-compare option.
|
|
26
56
|
|
|
27
57
|
## [2.3.9] - 2025-12-09
|
|
58
|
+
|
|
28
59
|
### Added
|
|
60
|
+
|
|
29
61
|
- Added expiration date warnings for environment variables in codebase scanner.
|
|
30
62
|
- Added inconsistent naming warnings for environment variables in codebase scanner.
|
|
31
63
|
|
|
32
64
|
### Changed
|
|
65
|
+
|
|
33
66
|
- Changed health score calculation weights for better accuracy.
|
|
34
67
|
- Removed CSP detection from codebase scanner, as it was causing false positives in some cases for backend frameworks.
|
|
35
68
|
|
|
36
69
|
## [2.3.8] - 2025-12-08
|
|
70
|
+
|
|
37
71
|
### Added
|
|
72
|
+
|
|
38
73
|
- Added variables not using uppercase letters warning to codebase scanner.
|
|
39
74
|
- Added health score feature to codebase scanner.
|
|
40
75
|
|
|
41
76
|
### Changed
|
|
77
|
+
|
|
42
78
|
- Removed --no-compare option from CLI and config file.
|
|
43
79
|
- Updated dependencies to latest versions.
|
|
44
80
|
|
|
45
81
|
### Fixed
|
|
82
|
+
|
|
46
83
|
- Fixed issue where show-stats and show-unused options were not working as expected in config file.
|
|
47
84
|
|
|
48
85
|
## [2.3.7] - 2025-12-03
|
|
86
|
+
|
|
49
87
|
### Added
|
|
88
|
+
|
|
50
89
|
- Added warning for environment variables logged to console in codebase scanner.
|
|
51
90
|
|
|
52
91
|
### Changed
|
|
92
|
+
|
|
53
93
|
- Updated dependencies to latest versions.
|
|
54
94
|
|
|
55
95
|
### Fixed
|
|
96
|
+
|
|
56
97
|
- Updated jsDocs for better code documentation.
|
|
57
98
|
- Updated some functions for better type safety.
|
|
58
99
|
|
|
59
100
|
## [2.3.6] - 2025-12-02
|
|
101
|
+
|
|
60
102
|
### Added
|
|
103
|
+
|
|
61
104
|
- Added strict mode handling for framework specific warnings.
|
|
62
105
|
- Added Next.js specific warnings to framework validator.
|
|
63
106
|
|
|
64
107
|
### Fixed
|
|
108
|
+
|
|
65
109
|
- Nameing convention fix in frameworkValidator.ts
|
|
66
110
|
|
|
67
111
|
## [2.3.5] - 2025-12-01
|
|
112
|
+
|
|
68
113
|
### Added
|
|
114
|
+
|
|
69
115
|
- Added more sveltekit specific warnings to codebase scanner.
|
|
70
116
|
- Added warning for potential secrets in .env.example file.
|
|
71
117
|
|
|
72
118
|
### Fixed
|
|
119
|
+
|
|
73
120
|
- Duration refactored for better code maintainability.
|
|
74
121
|
|
|
75
122
|
## [2.3.4] - 2025-11-05
|
|
123
|
+
|
|
76
124
|
### Fixed
|
|
125
|
+
|
|
77
126
|
- Fixed issue where CSP detection was not working as expected in some file types.
|
|
78
127
|
|
|
79
128
|
## [2.3.3] - 2025-11-30
|
|
129
|
+
|
|
80
130
|
### Added
|
|
131
|
+
|
|
81
132
|
- Added Content-Security-Policy (CSP) detection to codebase scanner.
|
|
82
133
|
- Warns if no CSP is found in HTML/JS/TS files.
|
|
83
134
|
|
|
84
135
|
### Changed
|
|
136
|
+
|
|
85
137
|
- No breaking changes.
|
|
86
138
|
|
|
87
139
|
## [2.3.2] - 2025-11-01
|
|
140
|
+
|
|
88
141
|
### Added
|
|
142
|
+
|
|
89
143
|
- Added duration output to scan statistics.
|
|
90
144
|
- Severity levels for secret findings: high, medium, low.
|
|
91
145
|
|
|
92
146
|
### Changed
|
|
147
|
+
|
|
93
148
|
- Updated dependencies to latest versions.
|
|
94
149
|
- Improved README documentation for clarity.
|
|
95
150
|
- No breaking changes.
|
|
96
151
|
|
|
97
152
|
## [2.3.1] - 2025-10-08
|
|
153
|
+
|
|
98
154
|
### Fixed
|
|
155
|
+
|
|
99
156
|
- Fixed dotenv-diff.config.json not found in monorepo root when running from apps.
|
|
100
157
|
|
|
101
158
|
## [2.3.0] - 2025-10-07
|
|
159
|
+
|
|
102
160
|
### Fixed
|
|
161
|
+
|
|
103
162
|
- Fixed issue where .env.example would be ignored by git when using --fix flag.
|
|
104
163
|
|
|
105
164
|
### Added
|
|
165
|
+
|
|
106
166
|
- HTML comments to ignore secret detection in HTML lines (e.g. `<!-- dotenv-diff-ignore -->`).
|
|
107
167
|
- Also ignore html sections with `<!-- dotenv-diff-ignore-start -->` and `<!-- dotenv-diff-ignore-end -->`.
|
|
108
168
|
- Added option to have a dotenv-diff.config.json file for configuration.
|
|
@@ -111,203 +171,276 @@ This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semant
|
|
|
111
171
|
- --no-compare flag to disable comparison mode in scan usage. and noCompare option in config file.
|
|
112
172
|
|
|
113
173
|
## [2.2.8] - 2025-09-30
|
|
174
|
+
|
|
114
175
|
### Added
|
|
176
|
+
|
|
115
177
|
- Fix .env is not ignored by git when using --fix flag.
|
|
116
178
|
|
|
117
179
|
### Changed
|
|
180
|
+
|
|
118
181
|
- No breaking changes.
|
|
119
182
|
|
|
120
183
|
### Fixed
|
|
184
|
+
|
|
121
185
|
- Refactored codebase for better maintainability.
|
|
122
186
|
|
|
123
187
|
## [2.2.7] - 2025-09-28
|
|
188
|
+
|
|
124
189
|
### Added
|
|
190
|
+
|
|
125
191
|
- Added warning on .env not ignored by .gitignore on default.
|
|
126
192
|
- added `dotenv-diff-ignore` comment to ignore lines from secret detection.
|
|
127
193
|
|
|
128
194
|
### Fixed
|
|
195
|
+
|
|
129
196
|
- Fixed `--strict` error output to console when no warnings are found.
|
|
130
197
|
|
|
131
198
|
### Changed
|
|
199
|
+
|
|
132
200
|
- No breaking changes.
|
|
133
201
|
- Updated dependencies to latest versions.
|
|
134
202
|
|
|
135
203
|
## [2.2.6] - 2025-09-25
|
|
204
|
+
|
|
136
205
|
### Added
|
|
206
|
+
|
|
137
207
|
- Added `placeholder`, `127.0.0.1`, and `example` to `looksHarmless` secret detection rule.
|
|
138
208
|
- Added `HTTP URL detected` message to potential secrets output.
|
|
139
209
|
|
|
140
210
|
### Fixed
|
|
211
|
+
|
|
141
212
|
- Removed `All used environment variables are defined in {.env}` when there are no used variables found.
|
|
142
213
|
|
|
143
214
|
### Changed
|
|
215
|
+
|
|
144
216
|
- No breaking changes.
|
|
145
217
|
|
|
146
218
|
## [2.2.5] - 2025-09-18
|
|
219
|
+
|
|
147
220
|
### Added
|
|
221
|
+
|
|
148
222
|
- Updated README with `--strict` flag documentation.
|
|
149
223
|
|
|
150
224
|
### Fixed
|
|
225
|
+
|
|
151
226
|
- Fixed false positives for HTTPS URLs in SVG files and SVG namespace URLs.
|
|
152
227
|
|
|
153
228
|
### Changed
|
|
229
|
+
|
|
154
230
|
- No breaking changes.
|
|
155
231
|
|
|
156
232
|
## [2.2.4] - 2025-09-13
|
|
233
|
+
|
|
157
234
|
### Fixed
|
|
235
|
+
|
|
158
236
|
- Fixed found variable count did not show when there were missing variables in .env
|
|
159
237
|
- Will now not says "Found 2 unique environment variables in use" if there are found in commented out code.
|
|
160
238
|
- Fixed bug where it would say "no unused variables" if there where no found variables at all.
|
|
161
239
|
|
|
162
240
|
### Changed
|
|
241
|
+
|
|
163
242
|
- No breaking changes.
|
|
164
243
|
|
|
165
244
|
## [2.2.3] - 2025-09-08
|
|
245
|
+
|
|
166
246
|
### Added
|
|
247
|
+
|
|
167
248
|
- Warning for HTTPS URLs detected in codebase.
|
|
168
249
|
- Added duplicate key detection to codebase scanner.
|
|
169
250
|
- added `--strict` flag to enable strict mode (treat warnings as errors).
|
|
170
251
|
- duplicate key detection for `.env.example` files.
|
|
171
252
|
|
|
172
253
|
### Fixed
|
|
254
|
+
|
|
173
255
|
- Fixed issue with false warnings on secrets in certain edge cases.
|
|
174
256
|
- Updated README
|
|
175
257
|
|
|
176
258
|
### Changed
|
|
259
|
+
|
|
177
260
|
- No breaking changes.
|
|
178
261
|
- `--compare` feature coloring improved for better readability.
|
|
179
262
|
- added `duplicate` warnings to scan results.
|
|
180
263
|
|
|
181
264
|
## [2.2.2] - 2025-09-07
|
|
265
|
+
|
|
182
266
|
### Fixed
|
|
267
|
+
|
|
183
268
|
- Fixed issue where it would give a false warning on secrets with process.env
|
|
184
269
|
- Code cleanup.
|
|
185
270
|
- exclude `.svelte-kit` from codebase scan by default.
|
|
186
271
|
- Updated README
|
|
187
272
|
|
|
188
273
|
### Changed
|
|
274
|
+
|
|
189
275
|
- No breaking changes.
|
|
190
276
|
|
|
191
277
|
## [2.2.1] - 2025-09-06
|
|
278
|
+
|
|
192
279
|
### Changed
|
|
280
|
+
|
|
193
281
|
- tsconfig updates for improved type checking.
|
|
194
282
|
- Updated codebase for new tsconfig rules
|
|
195
283
|
- No breaking changes.
|
|
196
284
|
|
|
197
285
|
### Added
|
|
286
|
+
|
|
198
287
|
- Improved jsDocs for better code documentation.
|
|
199
288
|
|
|
200
289
|
## [2.2.0] - 2025-08-30
|
|
290
|
+
|
|
201
291
|
### Added
|
|
292
|
+
|
|
202
293
|
- `--compare` flag to enable comparison mode.
|
|
203
294
|
- `dotenv-diff` will now detect potential secrets in your codebase.
|
|
204
295
|
|
|
205
296
|
### Changed
|
|
297
|
+
|
|
206
298
|
- Default behavior is now **scan-usage** (you no longer need `--scan-usage`), but you can still use it for clarity.
|
|
207
299
|
- `--compare` flag is now required for all comparison operations.
|
|
208
300
|
|
|
209
|
-
|
|
210
301
|
## [2.1.7] - 2025-08-28
|
|
302
|
+
|
|
211
303
|
### Added
|
|
304
|
+
|
|
212
305
|
- gif to README file.
|
|
213
306
|
|
|
214
307
|
### Changed
|
|
308
|
+
|
|
215
309
|
- No breaking changes. Existing functionality remains intact.
|
|
216
310
|
|
|
217
311
|
## [2.1.6] - 2025-08-26
|
|
312
|
+
|
|
218
313
|
### fixed
|
|
314
|
+
|
|
219
315
|
- Fixed issue where prompts were disabled when using `--env` and `--example` flags.
|
|
220
316
|
|
|
221
317
|
## Changed
|
|
318
|
+
|
|
222
319
|
- No breaking changes. Existing functionality remains intact.
|
|
223
320
|
|
|
224
321
|
## [2.1.5] - 2025-08-25
|
|
322
|
+
|
|
225
323
|
### Added
|
|
324
|
+
|
|
226
325
|
- Added `--no-color` option to disable colored output.
|
|
227
326
|
|
|
228
327
|
### Changed
|
|
328
|
+
|
|
229
329
|
- No breaking changes. Existing functionality remains intact.
|
|
230
330
|
|
|
231
331
|
## [2.1.4] - 2025-08-19
|
|
332
|
+
|
|
232
333
|
### Added
|
|
334
|
+
|
|
233
335
|
- the `--fix` flag to automatically fix common issues:
|
|
234
336
|
- Remove duplicate keys (keeping the last occurrence).
|
|
235
337
|
- Add missing keys from the example file with empty values.
|
|
236
338
|
|
|
237
339
|
### Changed
|
|
340
|
+
|
|
238
341
|
- No breaking changes. Existing functionality remains intact.
|
|
239
342
|
|
|
240
343
|
## [2.1.3] - 2025-08-19
|
|
344
|
+
|
|
241
345
|
### Added
|
|
346
|
+
|
|
242
347
|
- Added `.sveltekit` and `_actions` to default exclude patterns in codebase scanner.
|
|
243
348
|
|
|
244
349
|
### Changed
|
|
350
|
+
|
|
245
351
|
- No breaking changes. Existing functionality remains intact.
|
|
246
352
|
|
|
247
353
|
### Fixed
|
|
354
|
+
|
|
248
355
|
- Fixed issue where `--include-files` and `--exclude-files` were not properly documented in README.
|
|
249
356
|
|
|
250
357
|
## [2.1.2] - 2025-08-16
|
|
358
|
+
|
|
251
359
|
### Changed
|
|
360
|
+
|
|
252
361
|
- Updated README with Turborepo usage example.
|
|
253
362
|
|
|
254
363
|
## [2.1.1] - 2025-08-16
|
|
364
|
+
|
|
255
365
|
### Added
|
|
366
|
+
|
|
256
367
|
- `--files` option to **completely override** the default file patterns.
|
|
257
368
|
Useful for including files that are normally excluded (e.g. `*.test.js`).
|
|
258
369
|
|
|
259
370
|
### Changed
|
|
260
|
-
|
|
371
|
+
|
|
372
|
+
- Clarified behavior of `--include-files`: now explicitly extends the default patterns instead of replacing them.
|
|
261
373
|
- Updated README with usage examples for `--files`, `--include-files`, and `--exclude-files`.
|
|
262
374
|
|
|
263
375
|
## [2.1.0] - 2025-08-15
|
|
376
|
+
|
|
264
377
|
### Added
|
|
378
|
+
|
|
265
379
|
- `--ci` option for non-interactive mode in CI environments.
|
|
266
380
|
|
|
267
381
|
### Changed
|
|
382
|
+
|
|
268
383
|
- No breaking changes. Existing functionality remains intact.
|
|
269
384
|
|
|
270
385
|
## [2.0.0] - 2025-08-14
|
|
386
|
+
|
|
271
387
|
### Added
|
|
388
|
+
|
|
272
389
|
- `--scan-usage` option to scan codebase for environment variable usage.
|
|
273
390
|
- `--include-files` and `--exclude-files` options to specify which files to include or exclude from the scan.
|
|
274
391
|
- `--show-unused` option to display variables defined in `.env` but not used in code.
|
|
275
392
|
- `--show-stats` option to display scan statistics.
|
|
276
393
|
|
|
277
394
|
### Changed
|
|
395
|
+
|
|
278
396
|
- No breaking changes. Existing functionality remains intact.
|
|
279
397
|
|
|
280
398
|
## [1.6.5] - 2025-08-13
|
|
399
|
+
|
|
281
400
|
### Added
|
|
401
|
+
|
|
282
402
|
- `--only` flag to restrict output to specific categories (e.g., `missing`, `extra`, `empty`, `mismatches`, `duplicates`, `gitignore`).
|
|
283
403
|
|
|
284
404
|
## [1.6.4] - 2025-08-12
|
|
405
|
+
|
|
285
406
|
### Added
|
|
407
|
+
|
|
286
408
|
- `--ignore` and `--ignore-regex` options to specify files or directories to ignore during comparison.
|
|
287
409
|
|
|
288
410
|
## [1.6.3] - 2025-08-11
|
|
411
|
+
|
|
289
412
|
### Added
|
|
413
|
+
|
|
290
414
|
- `--json` option to output results in JSON format. (Non-breaking)
|
|
291
415
|
|
|
292
416
|
## [1.6.2] - 2025-08-10
|
|
417
|
+
|
|
293
418
|
### Added
|
|
419
|
+
|
|
294
420
|
- Duplicate key detection for `.env*` files.
|
|
295
421
|
- Prints warnings listing duplicate keys (last occurrence wins).
|
|
296
422
|
- Suppress via `--allow-duplicates`.
|
|
297
423
|
|
|
298
424
|
### Changed
|
|
425
|
+
|
|
299
426
|
- No breaking changes. Exit codes and diff behavior unchanged.
|
|
300
427
|
|
|
301
428
|
## [1.6.1] - 2025-08-09
|
|
429
|
+
|
|
302
430
|
### Build
|
|
431
|
+
|
|
303
432
|
- Updated TypeScript configuration to include `bin` directory.
|
|
304
433
|
- Switched CLI path to `bin/dotenv-diff.js` for consistency.
|
|
305
434
|
- Refactored folder structure for better organization.
|
|
306
435
|
|
|
307
436
|
## [1.6.0] - 2025-08-08
|
|
437
|
+
|
|
308
438
|
### Added
|
|
439
|
+
|
|
309
440
|
- `--env` and `--example` for direct file comparison; autoscan overridden when both are provided.
|
|
310
441
|
|
|
311
442
|
## [1.5.0] - 2025-08-07
|
|
443
|
+
|
|
312
444
|
### Added
|
|
445
|
+
|
|
313
446
|
- Non-interactive modes: `--ci` and `--yes`.
|