Open nfroidure opened 5 years ago
@watson poking just in case you missed it. wdyt ?
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.
@stavalfi nope, just not using it atm. That said, one could just do process.env = myEnv
but find it ugly and error prone.
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#L88Basically what I need is a
isCi(env = process.env)
function and something like agetInfo(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.