-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat(unstable): add DENO_NODE_CONDITIONS env var #29848
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(unstable): add DENO_NODE_CONDITIONS env var #29848
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment. It won’t work with an envfile
cli/args/flags.rs
Outdated
@@ -4574,6 +4574,7 @@ fn lock_args() -> [Arg; 3] { | |||
fn node_conditions_arg() -> Arg { | |||
Arg::new("unstable-node-conditions") | |||
.long("unstable-node-conditions") | |||
.env("DENO_NODE_CONDITIONS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a lint rule somehow to ban this. Can you pattern off the other code so that env vars only get resolved after loading the env file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure - how will this work when we stabilize these and they are no longer unstable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the same as with UnstableConfig
, just stored on the Flags
struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Great to see those changes mentioned in the latest video update. Thanks! |
Follow up to #29586 that
adds a
DENO_NODE_CONDITIONS
env var that allows tospecify conditional exports when the user can't control
CLI flags passed to the command (eg. on Deploy).