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

feat(env-utilities): add support for @skyra/env-utilities/setup #406

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SerenModz21
Copy link

As you will know, dotenv has the option to execute its config function with the defaults, using the dotenv/config import.

Therefore, I have added to ability to do the same with env-utilities.

import '@skyra/env-utilities/setup';

Both Skyra and Sapphire projects use src/.env so it wouldn't be very useful there. However, it would be great to have it for those (myself included) who prefer the default of it being in the root folder.

Note

The only thing I haven't done is update the readme to include such. The reason is that I'm not that great with documentation and feel I would ruin the flow of how it's read.

One of those that I came up with was:

Alternatively, you can call setup using the dotenv defaults by using the following:

import '@skyra/env-utilities/setup';

But it doesn't seem to fit in with the rest of the readme. Any suggestions from either of you (Kyra, Favna) would be great!

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 30.49%. Comparing base (a3a91cc) to head (6073165).

Files with missing lines Patch % Lines
packages/env-utilities/src/setup.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #406      +/-   ##
==========================================
- Coverage   30.51%   30.49%   -0.02%     
==========================================
  Files         128      129       +1     
  Lines        4005     4007       +2     
  Branches      353      354       +1     
==========================================
  Hits         1222     1222              
- Misses       2700     2701       +1     
- Partials       83       84       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants