@dotenvx/dotenvx 2.3.2 → 2.3.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.3.2...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.3.3...main)
6
+
7
+ ## [2.3.3](https://github.com/dotenvx/dotenvx/compare/v2.3.2...v2.3.3) (2026-07-09)
8
+
9
+ ### Removed
10
+
11
+ * Remove `dotenv` and `commander` for `@dotenvx/tooling` ([#878](https://github.com/dotenvx/dotenvx/pull/878))
6
12
 
7
13
  ## [2.3.2](https://github.com/dotenvx/dotenvx/compare/v2.3.1...v2.3.2) (2026-07-09)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.3.2",
2
+ "version": "2.3.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -44,9 +44,8 @@
44
44
  "funding": "https://dotenvx.com",
45
45
  "dependencies": {
46
46
  "@dotenvx/primitives": "^1.7.2",
47
- "commander": "^11.1.0",
47
+ "@dotenvx/tooling": "^0.2.0",
48
48
  "conf": "^10.2.0",
49
- "dotenv": "^17.4.2",
50
49
  "enquirer": "^2.4.1",
51
50
  "env-paths": "^2.2.1",
52
51
  "execa": "^5.1.1",
@@ -1,4 +1,4 @@
1
- const { Command } = require('commander')
1
+ const { Command } = require('@dotenvx/tooling')
2
2
 
3
3
  const examples = require('./../examples')
4
4
  const executeExtension = require('../../lib/helpers/executeExtension')
@@ -1,14 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /* c8 ignore start */
4
- const { Command } = require('commander')
4
+ const { Command } = require('@dotenvx/tooling')
5
5
  const program = new Command()
6
6
 
7
- const { setLogLevel, logger } = require('../shared/logger')
7
+ const { setLogLevel } = require('../shared/logger')
8
8
  const examples = require('./examples')
9
9
  const packageJson = require('./../lib/helpers/packageJson')
10
- const Errors = require('./../lib/helpers/errors')
11
- const getCommanderVersion = require('./../lib/helpers/getCommanderVersion')
12
10
  const executeDynamic = require('./../lib/helpers/executeDynamic')
13
11
  const removeDynamicHelpSection = require('./../lib/helpers/removeDynamicHelpSection')
14
12
  const removeOptionsHelpParts = require('./../lib/helpers/removeOptionsHelpParts')
@@ -23,14 +21,6 @@ function collectEnvs (type) {
23
21
  }
24
22
  }
25
23
 
26
- // surface hoisting problems
27
- const commanderVersion = getCommanderVersion()
28
- if (commanderVersion && parseInt(commanderVersion.split('.')[0], 10) >= 12) {
29
- const message = `dotenvx depends on commander@11.x.x but you are attempting to hoist commander@${commanderVersion}`
30
- const error = new Errors({ message }).dangerousDependencyHoist()
31
- logger.error(error.messageWithHelp)
32
- }
33
-
34
24
  // global log levels
35
25
  program
36
26
  .usage('run -- yourcommand')
package/src/db/session.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fs = require('fs')
2
2
  const path = require('path')
3
3
  const Conf = require('conf')
4
- const dotenv = require('dotenv')
4
+ const { dotenv } = require('@dotenvx/tooling')
5
5
  const envPaths = require('env-paths')
6
6
 
7
7
  const jsonToEnv = require('./../lib/helpers/jsonToEnv')
@@ -4,7 +4,6 @@ const ISSUE_BY_CODE = {
4
4
  COMMAND_EXITED_WITH_CODE: 'https://github.com/dotenvx/dotenvx/issues/new',
5
5
  COMMAND_SUBSTITUTION_FAILED: 'https://github.com/dotenvx/dotenvx/issues/532',
6
6
  DECRYPTION_FAILED: 'https://github.com/dotenvx/dotenvx/issues/757',
7
- DANGEROUS_DEPENDENCY_HOIST: 'https://github.com/dotenvx/dotenvx/issues/622',
8
7
  INVALID_COLOR: 'must be 256 colors',
9
8
  INVALID_CONVENTION: 'https://github.com/dotenvx/dotenvx/issues/761',
10
9
  INVALID_PASSPHRASE: 'try again with the correct passphrase',
@@ -98,18 +97,6 @@ class Errors {
98
97
  return e
99
98
  }
100
99
 
101
- dangerousDependencyHoist () {
102
- const code = 'DANGEROUS_DEPENDENCY_HOIST'
103
- const message = `[${code}] your environment has hoisted an incompatible version of a dotenvx dependency: ${this.message}`
104
- const help = `fix: [${ISSUE_BY_CODE[code]}]`
105
-
106
- const e = new Error(message)
107
- e.code = code
108
- e.help = help
109
- e.messageWithHelp = `${message}. ${help}`
110
- return e
111
- }
112
-
113
100
  invalidColor () {
114
101
  const code = 'INVALID_COLOR'
115
102
  const message = `[${code}] Invalid color ${this.color}`
@@ -1,10 +0,0 @@
1
- const fs = require('fs')
2
- const path = require('path')
3
-
4
- function getCommanderVersion () {
5
- const commanderMain = require.resolve('commander')
6
- const pkgPath = path.join(commanderMain, '..', 'package.json')
7
- return JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version
8
- }
9
-
10
- module.exports = getCommanderVersion