@dotenvx/dotenvx 2.34.0 → 2.34.1

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.34.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.34.1...main)
6
+
7
+ ## [2.34.1](https://github.com/dotenvx/dotenvx/compare/v2.34.0...v2.34.1) (2026-10-08)
8
+
9
+ ### Changed
10
+
11
+ * Patch: don't write public key on ctrl+c or prompt failure ([#1009](https://github.com/dotenvx/dotenvx/pull/1009))
6
12
 
7
13
  ## [2.34.0](https://github.com/dotenvx/dotenvx/compare/v2.33.0...v2.34.0) (2026-10-08)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.34.0",
2
+ "version": "2.34.1",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -41,20 +41,25 @@ function clearLastLine (stream) {
41
41
  }
42
42
 
43
43
  async function select ({ message, choices, navigation, backValue, initial, prefix }, context) {
44
- if (navigation) {
45
- const CustodySelect = require('./custodySelect')
46
- return new CustodySelect({ message, choices: choicesForSelect(choices), backValue, initial, ...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}), ...enquirerOptions(context) }).run()
47
- }
48
- const answer = await enquirer.prompt({
49
- type: 'select',
50
- name: 'value',
51
- ...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}),
52
- message,
53
- choices: choicesForSelect(choices),
54
- ...enquirerOptions(context)
55
- })
44
+ try {
45
+ if (navigation) {
46
+ const CustodySelect = require('./custodySelect')
47
+ return await new CustodySelect({ message, choices: choicesForSelect(choices), backValue, initial, ...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}), ...enquirerOptions(context) }).run()
48
+ }
49
+ const answer = await enquirer.prompt({
50
+ type: 'select',
51
+ name: 'value',
52
+ ...(prefix ? { symbols: { prefix: { pending: prefix } } } : {}),
53
+ message,
54
+ choices: choicesForSelect(choices),
55
+ ...enquirerOptions(context)
56
+ })
56
57
 
57
- return answer.value
58
+ return answer.value
59
+ } catch (error) {
60
+ if (error instanceof Error) throw error
61
+ throw Object.assign(new Error('prompt cancelled'), { code: 'PROMPT_CANCELLED' })
62
+ }
58
63
  }
59
64
 
60
65
  async function multiselect ({ message, choices, initial = [], submitLabel }, context) {
@@ -126,10 +126,10 @@ async function encryptTransform (options = {}) {
126
126
  unchangedFilepaths.push(envFilepath)
127
127
  }
128
128
  } catch (error) {
129
- if (error.code === 'ENOENT') {
129
+ if (error?.code === 'ENOENT') {
130
130
  row.error = new Errors({ envFilepath, filepath }).missingEnvFile()
131
131
  } else {
132
- row.error = error
132
+ row.error = error instanceof Error ? error : new Error('Encryption aborted before private key storage completed')
133
133
  }
134
134
  }
135
135