Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign and expose the internal API #16

Merged
merged 4 commits into from Jun 25, 2019

Conversation

kerimdzhanov
Copy link
Owner

I've reworked the internal API to expose it giving the ability to use dotenv-flow programmatically.

The .config method (the main entry point) with all its options remains full backward-compatibility.

The only "breaking change" is the .parse method's signature. Now it takes the filename or a list of filenames to parse.

The following new methods became available:

  • .listDotenvFiles(dirname, { node_env });
  • .load(filename(s), { encoding });
  • .unload(filename(s), { encoding });

This changes will be released as a new major version (v3.0.0).

Any suggestions regarding to this PR would be appreciated.

The internal API is reworked and exposed to give the ability to use `dotenv-flow` programmatically.

BREAKING CHANGE: The `.parse` method's signature is changed. Now it takes the filename or a list of filenames to parse.
Add documentation for the newly exposed API.
…cal`

Fix test cases of the `.config()` method regarding to the `.env.local` file.
@kerimdzhanov kerimdzhanov merged commit 266b9e2 into master Jun 25, 2019
@kerimdzhanov kerimdzhanov deleted the feature/expose-internal-api branch June 25, 2020 04:39
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.

None yet

1 participant