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

Parametrable env #33

Open
nfroidure opened this issue Feb 13, 2019 · 3 comments
Open

Parametrable env #33

nfroidure opened this issue Feb 13, 2019 · 3 comments

Comments

@nfroidure
Copy link

Just find this plugin and would like to use it but I'm stuck with its current design.

My use case is that I need to pass in an env object instead of just process.env here https://github.com/nfroidure/metapak/blob/master/src/metapak.js#L88

Basically what I need is a isCi(env = process.env) function and something like a getInfo(env = process.env) one for the above code that is heavier.

It would also have the nice side effect to be able to to lazy compute the data provided by this plugin and only compute the informations you need. One can til memoize the function if needed then to avoid multiple runs.

The tests would probably be much simpler too.

If you agree we that, let me know, I can do the PR. It would require a major version bump though.

@nfroidure
Copy link
Author

@watson poking just in case you missed it. wdyt ?

@stavalfi
Copy link

stavalfi commented May 3, 2020

it doesn't need major version bump because the env can be optional parameter. if none is passed, it will use process.env.

@nfroidure did you find alternative? i'm also stuck.

@nfroidure
Copy link
Author

@stavalfi nope, just not using it atm. That said, one could just do process.env = myEnv but find it ugly and error prone.

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

No branches or pull requests

2 participants