@dotenvx/dotenvx 1.10.1 β†’ 1.10.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,19 @@
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.10.1...main)
5
+ ## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.10.3...main)
6
+
7
+ ## 1.10.3
8
+
9
+ ### Added
10
+
11
+ * ci: automate publishing to `winget` ([#354](https://github.com/dotenvx/dotenvx/pull/354))
12
+
13
+ ## 1.10.2
14
+
15
+ ### Changed
16
+
17
+ * default `config` to empty `[]` array so that `DOTENV_KEY_${environment}` looks up correctly ([#352](https://github.com/dotenvx/dotenvx/pull/352))
6
18
 
7
19
  ## 1.10.1
8
20
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
   
10
10
 
11
11
 
12
- ### Quickstart [![npm version](https://img.shields.io/npm/v/@dotenvx/dotenvx.svg)](https://www.npmjs.com/package/@dotenvx/dotenvx) [![test count](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/motdotenv/bb76445765a9731e7d824a6efdf53524/raw/dotenvxTestCount.json)](https://github.com/dotenvx/dotenvx/tree/main/tests) [![npm installs](https://img.shields.io/npm/dt/@dotenvx/dotenvx)](https://www.npmjs.com/package/@dotenvx/dotenvx)
12
+ ### Quickstart [![npm version](https://img.shields.io/npm/v/@dotenvx/dotenvx.svg)](https://www.npmjs.com/package/@dotenvx/dotenvx) [![downloads](https://img.shields.io/npm/dw/@dotenvx/dotenvx)](https://www.npmjs.com/package/@dotenvx/dotenvx) [![test suite](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/motdotenv/bb76445765a9731e7d824a6efdf53524/raw/dotenvxTestCount.json)](https://github.com/dotenvx/dotenvx/tree/main/tests)
13
13
 
14
14
  Install and use it in code just like `dotenv`.
15
15
 
@@ -34,10 +34,7 @@ curl -sfS https://dotenvx.sh | sh
34
34
  dotenvx help
35
35
  ```
36
36
 
37
- [![mac](https://img.shields.io/endpoint?url=https://dotenvx.sh/stats/curl/darwin&label=mac)](https://github.com/dotenvx/dotenvx.sh/blob/main/install.sh)
38
- [![linux](https://img.shields.io/endpoint?url=https://dotenvx.sh/stats/curl/linux&label=linux)](https://github.com/dotenvx/dotenvx.sh/blob/main/install.sh)
39
- [![windows](https://img.shields.io/endpoint?url=https://dotenvx.sh/stats/curl/windows&label=windows)](https://github.com/dotenvx/dotenvx.sh/blob/main/install.sh)
40
- <sup>*curl installs sourced from npm binary packages - <a href="https://www.npmjs.com/package/@dotenvx/dotenvx-linux-x86_64">example</a></sup>
37
+ [![curl installs](https://img.shields.io/endpoint?url=https://dotenvx.sh/stats/curl&label=curl%20installs)](https://github.com/dotenvx/dotenvx.sh/blob/main/install.sh)
41
38
 
42
39
  &nbsp;
43
40
 
@@ -51,7 +48,6 @@ dotenvx help
51
48
  ```
52
49
 
53
50
  [![brew installs](https://img.shields.io/github/downloads/dotenvx/dotenvx/total?label=brew%20installs)](https://github.com/dotenvx/homebrew-brew/blob/main/Formula/dotenvx.rb)
54
- <sup>*homebrew installs sourced from github releases - <a href="https://github.com/dotenvx/homebrew-brew/blob/main/Formula/dotenvx.rb">formula</a></sup>
55
51
 
56
52
  &nbsp;
57
53
 
@@ -69,7 +65,7 @@ docker run -it --rm -v $(pwd):/app dotenv/dotenvx help
69
65
 
70
66
  </details>
71
67
 
72
- <details><summary>or with github releases πŸ™</summary><br>
68
+ <details><summary>with github releases πŸ™</summary><br>
73
69
 
74
70
  ```sh
75
71
  curl -L -o dotenvx.tar.gz "https://github.com/dotenvx/dotenvx/releases/latest/download/dotenvx-$(uname -s)-$(uname -m).tar.gz"
@@ -78,11 +74,21 @@ tar -xzf dotenvx.tar.gz
78
74
  ```
79
75
 
80
76
  [![github releases](https://img.shields.io/github/downloads/dotenvx/dotenvx/total)](https://github.com/dotenvx/dotenvx/releases)
81
- <sup>*includes homebrew installs</sup>
77
+
78
+ &nbsp;
82
79
 
83
80
  </details>
84
81
 
85
82
 
83
+ <details><summary>or with windows 🟦🟩πŸŸ₯🟨</summary><br>
84
+
85
+ ```sh
86
+ winget install dotenvx
87
+ dotenvx help
88
+ ```
89
+
90
+ </details>
91
+
86
92
  &nbsp;
87
93
 
88
94
  ## Run Anywhere
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.10.1",
2
+ "version": "1.10.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -37,7 +37,6 @@
37
37
  "funding": "https://dotenvx.com",
38
38
  "dependencies": {
39
39
  "commander": "^11.1.0",
40
- "diff": "^5.2.0",
41
40
  "dotenv": "^16.4.5",
42
41
  "eciesjs": "^0.4.6",
43
42
  "fdir": "^6.2.0",
@@ -1,7 +1,7 @@
1
1
  const resolveHome = require('./resolveHome')
2
2
 
3
3
  function dotenvOptionPaths (options) {
4
- let optionPaths = ['.env']
4
+ let optionPaths = []
5
5
 
6
6
  if (options && options.path) {
7
7
  if (!Array.isArray(options.path)) {
package/src/lib/main.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { URL } from 'url';
2
- import type { Change } from 'diff';
3
2
 
4
3
  export interface DotenvParseOutput {
5
4
  [name: string]: string;
@@ -66,7 +65,7 @@ export interface DotenvConfigOptions {
66
65
  DOTENV_KEY?: string;
67
66
 
68
67
  /**
69
- * Do not warn for missing .env files
68
+ * Load a .env convention (available conventions: 'nextjs')
70
69
  */
71
70
  convention?: string;
72
71
 
@@ -235,28 +234,6 @@ export function set(
235
234
  encrypt?: boolean
236
235
  ): EncryptOutput;
237
236
 
238
- type StatusRow = {
239
- filename: string;
240
- filepath: string;
241
- environment: string;
242
- raw: string;
243
- decrypted: any;
244
- differences: Change[];
245
- };
246
-
247
- export type StatusOutput = {
248
- changes: StatusRow[];
249
- nochanges: StatusRow[];
250
- untracked: StatusRow[];
251
- };
252
-
253
- /**
254
- * Check the differences between the .env file and the decrypted values
255
- *
256
- * @param directory - current working directory
257
- */
258
- export function status(directory: string): StatusOutput;
259
-
260
237
  export type GenExampleOutput = {
261
238
  envExampleFile: string;
262
239
  envFile: string | string[];
package/src/lib/main.js CHANGED
@@ -13,6 +13,7 @@ const Decrypt = require('./services/decrypt')
13
13
  const Genexample = require('./services/genexample')
14
14
 
15
15
  // helpers
16
+ const conventions = require('./helpers/conventions')
16
17
  const dotenvOptionPaths = require('./helpers/dotenvOptionPaths')
17
18
  const { setLogLevel } = require('../shared/logger')
18
19
 
@@ -41,7 +42,18 @@ const config = function (options = {}) {
41
42
  const optionPaths = dotenvOptionPaths(options) // [ '.env' ]
42
43
 
43
44
  try {
44
- const envs = []
45
+ let envs = []
46
+ // handle shorthand conventions - like --convention=nextjs
47
+ if (options.convention) {
48
+ envs = conventions(options.convention).concat(envs)
49
+ }
50
+
51
+ if (process.env.DOTENV_KEY) {
52
+ logger.warn('DEPRECATION NOTICE: Setting DOTENV_KEY with .env.vault is deprecated.')
53
+ logger.warn('DEPRECATION NOTICE: Run [dotenvx ext vault migrate] for instructions on converting your .env.vault file to encrypted .env files (using public key encryption algorithm secp256k1)')
54
+ logger.warn('DEPRECATION NOTICE: Read more at [https://github.com/dotenvx/dotenvx/blob/main/CHANGELOG.md#0380]')
55
+ }
56
+
45
57
  for (const optionPath of optionPaths) {
46
58
  // if DOTENV_KEY is set then assume we are checking envVaultFile
47
59
  if (DOTENV_KEY) {