dotenv-diff 2.7.1 → 2.7.3

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 (110) hide show
  1. package/CHANGELOG.md +51 -38
  2. package/README.md +22 -13
  3. package/dist/bin/dotenv-diff.js +0 -0
  4. package/dist/src/commands/compare.d.ts.map +1 -1
  5. package/dist/src/commands/compare.js +141 -89
  6. package/dist/src/commands/compare.js.map +1 -1
  7. package/dist/src/config/constants.d.ts.map +1 -1
  8. package/dist/src/config/constants.js.map +1 -1
  9. package/dist/src/config/options.js +1 -1
  10. package/dist/src/config/options.js.map +1 -1
  11. package/dist/src/config/types.d.ts +4 -2
  12. package/dist/src/config/types.d.ts.map +1 -1
  13. package/dist/src/core/compare/calculateStats.js +1 -1
  14. package/dist/src/core/compare/calculateStats.js.map +1 -1
  15. package/dist/src/core/compare/parseAndFilterEnv.d.ts.map +1 -1
  16. package/dist/src/core/compare/parseAndFilterEnv.js +1 -1
  17. package/dist/src/core/compare/parseAndFilterEnv.js.map +1 -1
  18. package/dist/src/core/filterIgnoredKeys.d.ts.map +1 -1
  19. package/dist/src/core/filterIgnoredKeys.js +3 -1
  20. package/dist/src/core/filterIgnoredKeys.js.map +1 -1
  21. package/dist/src/core/frameworks/nextJsRules.js +1 -1
  22. package/dist/src/core/frameworks/nextJsRules.js.map +1 -1
  23. package/dist/src/core/frameworks/sveltekitRules.d.ts.map +1 -1
  24. package/dist/src/core/frameworks/sveltekitRules.js +9 -9
  25. package/dist/src/core/frameworks/sveltekitRules.js.map +1 -1
  26. package/dist/src/core/parseEnv.d.ts +3 -3
  27. package/dist/src/core/parseEnv.d.ts.map +1 -1
  28. package/dist/src/core/parseEnv.js +6 -21
  29. package/dist/src/core/parseEnv.js.map +1 -1
  30. package/dist/src/core/scan/scanFile.js.map +1 -1
  31. package/dist/src/core/security/exampleSecretDetector.js +1 -1
  32. package/dist/src/index.d.ts +2 -1
  33. package/dist/src/index.d.ts.map +1 -1
  34. package/dist/src/index.js +2 -1
  35. package/dist/src/index.js.map +1 -1
  36. package/dist/src/services/envDiscovery.js +2 -2
  37. package/dist/src/services/envDiscovery.js.map +1 -1
  38. package/dist/src/services/parseEnvFile.d.ts +8 -0
  39. package/dist/src/services/parseEnvFile.d.ts.map +1 -0
  40. package/dist/src/services/parseEnvFile.js +28 -0
  41. package/dist/src/services/parseEnvFile.js.map +1 -0
  42. package/dist/src/services/processComparisonFile.js +1 -1
  43. package/dist/src/services/processComparisonFile.js.map +1 -1
  44. package/dist/src/ui/compare/printErrorNotFound.d.ts.map +1 -1
  45. package/dist/src/ui/compare/printErrorNotFound.js.map +1 -1
  46. package/dist/src/ui/compare/printHeader.d.ts.map +1 -1
  47. package/dist/src/ui/compare/printHeader.js.map +1 -1
  48. package/dist/src/ui/compare/printIssues.d.ts.map +1 -1
  49. package/dist/src/ui/compare/printIssues.js.map +1 -1
  50. package/dist/src/ui/scan/printConsolelogWarning.d.ts.map +1 -1
  51. package/dist/src/ui/scan/printConsolelogWarning.js +1 -1
  52. package/dist/src/ui/scan/printConsolelogWarning.js.map +1 -1
  53. package/dist/src/ui/scan/printExampleWarnings.d.ts.map +1 -1
  54. package/dist/src/ui/scan/printExampleWarnings.js +3 -1
  55. package/dist/src/ui/scan/printExampleWarnings.js.map +1 -1
  56. package/dist/src/ui/scan/printExpireWarnings.d.ts.map +1 -1
  57. package/dist/src/ui/scan/printExpireWarnings.js +2 -6
  58. package/dist/src/ui/scan/printExpireWarnings.js.map +1 -1
  59. package/dist/src/ui/scan/printFrameworkWarnings.d.ts.map +1 -1
  60. package/dist/src/ui/scan/printFrameworkWarnings.js +1 -1
  61. package/dist/src/ui/scan/printFrameworkWarnings.js.map +1 -1
  62. package/dist/src/ui/scan/printHealthScore.d.ts.map +1 -1
  63. package/dist/src/ui/scan/printHealthScore.js +7 -4
  64. package/dist/src/ui/scan/printHealthScore.js.map +1 -1
  65. package/dist/src/ui/scan/printInconsistentNamingWarning.d.ts.map +1 -1
  66. package/dist/src/ui/scan/printInconsistentNamingWarning.js +1 -1
  67. package/dist/src/ui/scan/printInconsistentNamingWarning.js.map +1 -1
  68. package/dist/src/ui/scan/printMissing.d.ts.map +1 -1
  69. package/dist/src/ui/scan/printMissing.js +1 -1
  70. package/dist/src/ui/scan/printMissing.js.map +1 -1
  71. package/dist/src/ui/scan/printMissingExample.d.ts.map +1 -1
  72. package/dist/src/ui/scan/printMissingExample.js +1 -1
  73. package/dist/src/ui/scan/printMissingExample.js.map +1 -1
  74. package/dist/src/ui/scan/printSecrets.d.ts.map +1 -1
  75. package/dist/src/ui/scan/printSecrets.js +2 -2
  76. package/dist/src/ui/scan/printSecrets.js.map +1 -1
  77. package/dist/src/ui/scan/printStats.d.ts.map +1 -1
  78. package/dist/src/ui/scan/printStats.js.map +1 -1
  79. package/dist/src/ui/scan/printUnused.d.ts.map +1 -1
  80. package/dist/src/ui/scan/printUnused.js +1 -1
  81. package/dist/src/ui/scan/printUnused.js.map +1 -1
  82. package/dist/src/ui/scan/printUppercaseWarning.d.ts.map +1 -1
  83. package/dist/src/ui/scan/printUppercaseWarning.js +1 -1
  84. package/dist/src/ui/scan/printUppercaseWarning.js.map +1 -1
  85. package/dist/src/ui/shared/printAutoFix.d.ts.map +1 -1
  86. package/dist/src/ui/shared/printAutoFix.js.map +1 -1
  87. package/dist/src/ui/shared/printConfigStatus.d.ts.map +1 -1
  88. package/dist/src/ui/shared/printConfigStatus.js.map +1 -1
  89. package/dist/src/ui/shared/printDuplicates.d.ts +2 -7
  90. package/dist/src/ui/shared/printDuplicates.d.ts.map +1 -1
  91. package/dist/src/ui/shared/printDuplicates.js.map +1 -1
  92. package/dist/src/ui/shared/printGitignore.d.ts.map +1 -1
  93. package/dist/src/ui/shared/printGitignore.js.map +1 -1
  94. package/dist/src/ui/shared/printOptionErrors.d.ts.map +1 -1
  95. package/dist/src/ui/shared/printOptionErrors.js.map +1 -1
  96. package/dist/src/ui/theme.d.ts.map +1 -1
  97. package/dist/src/ui/theme.js.map +1 -1
  98. package/package.json +23 -23
  99. package/docs/assets/demo.gif +0 -0
  100. package/docs/assets/success.png +0 -0
  101. package/docs/capabilities.md +0 -85
  102. package/docs/configuration_and_flags.md +0 -726
  103. package/docs/expiration_warnings.md +0 -111
  104. package/docs/frameworks/index.md +0 -24
  105. package/docs/frameworks/nextjs_warnings.md +0 -56
  106. package/docs/frameworks/sveltekit_warnings.md +0 -130
  107. package/docs/git_hooks_ci.md +0 -51
  108. package/docs/ignore_comments.md +0 -82
  109. package/docs/index.md +0 -54
  110. package/docs/monorepo_support.md +0 -63
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - b448130: Fixed readme links
8
+
9
+ ## 2.7.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 41f8e5c: Updated dependencies and release scripts for all packages.
14
+ - da6fbaf: fixed preserve nested example paths
15
+
3
16
  All notable changes to this project will be documented in this file.
