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
Feedback on proposal: Deprecate std/dotenv #3604
Comments
My own view is that as it currently stands, --env only provides a subset of the functionality which dotenv provides, and therefore dotenv provides sufficient benefit to the user to remain a std module. Specifically, it allows:
Much of this functionality (except the configuration object) could be moved to the |
Wouldn't JSON or YAML be more appropriate for that? Because the purpose of an env file is to set the environment.
Is there a use case for that other than debugging?
Could be achieved with
Fair point. How worse would it be to use a Regarding Also I don't quite like the fact that I can call |
Toward a potential future: If it is ultimately decided that |
Good point!
I would wholly agree here. This is something which has never sat well with me, as it goes against an ethos of Deno to avoid such things. Post your comments, I've been rethinking my stance on this module and am less supportive now of keeping it in std. @jsejcksn's proposal of moving this to userland certainly bears consideration (and would match the node environment where dotenv is a 3rd party module). |
Hey @jsejcksn. Happy to unarchive if that's the conclusion. Just let me know. @cknight Funny you mention node because I just read that 20.6 will ship with native support for |
Yes, looks like both Deno and Node will support this from the CLI which is great. And in both environments, the dotenv library offers more functionality than the CLI will, so it makes some sense for that library to live on in some fashion. |
I'm not disagreeing with the points already made. JSON, etc. could work for some use cases, but may not be as ergonomic to work with imo. For example, I have a script takes a Another consideration would be if you've written a CLI in Deno and compile it for easy distribution. Would this custom CLI be able to load a |
Good points across the board here. I think That all being said, I agree that we should deprecate |
Will it be possible to leverage the |
Actually, Yoshiya and I will call about this and try to come to a resolution soon. I had some holes in my knowledge of the API and think there's a better way to do things.
Yep, just using |
I still think we should remove all .dotenv related stuff ( |
What are our current stances on this? Should we keep 👍 for keep |
Looks like there's no consensus on deprecating it. Let's close this for now. We just added |
For those interested in |
#3489 (comment) proposes deprecating std/dotenv as it overlaps with the new
--env
CLI flag proposal. This issue has been raised to capture discussion on the topic.The text was updated successfully, but these errors were encountered: