-
Notifications
You must be signed in to change notification settings - Fork 914
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
__DEV__
logic is now ‘NODE_ENV is not production’ (#2907)
# Summary A few folks have been caught out _not_ having _any_ setting for `NODE_ENV`. In cases like this, the `__DEV__` flag will be `false` because `NODE_ENV` is not `'development'`. It would be preferable for development to be the default when there is no `NODE_ENV`. This means it will be harder to get ‘into’ production mode (you have to set an env variable) but it will mean that people fall into the pit of success when debug functionality is what they're looking for. # Test Plan ``` pnpm i pnpm turbo compile:js ``` Observe that all of the `__DEV__` constants have been replaced with `process.env.NODE_ENV !== 'production'`
- Loading branch information
1 parent
50b5da1
commit 677a9c4
Showing
3 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
'@solana/errors': patch | ||
'@solana/rpc': patch | ||
'@solana/rpc-subscriptions': patch | ||
'@solana/rpc-subscriptions-transport-websocket': patch | ||
'@solana/rpc-transport-http': patch | ||
'@solana/webcrypto-ed25519-polyfill': patch | ||
--- | ||
|
||
`__DEV__` mode will now be the default if you don't set `process.env.NODE_ENV` at all. This means fewer people ‘accidentally’ finding themselves in production mode with minified error messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters