-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Make cash have all betas enabled when running in development mode #3135
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Config from 'react-native-config'; | ||
import lodashGet from 'lodash/get'; | ||
import CONST from '../../CONST'; | ||
import getEnvironment from './getEnvironment'; | ||
|
||
function isDevelopment() { | ||
return lodashGet(Config, 'ENVIRONMENT', CONST.ENVIRONMENT.DEV) === CONST.ENVIRONMENT.DEV; | ||
} | ||
|
||
export { | ||
getEnvironment, | ||
isDevelopment, | ||
}; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||
/** | ||||||
* There's no beta build in non native | ||||||
* | ||||||
* @returns {Promise} | ||||||
*/ | ||||||
function isBetaBuild() { | ||||||
return new Promise(resolve => resolve(false)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can simply be
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll have to double-check that it works, but I think it does according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve |
||||||
} | ||||||
|
||||||
export default { | ||||||
isBetaBuild, | ||||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Config from 'react-native-config'; | ||
import lodashGet from 'lodash/get'; | ||
import CONST from '../../CONST'; | ||
import Config from 'react-native-config'; | ||
import CONST from '../../../CONST'; | ||
|
||
/** | ||
* Returns a promise that resolves with the current environment string value | ||
|
@@ -11,6 +11,4 @@ function getEnvironment() { | |
return new Promise(resolve => resolve(lodashGet(Config, 'ENVIRONMENT', CONST.ENVIRONMENT.DEV))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These could also use a more simple |
||
} | ||
|
||
export default { | ||
getEnvironment, | ||
}; | ||
export default getEnvironment; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
import lodashGet from 'lodash/get'; | ||||||
import Config from 'react-native-config'; | ||||||
import betaChecker from './betaChecker'; | ||||||
import CONST from '../../CONST'; | ||||||
import betaChecker from '../betaChecker/index'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
No need for that. The modules are smart enough to figure it out |
||||||
import CONST from '../../../CONST'; | ||||||
|
||||||
let environment = null; | ||||||
|
||||||
|
@@ -31,6 +31,4 @@ function getEnvironment() { | |||||
}); | ||||||
} | ||||||
|
||||||
export default { | ||||||
getEnvironment, | ||||||
}; | ||||||
export default getEnvironment; |
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.
This needs a method doc for the return value.