4
17
 
5
18
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -13,133 +26,133 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
26
 
14
27
  ### 🐛 Bug Fixes
15
28
 
16
- * expire warning ([#299](https://github.com/Chrilleweb/dotenv-diff/issues/299)) ([be0700f](https://github.com/Chrilleweb/dotenv-diff/commit/be0700f4fb27a63da1703f70d2be792e00d84731))
17
- * minor strict ui bug ([#294](https://github.com/Chrilleweb/dotenv-diff/issues/294)) ([7feb116](https://github.com/Chrilleweb/dotenv-diff/commit/7feb116217a5cacbff095dad2b745bdb2348c924))
18
- * removed white space ([#295](https://github.com/Chrilleweb/dotenv-diff/issues/295)) ([015afcc](https://github.com/Chrilleweb/dotenv-diff/commit/015afcc7ff593601d9ba7b87e6e162581180c16b))
19
- * secret detection bug ([#296](https://github.com/Chrilleweb/dotenv-diff/issues/296)) ([be5442b](https://github.com/Chrilleweb/dotenv-diff/commit/be5442b78a6ae99abcfe7eb682c6b1903cdf823f))
20
- * text for inco naming ([#297](https://github.com/Chrilleweb/dotenv-diff/issues/297)) ([8e2a9be](https://github.com/Chrilleweb/dotenv-diff/commit/8e2a9bebfbd07bcb43c364f8295900ad467a5337))
21
- * typo in print unused ([#298](https://github.com/Chrilleweb/dotenv-diff/issues/298)) ([fe56942](https://github.com/Chrilleweb/dotenv-diff/commit/fe56942c4caa3efebc0ee53bc313dbf6449f4484))
29
+ - expire warning ([#299](https://github.com/Chrilleweb/dotenv-diff/issues/299)) ([be0700f](https://github.com/Chrilleweb/dotenv-diff/commit/be0700f4fb27a63da1703f70d2be792e00d84731))
30
+ - minor strict ui bug ([#294](https://github.com/Chrilleweb/dotenv-diff/issues/294)) ([7feb116](https://github.com/Chrilleweb/dotenv-diff/commit/7feb116217a5cacbff095dad2b745bdb2348c924))
31
+ - removed white space ([#295](https://github.com/Chrilleweb/dotenv-diff/issues/295)) ([015afcc](https://github.com/Chrilleweb/dotenv-diff/commit/015afcc7ff593601d9ba7b87e6e162581180c16b))
32
+ - secret detection bug ([#296](https://github.com/Chrilleweb/dotenv-diff/issues/296)) ([be5442b](https://github.com/Chrilleweb/dotenv-diff/commit/be5442b78a6ae99abcfe7eb682c6b1903cdf823f))
33
+ - text for inco naming ([#297](https://github.com/Chrilleweb/dotenv-diff/issues/297)) ([8e2a9be](https://github.com/Chrilleweb/dotenv-diff/commit/8e2a9bebfbd07bcb43c364f8295900ad467a5337))
34
+ - typo in print unused ([#298](https://github.com/Chrilleweb/dotenv-diff/issues/298)) ([fe56942](https://github.com/Chrilleweb/dotenv-diff/commit/fe56942c4caa3efebc0ee53bc313dbf6449f4484))
22
35
 
23
36
  ## [2.7.0](https://github.com/Chrilleweb/dotenv-diff/compare/v2.6.4...v2.7.0) (2026-03-04)
24
37
 
25
38
  ### ✨ Features
26
39
 
27
- * new UI design ([#293](https://github.com/Chrilleweb/dotenv-diff/issues/293)) ([417b8ef](https://github.com/Chrilleweb/dotenv-diff/commit/417b8ef678bbdf2a8e12b36b030df4bfb8dba8d7))
40
+ - new UI design ([#293](https://github.com/Chrilleweb/dotenv-diff/issues/293)) ([417b8ef](https://github.com/Chrilleweb/dotenv-diff/commit/417b8ef678bbdf2a8e12b36b030df4bfb8dba8d7))
28
41
 
29
42
  ## [2.6.4](https://github.com/Chrilleweb/dotenv-diff/compare/v2.6.3...v2.6.4) (2026-02-28)
30
43
 
31
44
  ### 🐛 Bug Fixes
32
45
 
33
- * added support for mts and cts ([#288](https://github.com/Chrilleweb/dotenv-diff/issues/288)) ([93874bf](https://github.com/Chrilleweb/dotenv-diff/commit/93874bfeb67999b43bdcb87814fbc080c650f923))
46
+ - added support for mts and cts ([#288](https://github.com/Chrilleweb/dotenv-diff/issues/288)) ([93874bf](https://github.com/Chrilleweb/dotenv-diff/commit/93874bfeb67999b43bdcb87814fbc080c650f923))
34
47
 
35
48
  ### 📝 Documentation
36
49
 
37
- * updated docs ([#287](https://github.com/Chrilleweb/dotenv-diff/issues/287)) ([d3f36f4](https://github.com/Chrilleweb/dotenv-diff/commit/d3f36f437748218028fe21843aa5b495d31c3639))
50
+ - updated docs ([#287](https://github.com/Chrilleweb/dotenv-diff/issues/287)) ([d3f36f4](https://github.com/Chrilleweb/dotenv-diff/commit/d3f36f437748218028fe21843aa5b495d31c3639))
38
51
 
39
52
  ## [2.6.3](https://github.com/Chrilleweb/dotenv-diff/compare/v2.6.2...v2.6.3) (2026-02-26)
40
53
 
41
54
  ### 🐛 Bug Fixes
42
55
 
43
- * skip path ([#281](https://github.com/Chrilleweb/dotenv-diff/issues/281)) ([eec0d13](https://github.com/Chrilleweb/dotenv-diff/commit/eec0d13dddb581072f05a1168ad52e65f41693bf))
44
- * variables patterns ([#282](https://github.com/Chrilleweb/dotenv-diff/issues/282)) ([67515a0](https://github.com/Chrilleweb/dotenv-diff/commit/67515a04c46e1f373041cfe434c4eca01eb36c81))
56
+ - skip path ([#281](https://github.com/Chrilleweb/dotenv-diff/issues/281)) ([eec0d13](https://github.com/Chrilleweb/dotenv-diff/commit/eec0d13dddb581072f05a1168ad52e65f41693bf))
57
+ - variables patterns ([#282](https://github.com/Chrilleweb/dotenv-diff/issues/282)) ([67515a0](https://github.com/Chrilleweb/dotenv-diff/commit/67515a04c46e1f373041cfe434c4eca01eb36c81))
45
58
 
46
59
  ## [2.6.2](https://github.com/Chrilleweb/dotenv-diff/compare/v2.6.1...v2.6.2) (2026-02-24)
47
60
 
48
61
  ### 🐛 Bug Fixes
49
62
 
50
- * emoji health score ([#275](https://github.com/Chrilleweb/dotenv-diff/issues/275)) ([b7d8499](https://github.com/Chrilleweb/dotenv-diff/commit/b7d84997286e44a249461554b6deb55e90d10c8c))
51
- * updated dependencies ([#278](https://github.com/Chrilleweb/dotenv-diff/issues/278)) ([f172462](https://github.com/Chrilleweb/dotenv-diff/commit/f17246285556769996273e090649bf44c838920f))
63
+ - emoji health score ([#275](https://github.com/Chrilleweb/dotenv-diff/issues/275)) ([b7d8499](https://github.com/Chrilleweb/dotenv-diff/commit/b7d84997286e44a249461554b6deb55e90d10c8c))
64
+ - updated dependencies ([#278](https://github.com/Chrilleweb/dotenv-diff/issues/278)) ([f172462](https://github.com/Chrilleweb/dotenv-diff/commit/f17246285556769996273e090649bf44c838920f))
52
65
 
53
66
  ### 📝 Documentation
54
67
 
55
- * interface docs ([#276](https://github.com/Chrilleweb/dotenv-diff/issues/276)) ([c6789e7](https://github.com/Chrilleweb/dotenv-diff/commit/c6789e75dfe3eae1801cbce52cc6425555a79ab1))
56
- * updated docs ([#279](https://github.com/Chrilleweb/dotenv-diff/issues/279)) ([a2bfeea](https://github.com/Chrilleweb/dotenv-diff/commit/a2bfeea14dec18dc927e902bf2f6e4c9b86c729a))
68
+ - interface docs ([#276](https://github.com/Chrilleweb/dotenv-diff/issues/276)) ([c6789e7](https://github.com/Chrilleweb/dotenv-diff/commit/c6789e75dfe3eae1801cbce52cc6425555a79ab1))
69
+ - updated docs ([#279](https://github.com/Chrilleweb/dotenv-diff/issues/279)) ([a2bfeea](https://github.com/Chrilleweb/dotenv-diff/commit/a2bfeea14dec18dc927e902bf2f6e4c9b86c729a))
57
70
 
58
71
  ## [2.6.1](https://github.com/Chrilleweb/dotenv-diff/compare/v2.6.0...v2.6.1) (2026-02-13)
59
72
 
60
73
  ### 🐛 Bug Fixes
61
74
 
62
- * Expire env warning json ([#267](https://github.com/Chrilleweb/dotenv-diff/issues/267)) ([c029e4c](https://github.com/Chrilleweb/dotenv-diff/commit/c029e4ccbfedfdc630afaf28b7dd37b867aa734f))
63
- * logged json output ([#268](https://github.com/Chrilleweb/dotenv-diff/issues/268)) ([4a9107a](https://github.com/Chrilleweb/dotenv-diff/commit/4a9107a9167ab086d13ee4be6f91fe8f0015eeee))
75
+ - Expire env warning json ([#267](https://github.com/Chrilleweb/dotenv-diff/issues/267)) ([c029e4c](https://github.com/Chrilleweb/dotenv-diff/commit/c029e4ccbfedfdc630afaf28b7dd37b867aa734f))
76
+ - logged json output ([#268](https://github.com/Chrilleweb/dotenv-diff/issues/268)) ([4a9107a](https://github.com/Chrilleweb/dotenv-diff/commit/4a9107a9167ab086d13ee4be6f91fe8f0015eeee))
64
77
 
65
78
  ## [2.6.0](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.9...v2.6.0) (2026-02-06)
66
79
 
67
80
  ### ✨ Features
68
81
 
69
- * prompt if no env file is found ([#262](https://github.com/Chrilleweb/dotenv-diff/issues/262)) ([c14adf4](https://github.com/Chrilleweb/dotenv-diff/commit/c14adf4206fc045833d985f1d599b5ac92a2a399))
82
+ - prompt if no env file is found ([#262](https://github.com/Chrilleweb/dotenv-diff/issues/262)) ([c14adf4](https://github.com/Chrilleweb/dotenv-diff/commit/c14adf4206fc045833d985f1d599b5ac92a2a399))
70
83
 
71
84
  ### 🐛 Bug Fixes
72
85
 
73
- * Added more space after prompt ([#263](https://github.com/Chrilleweb/dotenv-diff/issues/263)) ([c5e5770](https://github.com/Chrilleweb/dotenv-diff/commit/c5e57700dabb25ef43635c7a53b7d903244fadc0))
86
+ - Added more space after prompt ([#263](https://github.com/Chrilleweb/dotenv-diff/issues/263)) ([c5e5770](https://github.com/Chrilleweb/dotenv-diff/commit/c5e57700dabb25ef43635c7a53b7d903244fadc0))
74
87
 
75
88
  ### 📝 Documentation
76
89
 
77
- * moved -y flag up ([#261](https://github.com/Chrilleweb/dotenv-diff/issues/261)) ([08d0530](https://github.com/Chrilleweb/dotenv-diff/commit/08d0530a5c4f5aa183540b4b4afd647894f019ca))
90
+ - moved -y flag up ([#261](https://github.com/Chrilleweb/dotenv-diff/issues/261)) ([08d0530](https://github.com/Chrilleweb/dotenv-diff/commit/08d0530a5c4f5aa183540b4b4afd647894f019ca))
78
91
 
79
92
  ## [2.5.9](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.8...v2.5.9) (2026-02-02)
80
93
 
81
94
  ### 🐛 Bug Fixes
82
95
 
83
- * removed ci warning on missing - duplicate ([#254](https://github.com/Chrilleweb/dotenv-diff/issues/254)) ([b9e70f0](https://github.com/Chrilleweb/dotenv-diff/commit/b9e70f03eeaa764176ae67d4b2b16e6b58cd5c9c))
84
- * **scan:** json output order ([#255](https://github.com/Chrilleweb/dotenv-diff/issues/255)) ([db3fd14](https://github.com/Chrilleweb/dotenv-diff/commit/db3fd1469603e33347bb91da83dded90bb0fefb4))
96
+ - removed ci warning on missing - duplicate ([#254](https://github.com/Chrilleweb/dotenv-diff/issues/254)) ([b9e70f0](https://github.com/Chrilleweb/dotenv-diff/commit/b9e70f03eeaa764176ae67d4b2b16e6b58cd5c9c))
97
+ - **scan:** json output order ([#255](https://github.com/Chrilleweb/dotenv-diff/issues/255)) ([db3fd14](https://github.com/Chrilleweb/dotenv-diff/commit/db3fd1469603e33347bb91da83dded90bb0fefb4))
85
98
 
86
99
  ### 📝 Documentation
87
100
 
88
- * Config and flags ([#256](https://github.com/Chrilleweb/dotenv-diff/issues/256)) ([996e636](https://github.com/Chrilleweb/dotenv-diff/commit/996e6366bea9a0392d029d1f29835c5779ac2556))
101
+ - Config and flags ([#256](https://github.com/Chrilleweb/dotenv-diff/issues/256)) ([996e636](https://github.com/Chrilleweb/dotenv-diff/commit/996e6366bea9a0392d029d1f29835c5779ac2556))
89
102
 
90
103
  ## [2.5.8](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.7...v2.5.8) (2026-02-01)
91
104
 
92
105
  ### 🐛 Bug Fixes
93
106
 
94
- * Fixed --allow-duplicates flag in default ([#249](https://github.com/Chrilleweb/dotenv-diff/issues/249)) ([3cccc35](https://github.com/Chrilleweb/dotenv-diff/commit/3cccc3523cb6c54ea48f3a22a895b887dea58098))
95
- * Fixed bug in --fix for compare mode ([#251](https://github.com/Chrilleweb/dotenv-diff/issues/251)) ([a26d6b5](https://github.com/Chrilleweb/dotenv-diff/commit/a26d6b51f440cede84381c0ea065bc2106979189))
96
- * removed mismatch from only flag ([#250](https://github.com/Chrilleweb/dotenv-diff/issues/250)) ([a4ee8c2](https://github.com/Chrilleweb/dotenv-diff/commit/a4ee8c27ca62c380f9bee7e0444c2c9488a6b7c9))
107
+ - Fixed --allow-duplicates flag in default ([#249](https://github.com/Chrilleweb/dotenv-diff/issues/249)) ([3cccc35](https://github.com/Chrilleweb/dotenv-diff/commit/3cccc3523cb6c54ea48f3a22a895b887dea58098))
108
+ - Fixed bug in --fix for compare mode ([#251](https://github.com/Chrilleweb/dotenv-diff/issues/251)) ([a26d6b5](https://github.com/Chrilleweb/dotenv-diff/commit/a26d6b51f440cede84381c0ea065bc2106979189))
109
+ - removed mismatch from only flag ([#250](https://github.com/Chrilleweb/dotenv-diff/issues/250)) ([a4ee8c2](https://github.com/Chrilleweb/dotenv-diff/commit/a4ee8c27ca62c380f9bee7e0444c2c9488a6b7c9))
97
110
 
98
111
  ### 📝 Documentation
99
112
 
100
- * **contribution:** updated PR guidelines ([#248](https://github.com/Chrilleweb/dotenv-diff/issues/248)) ([f3a8209](https://github.com/Chrilleweb/dotenv-diff/commit/f3a8209f22a810b34240250976f18e0c428669e1))
113
+ - **contribution:** updated PR guidelines ([#248](https://github.com/Chrilleweb/dotenv-diff/issues/248)) ([f3a8209](https://github.com/Chrilleweb/dotenv-diff/commit/f3a8209f22a810b34240250976f18e0c428669e1))
101
114
 
102
115
  ## [2.5.7](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.6...v2.5.7) (2026-01-29)
103
116
 
104
117
  ### 🐛 Bug Fixes
105
118
 
106
- * Updated inconsistent name text ([#243](https://github.com/Chrilleweb/dotenv-diff/issues/243)) ([c400aac](https://github.com/Chrilleweb/dotenv-diff/commit/c400aac46b434d7525d9ad75a135d374ab737b13))
119
+ - Updated inconsistent name text ([#243](https://github.com/Chrilleweb/dotenv-diff/issues/243)) ([c400aac](https://github.com/Chrilleweb/dotenv-diff/commit/c400aac46b434d7525d9ad75a135d374ab737b13))
107
120
 
108
121
  ## [2.5.6](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.5...v2.5.6) (2026-01-29)
109
122
 
110
123
  ### 🐛 Bug Fixes
111
124
 
112
- * inconsistent naming warning ui ([#241](https://github.com/Chrilleweb/dotenv-diff/issues/241)) ([b672b12](https://github.com/Chrilleweb/dotenv-diff/commit/b672b1206a94b375df1db23a8c0ba4acaa675b84))
125
+ - inconsistent naming warning ui ([#241](https://github.com/Chrilleweb/dotenv-diff/issues/241)) ([b672b12](https://github.com/Chrilleweb/dotenv-diff/commit/b672b1206a94b375df1db23a8c0ba4acaa675b84))
113
126
 
114
127
  ## [v2.5.5](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.4...v2.5.5) (2026-01-28)
115
128
 
116
129
  ### Bug Fixes
117
130
 
118
- * Updated UI for missing env variables ([#238](https://github.com/Chrilleweb/dotenv-diff/issues/238)) ([d87eac0](https://github.com/Chrilleweb/dotenv-diff/commit/d87eac002b6b18dc9962c77d1df3d3941ce73587))
131
+ - Updated UI for missing env variables ([#238](https://github.com/Chrilleweb/dotenv-diff/issues/238)) ([d87eac0](https://github.com/Chrilleweb/dotenv-diff/commit/d87eac002b6b18dc9962c77d1df3d3941ce73587))
119
132
 
120
133
  ## [v2.5.4](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.3...v2.5.4) (2026-01-28)
121
134
 
122
135
  ### Bug Fixes
123
136
 
124
- * default exclude keys where not ignored in scan mode ([#236](https://github.com/Chrilleweb/dotenv-diff/issues/236)) ([593e69b](https://github.com/Chrilleweb/dotenv-diff/commit/593e69b3a12273c445fa2b365b683cfbe5af283f))
137
+ - default exclude keys where not ignored in scan mode ([#236](https://github.com/Chrilleweb/dotenv-diff/issues/236)) ([593e69b](https://github.com/Chrilleweb/dotenv-diff/commit/593e69b3a12273c445fa2b365b683cfbe5af283f))
125
138
 
126
139
  ## [v2.5.3](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.2...v2.5.3) (2026-01-27)
127
140
 
128
141
  ### Bug Fixes
129
142
 
130
- * changed color of scanning header to cyan ([ed6cad1](https://github.com/Chrilleweb/dotenv-diff/commit/ed6cad1502a8c340ddcbcb45a63c20d1ba9feb26))
131
- * Expire warning text ui ([90caa27](https://github.com/Chrilleweb/dotenv-diff/commit/90caa27762cb1e1a7a81ec4fa978e26af8e46a5c))
143
+ - changed color of scanning header to cyan ([ed6cad1](https://github.com/Chrilleweb/dotenv-diff/commit/ed6cad1502a8c340ddcbcb45a63c20d1ba9feb26))
144
+ - Expire warning text ui ([90caa27](https://github.com/Chrilleweb/dotenv-diff/commit/90caa27762cb1e1a7a81ec4fa978e26af8e46a5c))
132
145
 
133
146
  ### Documentation
134
147
 
135
- * docs folder instead of public ([f88ad42](https://github.com/Chrilleweb/dotenv-diff/commit/f88ad422a5119cf50b6e27e2ddb7ffd7489e28d4))
136
- * updated readme gif links ([c45c2df](https://github.com/Chrilleweb/dotenv-diff/commit/c45c2df166139ad2c7a83af3df56032d4f81b310))
148
+ - docs folder instead of public ([f88ad42](https://github.com/Chrilleweb/dotenv-diff/commit/f88ad422a5119cf50b6e27e2ddb7ffd7489e28d4))
149
+ - updated readme gif links ([c45c2df](https://github.com/Chrilleweb/dotenv-diff/commit/c45c2df166139ad2c7a83af3df56032d4f81b310))
137
150
 
138
151
  ## [v2.5.2](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.1...v2.5.2) (2026-01-26)
139
152
 
140
153
  ### Bug Fixes
141
154
 
142
- * scanning color magenta ([b90107b](https://github.com/Chrilleweb/dotenv-diff/commit/b90107b0163de3e0ce5def6f235bc40510be71b7))
155
+ - scanning color magenta ([b90107b](https://github.com/Chrilleweb/dotenv-diff/commit/b90107b0163de3e0ce5def6f235bc40510be71b7))
143
156
 
144
157
  #### [v2.5.1](https://github.com/Chrilleweb/dotenv-diff/compare/v2.5.0...v2.5.1)
145
158
 
@@ -246,7 +259,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
246
259
  - exitresult + type + exit decision [`#160`](https://github.com/Chrilleweb/dotenv-diff/pull/160)
247
260
  - interfaces, types and documentation + constants [`#159`](https://github.com/Chrilleweb/dotenv-diff/pull/159)
248
261
  - Fixed path normalization issue [`#158`](https://github.com/Chrilleweb/dotenv-diff/pull/158)
249
- - Added PR template [`#156`](https://github.com/Chrilleweb/dotenv-diff/pull/156)
262
+ - Added PR template [`#156`](https://github.com/Chrilleweb/dotenv-diff/pull/156)
250
263
  - moved scanjson output out of types [`e0d80c0`](https://github.com/Chrilleweb/dotenv-diff/commit/e0d80c09c1d6d8d3a62a1e606cad4bf5ae22bd1b)
251
264
  - Moved types arround for better readability [`e9d6424`](https://github.com/Chrilleweb/dotenv-diff/commit/e9d6424477a702798182efee46f7634996310471)
252
265
  - framework rules cross-platform consistency. [`4939788`](https://github.com/Chrilleweb/dotenv-diff/commit/4939788e120fb17fcb0d807ade599bf9f7af88ad)
@@ -298,7 +311,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
298
311
  > 27 December 2025
299
312
 
300
313
  - v2.4.1 [`#140`](https://github.com/Chrilleweb/dotenv-diff/pull/140)
301
- - T3-env bug fix på false positive in secret detection [`#139`](https://github.com/Chrilleweb/dotenv-diff/pull/139)
314
+ - T3-env bug fix på false positive in secret detection [`#139`](https://github.com/Chrilleweb/dotenv-diff/pull/139)
302
315
  - Scan stats [`#138`](https://github.com/Chrilleweb/dotenv-diff/pull/138)
303
316
  - fixed t3env mutible bug + secret detection false potitive warning [`01f0c13`](https://github.com/Chrilleweb/dotenv-diff/commit/01f0c1313b8449d33e6f91ddfd738f614df5856d)
304
317
  - changed scan stats name [`c821d85`](https://github.com/Chrilleweb/dotenv-diff/commit/c821d8564bfef9c6826c7d00a357022b507cc745)
package/README.md CHANGED
@@ -11,10 +11,12 @@ First-class support for SvelteKit and Next.js. Also works well in modern JavaScr
11
11
  ---
12
12
 
13
13
  ### Warnings & errors detection
14
- ![Demo](./docs/assets/demo.gif)
14
+
15
+ ![Demo](https://raw.githubusercontent.com/Chrilleweb/dotenv-diff/main/docs/assets/demo.gif)
15
16
 
16
17
  ### Clean / successful scan
17
- ![Successful Scan](./docs/assets/success.png)
18
+
19
+ ![Successful Scan](https://raw.githubusercontent.com/Chrilleweb/dotenv-diff/main/docs/assets/success.png)
18
20
 
19
21
  ---
20
22
 
@@ -30,7 +32,7 @@ First-class support for SvelteKit and Next.js. Also works well in modern JavaScr
30
32
 
31
33
  ## How It Works
32
34
 
33
- → See [Capabilities Documentation](./docs/capabilities.md) for details on what the scanner checks for and how it works.
35
+ → See [Capabilities Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/capabilities.md) for details on what the scanner checks for and how it works.
34
36
 
35
37
  ---
36
38
 
@@ -42,7 +44,7 @@ Generate a default configuration file:
42
44
  dotenv-diff --init
43
45
  ```
44
46
 
45
- → See [Configuration Documentation](./docs/configuration_and_flags.md#configuration-file) for more details.
47
+ → See [Configuration Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/configuration_and_flags.md#configuration-file) for more details.
46
48
 
47
49
  ---
48
50
 
@@ -50,7 +52,7 @@ dotenv-diff --init
50
52
 
51
53
  Easily integrate dotenv-diff into your Git hooks or CI/CD pipelines to enforce environment variable consistency.
52
54
 
53
- → See [Git Hooks Documentation](./docs/git_hooks_ci.md) for more details.
55
+ → See [Git Hooks Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/git_hooks_ci.md) for more details.
54
56
 
55
57
  ## Framework-Specific Warnings
56
58
 
@@ -65,9 +67,9 @@ Framework issues (Sveltekit):
65
67
  → Variables accessed through import.meta.env must start with "VITE_"
66
68
  ```
67
69
 
68
- → See [Framework Documentation](./docs/frameworks/index.md) for more details.
70
+ → See [Framework Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/frameworks/index.md) for more details.
69
71
 
70
- ## Ignore Comments
72
+ ## Ignore Comments
71
73
 
72
74
  You can ignore specific environment variable warnings by adding comments in your code. For example:
73
75
 
@@ -77,7 +79,7 @@ const apiKey = process.env.API_KEY; // dotenv-diff-ignore
77
79
 
78
80
  This is helpful when you know a specific warning is safe in your source code.
79
81
 
80
- → See [Ignore Comments Documentation](./docs/ignore_comments.md) for more details.
82
+ → See [Ignore Comments Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/ignore_comments.md) for more details.
81
83
 
82
84
  ---
83
85
 
@@ -90,7 +92,7 @@ Add expiration metadata to your environment variables to get warnings when they
90
92
  API_TOKEN=
91
93
  ```
92
94
 
93
- → See [Expiration Documentation](./docs/expiration_warnings.md) for more details.
95
+ → See [Expiration Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/expiration_warnings.md) for more details.
94
96
 
95
97
  ---
96
98
 
@@ -106,9 +108,10 @@ In monorepos with multiple apps and packages, you can include shared folders:
106
108
  }
107
109
  ```
108
110
 
109
- → See [Monorepo Documentation](./docs/monorepo_support.md) for more details.
111
+ → See [Monorepo Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/monorepo_support.md) for more details.
110
112
 
111
113
  This will:
114
+
112
115
  - Scan the current app
113
116
  - Include shared packages
114
117
  - Ignore variables used only in specific environments
@@ -124,19 +127,25 @@ This will:
124
127
 
125
128
  ## Documentation
126
129
 
127
- → See [dotenv-diff Documentation](./docs/index.md) for full documentation
130
+ → See [dotenv-diff Documentation](https://github.com/Chrilleweb/dotenv-diff/blob/main/docs/index.md) for full documentation
128
131
 
129
132
  ---
130
133
 
131
134
  ## Contributing
132
135
 
133
136
  Issues and pull requests are welcome.
134
- → See [CONTRIBUTING](CONTRIBUTING.md) for details.
137
+ → See [CONTRIBUTING](https://github.com/Chrilleweb/dotenv-diff/blob/main/CONTRIBUTING.md) for details.
138
+
139
+ Thanks to these amazing people for contributing to this project:
140
+
141
+ <a href="https://github.com/Chrilleweb/dotenv-diff/graphs/contributors">
142
+ <img src="https://contrib.rocks/image?repo=Chrilleweb/dotenv-diff" />
143
+ </a>
135
144
 
136
145
  ---
137
146
 
138
147
  ## License
139
148
 
140
- Licensed under the [MIT](LICENSE) license.
149
+ Licensed under the [MIT](https://github.com/Chrilleweb/dotenv-diff/blob/main/LICENSE) license.
141
150
 
142
151
  Created by [chrilleweb](https://github.com/chrilleweb)
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../src/commands/compare.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,iBAAiB,EACjB,QAAQ,EACR,UAAU,EAGX,MAAM,oBAAoB,CAAC;AAe5B;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAChC,OAAO,CAAC,UAAU,CAAC,CA4KrB"}
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../src/commands/compare.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,iBAAiB,EACjB,QAAQ,EACR,UAAU,EAGX,MAAM,oBAAoB,CAAC;AAe5B;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,QAAQ,EAAE,EACjB,IAAI,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAChC,OAAO,CAAC,UAAU,CAAC,CAsBrB"}
@@ -34,100 +34,152 @@ export async function compareMany(pairs, opts) {
34
34
  duplicate: 0,
35
35
  gitignore: 0,
36
36
  };
37
- for (const { envName, envPath, examplePath } of pairs) {
38
- const exampleName = path.basename(examplePath);
39
- // Check if files exist
40
- const envExists = fs.existsSync(envPath);
41
- const exampleExists = fs.existsSync(examplePath);
42
- if (!envExists || !exampleExists) {
43
- printErrorNotFound(envExists, exampleExists, envPath, examplePath);
44
- exitWithError = true;
45
- continue;
46
- }
47
- printHeader(envName, exampleName, opts.json ?? false);
48
- // Parse and filter env files
49
- const { current, example, currentKeys, exampleKeys } = parseAndFilterEnv(envPath, examplePath, opts);
50
- // Run checks
51
- const diff = diffEnv(current, example, opts.checkValues);
52
- // Find empty keys in current env
53
- const emptyKeys = Object.entries(current)
54
- .filter(([, v]) => (v ?? '').trim() === '')
55
- .map(([k]) => k);
56
- // Find duplicates
57
- const { dupsEnv, dupsEx } = findDuplicates(envPath, examplePath, opts, run);
58
- // Check gitignore status
59
- const gitignoreIssue = run('gitignore')
60
- ? checkGitignoreStatus({ cwd: opts.cwd, envFile: envName })
61
- : null;
62
- // Collect filtered results
63
- const filtered = {
64
- missing: run('missing') ? diff.missing : [],
65
- extra: run('extra') ? diff.extra : [],
66
- empty: run('empty') ? emptyKeys : [],
67
- mismatches: opts.checkValues ? diff.valueMismatches : [],
68
- duplicatesEnv: run('duplicate') ? dupsEnv : [],
69
- duplicatesEx: run('duplicate') ? dupsEx : [],
70
- gitignoreIssue,
71
- };
72
- // Print stats if requested
73
- if (opts.showStats && !opts.json) {
74
- const stats = calculateStats(currentKeys, exampleKeys, dupsEnv, dupsEx, filtered, opts.checkValues);
75
- printStats(envName, exampleName, stats, filtered, opts.json ?? false, opts.showStats ?? true, opts.checkValues ?? false);
76
- }
77
- // Check if all is OK
78
- const allOk = isAllOk(filtered);
79
- // Print duplicates
80
- printDuplicates(envName, exampleName, dupsEnv, dupsEx, opts.json ?? false, opts.fix ?? false);
81
- // Calculate stats for JSON entry
82
- const stats = calculateStats(currentKeys, exampleKeys, dupsEnv, dupsEx, filtered, opts.checkValues);
83
- // Build JSON entry with all the data
84
- const entry = compareJsonOutput({
85
- envName,
86
- exampleName,
87
- dupsEnv,
88
- dupsEx,
89
- gitignoreIssue,
90
- ok: allOk,
91
- filtered,
92
- stats,
93
- });
94
- // Track errors and update totals
95
- const shouldExit = updateTotals(filtered, totals, entry);
96
- if (shouldExit) {
97
- exitWithError = true;
98
- }
99
- // Print all issues
100
- printIssues(filtered, opts.json ?? false, opts.fix ?? false);
101
- if (filtered.gitignoreIssue && !opts.json && !opts.fix) {
102
- printGitignoreWarning({
103
- envFile: envName,
104
- reason: filtered.gitignoreIssue.reason,
105
- });
106
- }
107
- const hasGitignoreIssue = filtered.gitignoreIssue !== null;
108
- printFixTips(filtered, hasGitignoreIssue, opts.json ?? false, opts.fix ?? false);
109
- // Apply auto-fix if requested
110
- if (opts.fix) {
111
- const { changed, result } = applyFixes({
112
- envPath,
113
- missingKeys: filtered.missing,
114
- duplicateKeys: dupsEnv.map((d) => d.key),
115
- ensureGitignore: hasGitignoreIssue,
116
- });
117
- const fixContext = {
118
- ...result,
119
- fixApplied: changed,
120
- };
121
- printAutoFix(fixContext, envName, opts.json ?? false);
122
- }
123
- opts.collect?.(entry);
124
- // In strict mode, any issue (not just errors) causes exit with error
125
- if (opts.strict && !allOk) {
37
+ for (const pair of pairs) {
38
+ if (processPair(pair, opts, run, totals)) {
126
39
  exitWithError = true;
127
40
  }
128
41
  }
129
42
  return { exitWithError };
130
43
  }
44
+ /**
45
+ * Processes a single env/example pair end-to-end.
46
+ * Handles validation, comparison, output, totals update and strict-mode exit logic.
47
+ * @param pair The env/example pair to process.
48
+ * @param opts The comparison options.
49
+ * @param run Category filter function.
50
+ * @param totals Running totals used for final summary.
51
+ * @returns True if this pair should cause exit with error.
52
+ */
53
+ function processPair(pair, opts, run, totals) {
54
+ const { envName, envPath, examplePath } = pair;
55
+ if (!validatePairFiles(envPath, examplePath)) {
56
+ return true;
57
+ }
58
+ const computation = computePairComparison(pair, opts, run);
59
+ const { exampleName, filtered, dupsEnv, dupsEx, currentKeys, exampleKeys } = computation;
60
+ printHeader(envName, exampleName, opts.json ?? false);
61
+ const stats = calculateStats(currentKeys, exampleKeys, dupsEnv, dupsEx, filtered, opts.checkValues);
62
+ maybePrintStats(envName, exampleName, stats, filtered, opts);
63
+ const allOk = isAllOk(filtered);
64
+ printDuplicates(envName, exampleName, dupsEnv, dupsEx, opts.json ?? false, opts.fix ?? false);
65
+ const entry = compareJsonOutput({
66
+ envName,
67
+ exampleName,
68
+ dupsEnv,
69
+ dupsEx,
70
+ gitignoreIssue: computation.gitignoreIssue,
71
+ ok: allOk,
72
+ filtered,
73
+ stats,
74
+ });
75
+ const shouldExitFromTotals = updateTotals(filtered, totals, entry);
76
+ printPairOutputs(envName, envPath, filtered, dupsEnv, opts);
77
+ opts.collect?.(entry);
78
+ const shouldExitFromStrict = Boolean(opts.strict && !allOk);
79
+ return shouldExitFromTotals || shouldExitFromStrict;
80
+ }
81
+ /**
82
+ * Validates that both input files exist before comparison.
83
+ * Prints a not-found error when either file is missing.
84
+ * @param envPath Path to the env file.
85
+ * @param examplePath Path to the example file.
86
+ * @returns True when both files exist, otherwise false.
87
+ */
88
+ function validatePairFiles(envPath, examplePath) {
89
+ const envExists = fs.existsSync(envPath);
90
+ const exampleExists = fs.existsSync(examplePath);
91
+ if (!envExists || !exampleExists) {
92
+ printErrorNotFound(envExists, exampleExists, envPath, examplePath);
93
+ return false;
94
+ }
95
+ return true;
96
+ }
97
+ /**
98
+ * Computes all comparison data for a single file pair.
99
+ * Includes parsed keys, diffs, empty keys, duplicates and optional gitignore status.
100
+ * @param pair The env/example pair to compare.
101
+ * @param opts The comparison options.
102
+ * @param run Category filter function.
103
+ * @returns Structured comparison data used by output and summary steps.
104
+ */
105
+ function computePairComparison(pair, opts, run) {
106
+ const { envName, envPath, examplePath } = pair;
107
+ const exampleName = path.basename(examplePath);
108
+ const { current, example, currentKeys, exampleKeys } = parseAndFilterEnv(envPath, examplePath, opts);
109
+ const diff = diffEnv(current, example, opts.checkValues);
110
+ const emptyKeys = Object.entries(current)
111
+ .filter(([, v]) => (v ?? '').trim() === '')
112
+ .map(([k]) => k);
113
+ const { dupsEnv, dupsEx } = findDuplicates(envPath, examplePath, opts, run);
114
+ const gitignoreIssue = run('gitignore')
115
+ ? checkGitignoreStatus({ cwd: opts.cwd, envFile: envName })
116
+ : null;
117
+ const filtered = {
118
+ missing: run('missing') ? diff.missing : [],
119
+ extra: run('extra') ? diff.extra : [],
120
+ empty: run('empty') ? emptyKeys : [],
121
+ mismatches: opts.checkValues ? diff.valueMismatches : [],
122
+ duplicatesEnv: run('duplicate') ? dupsEnv : [],
123
+ duplicatesEx: run('duplicate') ? dupsEx : [],
124
+ gitignoreIssue,
125
+ };
126
+ return {
127
+ exampleName,
128
+ filtered,
129
+ dupsEnv,
130
+ dupsEx,
131
+ currentKeys,
132
+ exampleKeys,
133
+ gitignoreIssue,
134
+ };
135
+ }
136
+ /**
137
+ * Prints stats for a pair when stats output is enabled and JSON output is disabled.
138
+ * @param envName Name of the env file.
139
+ * @param exampleName Name of the example file.
140
+ * @param stats Computed stats for this comparison.
141
+ * @param filtered Filtered result payload for issue counts.
142
+ * @param opts Comparison options controlling output behavior.
143
+ * @returns void
144
+ */
145
+ function maybePrintStats(envName, exampleName, stats, filtered, opts) {
146
+ if (!opts.showStats || opts.json)
147
+ return;
148
+ printStats(envName, exampleName, stats, filtered, opts.json ?? false, opts.showStats ?? true, opts.checkValues ?? false);
149
+ }
150
+ /**
151
+ * Prints issue/fix related outputs for a pair and optionally runs auto-fix.
152
+ * @param envName Name of the env file.
153
+ * @param envPath Path to the env file.
154
+ * @param filtered Filtered comparison results for this pair.
155
+ * @param dupsEnv Duplicate key entries found in env file.
156
+ * @param opts Comparison options controlling output and fix behavior.
157
+ * @returns void
158
+ */
159
+ function printPairOutputs(envName, envPath, filtered, dupsEnv, opts) {
160
+ printIssues(filtered, opts.json ?? false, opts.fix ?? false);
161
+ if (filtered.gitignoreIssue && !opts.json && !opts.fix) {
162
+ printGitignoreWarning({
163
+ envFile: envName,
164
+ reason: filtered.gitignoreIssue.reason,
165
+ });
166
+ }
167
+ const hasGitignoreIssue = filtered.gitignoreIssue !== null;
168
+ printFixTips(filtered, hasGitignoreIssue, opts.json ?? false, opts.fix ?? false);
169
+ if (!opts.fix)
170
+ return;
171
+ const { changed, result } = applyFixes({
172
+ envPath,
173
+ missingKeys: filtered.missing,
174
+ duplicateKeys: dupsEnv.map((d) => d.key),
175
+ ensureGitignore: hasGitignoreIssue,
176
+ });
177
+ const fixContext = {
178
+ ...result,
179
+ fixApplied: changed,
180
+ };
181
+ printAutoFix(fixContext, envName, opts.json ?? false);
182
+ }
131
183
  /**
132
184
  * Creates a category filter function based on options.
133
185
  * fx: onlyFiltering({ only: ['missing', 'extra'] })
@@ -1 +1 @@
1
- {"version":3,"file":"compare.js","sourceRoot":"","sources":["../../../src/commands/compare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAS1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD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AC;AAED;;;;;GAKG;AACH,SAAS,OAAO,CAAC,QAAkB;IACjC,OAAO,CACL,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;QAC7B,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;QACnC,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;QACnC,QAAQ,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC;QACnC,QAAQ,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC;QAClC,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;QACxC,CAAC,QAAQ,CAAC,cAAc,CACzB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,OAAO,SAAS,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,cAAc,eAAe,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,oEAKzB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,8BAA8B,mBAA8B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,kEAMrB,CAAC;AAGX;;GAEG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAS,CAA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AW;IACX,WAAW;CACH,CAAC;AAGX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;CAClB,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,gBAAgB;IAChB,oBAAoB;IACpB,YAAY;IACZ,iBAAiB;CACT,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,gBAAgB,CAAU,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS;IACT,OAAO;IACP,OAAO;IACP,WAAW;IACX,WAAW;CACH,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC"}
@@ -33,7 +33,7 @@ export function normalizeOptions(raw) {
33
33
  const noColor = toBool(raw.noColor);
34
34
  const compare = toBool(raw.compare);
35
35
  const strict = toBool(raw.strict);
36
- const scanUsage = raw.scanUsage ?? !compare;
36
+ const scanUsage = raw.scanUsage != null ? toBool(raw.scanUsage) : !compare;
37
37
  const showUnused = raw.showUnused !== false;
38
38
  const showStats = raw.showStats !== false;
39
39
  const secrets = raw.secrets !== false;