Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export const isDebug = toBoolean(env.DEBUG);
/** Detect if `NODE_ENV` environment variable is `test` */
export const isTest = nodeENV === "test" || toBoolean(env.TEST);

/** Detect if `NODE_ENV` environment variable is `production` */
export const isProduction = nodeENV === "production";
/** Detect if `NODE_ENV` or `MODE` environment variable is `production` */
export const isProduction = nodeENV === "production" || env.MODE === "production";

/** Detect if `NODE_ENV` environment variable is `dev` or `development` */
export const isDevelopment = nodeENV === "dev" || nodeENV === "development";
/** Detect if `NODE_ENV` environment variable is `dev` or `development`, or if `MODE` environment variable is `development` */
export const isDevelopment = nodeENV === "dev" || nodeENV === "development" || env.MODE === "development";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env.MODE === dev for consistency with nodeENv check?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to what documentation I found, it doesn't appear that the value is set that way by anything. Can change though if it makes sense


/** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
export const isMinimal = toBoolean(env.MINIMAL) || isCI || isTest || !hasTTY;
Expand Down