@dotenvx/dotenvx 2.1.2 → 2.1.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.1.2...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.1.3...main)
6
+
7
+ ## [2.1.3](https://github.com/dotenvx/dotenvx/compare/v2.1.2...v2.1.3) (2026-07-02)
8
+
9
+ ### Changed
10
+
11
+ * Patch edge case when custom unspecified `-f` and `--env` flag ([#868](https://github.com/dotenvx/dotenvx/pull/868))
6
12
 
7
13
  ## [2.1.2](https://github.com/dotenvx/dotenvx/compare/v2.1.1...v2.1.2) (2026-07-02)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.2",
2
+ "version": "2.1.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -17,13 +17,16 @@ function envsFromDotenvPrivateKey (privateKeyNames) {
17
17
 
18
18
  function determine (envs = [], processEnv) {
19
19
  const privateKeyNames = dotenvPrivateKeyNames(processEnv)
20
- if (!envs || envs.length <= 0) {
21
- // if process.env.DOTENV_PRIVATE_KEY or process.env.DOTENV_PRIVATE_KEY_${environment} is set, assume inline encryption methodology
22
- if (privateKeyNames.length > 0) {
23
- return envsFromDotenvPrivateKey(privateKeyNames)
24
- }
25
20
 
26
- return DEFAULT_ENVS // default to .env file expectation
21
+ // https://github.com/dotenvx/dotenvx/issues/670
22
+ let defaults = DEFAULT_ENVS // default to .env file expectation
23
+ // if process.env.DOTENV_PRIVATE_KEY or process.env.DOTENV_PRIVATE_KEY_${environment} is set, assume inline encryption methodology
24
+ if (privateKeyNames.length > 0) {
25
+ defaults = envsFromDotenvPrivateKey(privateKeyNames)
26
+ }
27
+
28
+ if (!envs || envs.length <= 0) {
29
+ return defaults
27
30
  } else {
28
31
  let fileAlreadySpecified = false
29
32
 
@@ -39,7 +42,7 @@ function determine (envs = [], processEnv) {
39
42
  }
40
43
 
41
44
  // no .env file specified as a flag so default to .env
42
- return [...DEFAULT_ENVS, ...envs]
45
+ return [...defaults, ...envs]
43
46
  }
44
47
  }
45
48