@dotenvx/dotenvx 1.38.2 → 1.38.4
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 +13 -1
- package/README.md +40 -19
- package/package.json +1 -1
- package/src/lib/helpers/parse.js +1 -1
- package/src/lib/helpers/replace.js +9 -0
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.38.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.38.4...main)
|
|
6
|
+
|
|
7
|
+
## [1.38.4](https://github.com/dotenvx/dotenvx/compare/v1.38.3...v1.38.4)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* 🐞 Fix blank line disappearing after encrypting empty value ([#542](https://github.com/dotenvx/dotenvx/pull/542))
|
|
12
|
+
|
|
13
|
+
## [1.38.3](https://github.com/dotenvx/dotenvx/compare/v1.38.2...v1.38.3)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
* 🐞 Fix self-referencing expansion when key exists already in `process.env` ([#536](https://github.com/dotenvx/dotenvx/pull/536))
|
|
6
18
|
|
|
7
19
|
## [1.38.2](https://github.com/dotenvx/dotenvx/compare/v1.38.1...v1.38.2)
|
|
8
20
|
|
package/README.md
CHANGED
|
@@ -2232,27 +2232,48 @@ More examples
|
|
|
2232
2232
|
|
|
2233
2233
|
## Guides
|
|
2234
2234
|
|
|
2235
|
-
> Go deeper
|
|
2235
|
+
> Go deeper with `dotenvx` – detailed framework and platform guides.
|
|
2236
2236
|
>
|
|
2237
2237
|
|
|
2238
|
-
*
|
|
2239
|
-
*
|
|
2240
|
-
*
|
|
2241
|
-
*
|
|
2242
|
-
*
|
|
2243
|
-
*
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2248
|
-
*
|
|
2249
|
-
*
|
|
2250
|
-
* [
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
2253
|
-
|
|
2254
|
-
*
|
|
2255
|
-
*
|
|
2238
|
+
* [Languages](https://dotenvx.com/docs#languages)
|
|
2239
|
+
* [Node.js](https://dotenvx.com/docs/languages/nodejs)
|
|
2240
|
+
* [Python](https://dotenvx.com/docs/languages/python)
|
|
2241
|
+
* [Ruby](https://dotenvx.com/docs/languages/ruby)
|
|
2242
|
+
* [Go](https://dotenvx.com/docs/languages/go)
|
|
2243
|
+
* [PHP](https://dotenvx.com/docs/languages/php)
|
|
2244
|
+
* [Rust](https://dotenvx.com/docs/languages/rust)
|
|
2245
|
+
* [Frameworks](https://dotenvx.com/docs#frameworks)
|
|
2246
|
+
* [Astro](https://dotenvx.com/docs/frameworks/astro)
|
|
2247
|
+
* [Express](https://dotenvx.com/docs/frameworks/express)
|
|
2248
|
+
* [Next](https://dotenvx.com/docs/frameworks/next)
|
|
2249
|
+
* [Remix](https://dotenvx.com/docs/frameworks/remix)
|
|
2250
|
+
* [Flask](https://dotenvx.com/docs/frameworks/flask)
|
|
2251
|
+
* [Sinatra](https://dotenvx.com/docs/frameworks/sinatra)
|
|
2252
|
+
* [Rocket](https://dotenvx.com/docs/frameworks/rocket)
|
|
2253
|
+
* [Platforms](https://dotenvx.com/docs#platforms)
|
|
2254
|
+
* [Digital Ocean](https://dotenvx.com/docs/platforms/digital-ocean)
|
|
2255
|
+
* [Docker](https://dotenvx.com/docs/platforms/docker)
|
|
2256
|
+
* [Fly](https://dotenvx.com/docs/platforms/fly)
|
|
2257
|
+
* [Heroku](https://dotenvx.com/docs/platforms/heroku)
|
|
2258
|
+
* [Netlify](https://dotenvx.com/docs/platforms/netlify)
|
|
2259
|
+
* [Vercel](https://dotenvx.com/docs/platforms/vercel)
|
|
2260
|
+
* [Railway](https://dotenvx.com/docs/platforms/railway)
|
|
2261
|
+
* [Render](https://dotenvx.com/docs/platforms/render)
|
|
2262
|
+
* [CI/CDs](https://dotenvx.com/docs#cis)
|
|
2263
|
+
* [GitHub Actions](https://dotenvx.com/docs/cis/github-actions)
|
|
2264
|
+
* [Background Jobs](https://dotenvx.com/docs#background-jobs)
|
|
2265
|
+
* [Trigger.dev](https://dotenvx.com/docs/background-jobs/triggerdotdev)
|
|
2266
|
+
* [Package Managers](https://dotenvx.com/docs#package-managers)
|
|
2267
|
+
* [NPM](https://dotenvx.com/docs/package-managers/npm)
|
|
2268
|
+
* [PNPM](https://dotenvx.com/docs/package-managers/pnpm)
|
|
2269
|
+
* [Process Managers](https://dotenvx.com/docs#process-managers)
|
|
2270
|
+
* [PM2](https://dotenvx.com/docs/process-managers/pm2)
|
|
2271
|
+
* [Monorepos](https://dotenvx.com/docs#monorepos)
|
|
2272
|
+
* [Nx](https://dotenvx.com/docs/monorepos/nx)
|
|
2273
|
+
* [Turborepo](https://dotenvx.com/docs/monorepos/turborepo)
|
|
2274
|
+
* [Concepts](https://dotenvx.com/docs#concepts)
|
|
2275
|
+
* [.env](https://dotenvx.com/docs/env-file)
|
|
2276
|
+
* [.env.keys](https://dotenvx.com/docs/env-keys-file)
|
|
2256
2277
|
|
|
2257
2278
|
|
|
2258
2279
|
|
package/package.json
CHANGED
package/src/lib/helpers/parse.js
CHANGED
|
@@ -60,7 +60,7 @@ class Parse {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// expand empty, double, or backticks
|
|
63
|
-
if (!evaled && quote !== "'" && !this.processEnv[key]) {
|
|
63
|
+
if (!evaled && quote !== "'" && (!this.processEnv[key] || this.overload)) {
|
|
64
64
|
this.parsed[key] = resolveEscapeSequences(this.expand(this.parsed[key]))
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -20,6 +20,15 @@ function replace (src, key, replaceValue) {
|
|
|
20
20
|
let enforceEndOfLine = ''
|
|
21
21
|
if (escapedOriginalValue === '') {
|
|
22
22
|
enforceEndOfLine = '$' // EMPTY scenario
|
|
23
|
+
|
|
24
|
+
// if empty quote and consecutive newlines
|
|
25
|
+
const newlineMatch = src.match(new RegExp(`${key}\\s*=\\s*\n\n`, 'm')) // match any consecutive newline scenario for a blank value
|
|
26
|
+
if (quote === '' && newlineMatch) {
|
|
27
|
+
const newlineCount = (newlineMatch[0].match(/\n/g)).length - 1
|
|
28
|
+
for (let i = 0; i < newlineCount; i++) {
|
|
29
|
+
newPart += '\n' // re-append the extra newline to preserve user's format choice
|
|
30
|
+
}
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
const currentPart = new RegExp(
|