Skip to content

fix: parse debug and override in populate like config does - #1069

Merged
motdotla merged 1 commit into
motdotla:masterfrom
kevin9327:populate-parse-boolean-options
Oct 6, 2026
Merged

motdotla merged 1 commit into
motdotla:masterfrom
kevin9327:populate-parse-boolean-options

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

configDotenv reads debug with parseBoolean, but populate (which config calls with the same options) reads debug and override with Boolean(). So a string 'false' turns them on inside populate:

// BASIC=preset in the environment, BASIC=fromfile in .env, DEBUG=false
require('dotenv').config({ debug: process.env.DEBUG, override: 'false', quiet: true })
// ┆ "BASIC" is already defined and WAS overwritten
// process.env.BASIC === 'fromfile'

debug: process.env.DEBUG is the example given in main.d.ts. With DEBUG=false, config itself stays quiet, but populate still prints its per-key debug lines. A string override: 'false' actually overwrites existing variables.

This PR makes populate use parseBoolean for both options, the same as config and the DOTENV_* env options. Booleans behave the same as before.

I added two tests to tests/test-populate.js (string 'false' for override and for debug). Both fail without the change. The full tap suite passes after npm run build, along with standard and dts-check.

@motdotla

motdotla commented Oct 6, 2026

Copy link
Copy Markdown
Owner

good catch. thank you!

@motdotla
motdotla merged commit caa14f0 into motdotla:master Oct 6, 2026
8 checks passed
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 6, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | dotenv  | 17.4.2 | 18.0.6 |


## [v18.0.6](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1806-2026-10-06)

##### Changed

