@dotenvx/dotenvx 1.11.4 → 1.11.5
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,11 @@
|
|
|
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/v1.11.
|
|
5
|
+
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.11.5...main)
|
|
6
|
+
|
|
7
|
+
## 1.11.5
|
|
8
|
+
|
|
9
|
+
* revert `tinyexec` for `execa` - to support usage in bun
|
|
6
10
|
|
|
7
11
|
## 1.11.4
|
|
8
12
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.11.
|
|
2
|
+
"version": "1.11.5",
|
|
3
3
|
"name": "@dotenvx/dotenvx",
|
|
4
4
|
"description": "a better dotenv–from the creator of `dotenv`",
|
|
5
5
|
"author": "@motdotla",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"commander": "^11.1.0",
|
|
40
40
|
"dotenv": "^16.4.5",
|
|
41
41
|
"eciesjs": "^0.4.6",
|
|
42
|
+
"execa": "^5.1.1",
|
|
42
43
|
"fdir": "^6.2.0",
|
|
43
44
|
"ignore": "^5.3.0",
|
|
44
45
|
"object-treeify": "1.1.33",
|
|
45
46
|
"picomatch": "^4.0.2",
|
|
46
|
-
"tinyexec": "^0.3.0",
|
|
47
47
|
"which": "^4.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -13,8 +13,6 @@ async function executeCommand (commandArgs, env) {
|
|
|
13
13
|
|
|
14
14
|
// handler for SIGINT
|
|
15
15
|
let commandProcess
|
|
16
|
-
// workaround until error.signal gets added https://github.com/tinylibs/tinyexec/issues/28
|
|
17
|
-
let signal
|
|
18
16
|
const sigintHandler = () => {
|
|
19
17
|
logger.debug('received SIGINT')
|
|
20
18
|
logger.debug('checking command process')
|
|
@@ -22,7 +20,6 @@ async function executeCommand (commandArgs, env) {
|
|
|
22
20
|
|
|
23
21
|
if (commandProcess) {
|
|
24
22
|
logger.debug('sending SIGINT to command process')
|
|
25
|
-
signal = 'SIGINT'
|
|
26
23
|
commandProcess.kill('SIGINT') // Send SIGINT to the command process
|
|
27
24
|
/* c8 ignore start */
|
|
28
25
|
} else {
|
|
@@ -40,7 +37,6 @@ async function executeCommand (commandArgs, env) {
|
|
|
40
37
|
|
|
41
38
|
if (commandProcess) {
|
|
42
39
|
logger.debug('sending SIGTERM to command process')
|
|
43
|
-
signal = 'SIGTERM'
|
|
44
40
|
commandProcess.kill('SIGTERM') // Send SIGTEM to the command process
|
|
45
41
|
} else {
|
|
46
42
|
logger.debug('no command process to send SIGTERM to')
|
|
@@ -77,11 +73,9 @@ async function executeCommand (commandArgs, env) {
|
|
|
77
73
|
}
|
|
78
74
|
}
|
|
79
75
|
|
|
80
|
-
commandProcess = execute.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
env: { ...process.env, ...env }
|
|
84
|
-
}
|
|
76
|
+
commandProcess = execute.execa(commandArgs[0], commandArgs.slice(1), {
|
|
77
|
+
stdio: 'inherit',
|
|
78
|
+
env: { ...process.env, ...env }
|
|
85
79
|
})
|
|
86
80
|
|
|
87
81
|
process.on('SIGINT', sigintHandler)
|
|
@@ -92,9 +86,7 @@ async function executeCommand (commandArgs, env) {
|
|
|
92
86
|
})
|
|
93
87
|
|
|
94
88
|
// Wait for the command process to finish
|
|
95
|
-
|
|
96
|
-
await commandProcess
|
|
97
|
-
const { exitCode } = commandProcess
|
|
89
|
+
const { exitCode } = await commandProcess
|
|
98
90
|
|
|
99
91
|
if (exitCode !== 0) {
|
|
100
92
|
logger.debug(`received exitCode ${exitCode}`)
|
|
@@ -102,11 +94,11 @@ async function executeCommand (commandArgs, env) {
|
|
|
102
94
|
}
|
|
103
95
|
} catch (error) {
|
|
104
96
|
// no color on these errors as they can be standard errors for things like jest exiting with exitCode 1 for a single failed test.
|
|
105
|
-
if (signal !== 'SIGINT' && signal !== 'SIGTERM') {
|
|
97
|
+
if (error.signal !== 'SIGINT' && error.signal !== 'SIGTERM') {
|
|
106
98
|
if (error.code === 'ENOENT') {
|
|
107
|
-
logger.errornocolor(`Unknown command: ${error.
|
|
99
|
+
logger.errornocolor(`Unknown command: ${error.command}`)
|
|
108
100
|
} else if (error.message.includes('Command failed with exit code 1')) {
|
|
109
|
-
logger.errornocolor(`Command exited with exit code 1: ${error.
|
|
101
|
+
logger.errornocolor(`Command exited with exit code 1: ${error.command}`)
|
|
110
102
|
} else {
|
|
111
103
|
logger.errornocolor(error.message)
|
|
112
104
|
}
|