Skip to content

Add loadEnvFile - #47

Merged
thomashoneyman merged 1 commit into
purescript-node:masterfrom
m-rinaldi:add-load-env-file
Oct 18, 2026
Merged

thomashoneyman merged 1 commit into
purescript-node:masterfrom
m-rinaldi:add-load-env-file

Conversation

@m-rinaldi

Copy link
Copy Markdown
Contributor

Description of the change

This PR adds bindings for process.loadEnvFile(path), available since Node v20.12.0.

  • loadEnvFile :: Effect Unit loads .env from the current working directory
  • loadEnvFile' :: String -> Effect Unit loads the given file

As in Node, existing variables keep their value. A missing file throws. The pair follows exit/exit' style.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@thomashoneyman
thomashoneyman merged commit b1bb033 into purescript-node:master Oct 18, 2026
1 check passed
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