- Use smarter `parseBoolean` not Boolean() to fix override ([#1069](motdotla/dotenv#1069))


## [v18.0.5](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1805-2026-09-30)

##### Changed

- Fix missing typescript module declaration ([#1068](motdotla/dotenv#1068))
- Improve performance for large .env files ([#1066](motdotla/dotenv#1066))


## [v18.0.4](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1804-2026-09-25)

##### Changed

- `import dotenv/config` should default quiet: true ([#1063](motdotla/dotenv#1063))


## [v18.0.3](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1803-2026-09-22)

##### Changed

- Patch `DOTENV_QUIET` setting when inside .env file ([#1059](motdotla/dotenv#1059))


## [v18.0.2](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1802-2026-09-21)

##### Changed

- Patch additional edge cases for the fast parser ([#1056](motdotla/dotenv#1056))


## [v18.0.1](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1801-2026-09-18)

##### Changed

- Handle file urls in config logging ([#1054](motdotla/dotenv#1054))


## [v18.0.0](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1800-2026-09-17)

##### Added

- NEW: Dotenv now has a CLI. ([#1022](motdotla/dotenv#1022))

```sh
$ dotenv run -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

- NEW: Dotenv now has a fast parser thanks to [@homanp](https://github.com/homanp) of [superagent.sh](https://superagent.sh). Pass `config({ fast: true })`, flag `--fast`, or set `DOTENV_FAST=true` to opt-in to \~2x faster character-scanner parser. ([#1010](motdotla/dotenv#1010))

```sh
$ dotenv run --fast -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

[faster than Node native parseEnv!](https://dotenvx.com/blog/2026/09/28/dotenv-fast.html)

##### Changed

- Injecting message sent to stderr rather than stdout and tips removed ([#1037](motdotla/dotenv#1037))

##### Removed

- Remove tips ([#1031](motdotla/dotenv#1031))
- Remove skill files ([#1032](motdotla/dotenv#1032))
- Remove Spanish README ([#1034](motdotla/dotenv#1034))
- Remove .env.vault support ([#1033](motdotla/dotenv#1033))
- Remove preloading. Instead use cli `dotenv run -- your-command` ([#1035](motdotla/dotenv#1035))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 6, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | dotenv  | 17.4.2 | 18.0.6 |


## [v18.0.6](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1806-2026-10-06)

##### Changed

- Use smarter `parseBoolean` not Boolean() to fix override ([#1069](motdotla/dotenv#1069))


## [v18.0.5](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1805-2026-09-30)

##### Changed

- Fix missing typescript module declaration ([#1068](motdotla/dotenv#1068))
- Improve performance for large .env files ([#1066](motdotla/dotenv#1066))


## [v18.0.4](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1804-2026-09-25)

##### Changed

- `import dotenv/config` should default quiet: true ([#1063](motdotla/dotenv#1063))


## [v18.0.3](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1803-2026-09-22)

##### Changed

- Patch `DOTENV_QUIET` setting when inside .env file ([#1059](motdotla/dotenv#1059))


## [v18.0.2](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1802-2026-09-21)

##### Changed

- Patch additional edge cases for the fast parser ([#1056](motdotla/dotenv#1056))


## [v18.0.1](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1801-2026-09-18)

##### Changed

- Handle file urls in config logging ([#1054](motdotla/dotenv#1054))


## [v18.0.0](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1800-2026-09-17)

##### Added

- NEW: Dotenv now has a CLI. ([#1022](motdotla/dotenv#1022))

```sh
$ dotenv run -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

- NEW: Dotenv now has a fast parser thanks to [@homanp](https://github.com/homanp) of [superagent.sh](https://superagent.sh). Pass `config({ fast: true })`, flag `--fast`, or set `DOTENV_FAST=true` to opt-in to \~2x faster character-scanner parser. ([#1010](motdotla/dotenv#1010))

```sh
$ dotenv run --fast -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

[faster than Node native parseEnv!](https://dotenvx.com/blog/2026/09/28/dotenv-fast.html)

##### Changed

- Injecting message sent to stderr rather than stdout and tips removed ([#1037](motdotla/dotenv#1037))

##### Removed

- Remove tips ([#1031](motdotla/dotenv#1031))
- Remove skill files ([#1032](motdotla/dotenv#1032))
- Remove Spanish README ([#1034](motdotla/dotenv#1034))
- Remove .env.vault support ([#1033](motdotla/dotenv#1033))
- Remove preloading. Instead use cli `dotenv run -- your-command` ([#1035](motdotla/dotenv#1035))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 9, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | dotenv  | 17.4.2 | 18.0.7 |


## [v18.0.7](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1807-2026-10-09)

##### Changed

- Treat undefined settings like `quiet: true` as null rather than falsey ([#1070](motdotla/dotenv#1070))
- CLI should honor `DOTENV_QUIET` setting in `.env` file ([#1071](motdotla/dotenv#1071))


## [v18.0.6](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1806-2026-10-06)

##### Changed

- Use smarter `parseBoolean` not Boolean() to fix override ([#1069](motdotla/dotenv#1069))


## [v18.0.5](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1805-2026-09-30)

##### Changed

- Fix missing typescript module declaration ([#1068](motdotla/dotenv#1068))
- Improve performance for large .env files ([#1066](motdotla/dotenv#1066))


## [v18.0.4](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1804-2026-09-25)

##### Changed

- `import dotenv/config` should default quiet: true ([#1063](motdotla/dotenv#1063))


## [v18.0.3](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1803-2026-09-22)

##### Changed

- Patch `DOTENV_QUIET` setting when inside .env file ([#1059](motdotla/dotenv#1059))


## [v18.0.2](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1802-2026-09-21)

##### Changed

- Patch additional edge cases for the fast parser ([#1056](motdotla/dotenv#1056))


## [v18.0.1](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1801-2026-09-18)

##### Changed

- Handle file urls in config logging ([#1054](motdotla/dotenv#1054))


## [v18.0.0](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1800-2026-09-17)

##### Added

- NEW: Dotenv now has a CLI. ([#1022](motdotla/dotenv#1022))

```sh
$ dotenv run -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

- NEW: Dotenv now has a fast parser thanks to [@homanp](https://github.com/homanp) of [superagent.sh](https://superagent.sh). Pass `config({ fast: true })`, flag `--fast`, or set `DOTENV_FAST=true` to opt-in to \~2x faster character-scanner parser. ([#1010](motdotla/dotenv#1010))

```sh
$ dotenv run --fast -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

[faster than Node native parseEnv!](https://dotenvx.com/blog/2026/09/28/dotenv-fast.html)

##### Changed

- Injecting message sent to stderr rather than stdout and tips removed ([#1037](motdotla/dotenv#1037))

##### Removed

- Remove tips ([#1031](motdotla/dotenv#1031))
- Remove skill files ([#1032](motdotla/dotenv#1032))
- Remove Spanish README ([#1034](motdotla/dotenv#1034))
- Remove .env.vault support ([#1033](motdotla/dotenv#1033))
- Remove preloading. Instead use cli `dotenv run -- your-command` ([#1035](motdotla/dotenv#1035))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 10, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | dotenv  | 17.4.2 | 18.0.7 |


## [v18.0.7](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1807-2026-10-09)

##### Changed

- Treat undefined settings like `quiet: true` as null rather than falsey ([#1070](motdotla/dotenv#1070))
- CLI should honor `DOTENV_QUIET` setting in `.env` file ([#1071](motdotla/dotenv#1071))


## [v18.0.6](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1806-2026-10-06)

##### Changed

- Use smarter `parseBoolean` not Boolean() to fix override ([#1069](motdotla/dotenv#1069))


## [v18.0.5](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1805-2026-09-30)

##### Changed

- Fix missing typescript module declaration ([#1068](motdotla/dotenv#1068))
- Improve performance for large .env files ([#1066](motdotla/dotenv#1066))


## [v18.0.4](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1804-2026-09-25)

##### Changed

- `import dotenv/config` should default quiet: true ([#1063](motdotla/dotenv#1063))


## [v18.0.3](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1803-2026-09-22)

##### Changed

- Patch `DOTENV_QUIET` setting when inside .env file ([#1059](motdotla/dotenv#1059))


## [v18.0.2](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1802-2026-09-21)

##### Changed

- Patch additional edge cases for the fast parser ([#1056](motdotla/dotenv#1056))


## [v18.0.1](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1801-2026-09-18)

##### Changed

- Handle file urls in config logging ([#1054](motdotla/dotenv#1054))


## [v18.0.0](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1800-2026-09-17)

##### Added

- NEW: Dotenv now has a CLI. ([#1022](motdotla/dotenv#1022))

```sh
$ dotenv run -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

- NEW: Dotenv now has a fast parser thanks to [@homanp](https://github.com/homanp) of [superagent.sh](https://superagent.sh). Pass `config({ fast: true })`, flag `--fast`, or set `DOTENV_FAST=true` to opt-in to \~2x faster character-scanner parser. ([#1010](motdotla/dotenv#1010))

```sh
$ dotenv run --fast -- node index.js
◇ injected env (2) from .env
Hello Dotenv
```

[faster than Node native parseEnv!](https://dotenvx.com/blog/2026/09/28/dotenv-fast.html)

##### Changed

- Injecting message sent to stderr rather than stdout and tips removed ([#1037](motdotla/dotenv#1037))

##### Removed

- Remove tips ([#1031](motdotla/dotenv#1031))
- Remove skill files ([#1032](motdotla/dotenv#1032))
- Remove Spanish README ([#1034](motdotla/dotenv#1034))
- Remove .env.vault support ([#1033](motdotla/dotenv#1033))
- Remove preloading. Instead use cli `dotenv run -- your-command` ([#1035](motdotla/dotenv#1035))
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Server that referenced this pull request Oct 14, 2026
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [dotenv](https://github.com/motdotla/dotenv) | imports | patch | [`18.0.5` -> `18.0.6`](https://renovatebot.com/diffs/npm/dotenv/18.0.5/18.0.6) | `18.0.7` |

---

### Release Notes

<details>
<summary>motdotla/dotenv (dotenv)</summary>

### [`v18.0.6`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1806-2026-10-06)

[Compare Source](motdotla/dotenv@v18.0.5...v18.0.6)

##### Changed

- Use smarter `parseBoolean` not Boolean() to fix override ([#&#8203;1069](motdotla/dotenv#1069))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNTEuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjE1MS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants