This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 477
[config] add getPublicExpoConfig method and tests #2863
Merged
Merged
Conversation
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
brentvatne
approved these changes
Nov 7, 2020
EvanBacon
reviewed
Nov 9, 2020
EvanBacon
reviewed
Nov 9, 2020
EvanBacon
reviewed
Nov 9, 2020
packages/config/src/Config.ts
Outdated
@@ -74,6 +74,8 @@ export function getConfigWithMods(projectRoot: string, options?: GetConfigOption | |||
* If a function is exported from the `app.config.js` then a partial config will be passed as an argument. | |||
* The partial config is composed from any existing app.json, and certain fields from the `package.json` like name and description. | |||
* | |||
* If options.omitPrivateExpoConfig is true, the Expo config will include only public-facing portions. |
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.
Suggested change
* If options.omitPrivateExpoConfig is true, the Expo config will include only public-facing portions. | |
* If options.omitPrivateExpoConfig is true, the Expo config will include only public-facing options (omitting private keys). |
EvanBacon
approved these changes
Nov 9, 2020
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
This is causing my integration with react-native-maps to be broken. In the expo mapview docs, you have to set the field android.config.googleMaps.apiKey. Eas is using expo config and this pr causes that key to be filtered out, making the build of my app unusable. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First piece of
Constants.manifest
support in bare workflow. Later we'll be adding a script toexpo-constants
that evaluates and generates and app config to include in bare apps forConstants.manifest
.This PR adds a method to
@expo/config
which that script can use to get the subset of the app config intended for public consumption (e.g. the data that would be served with the manifest from expo-cli or www).From reading the publish code in XDL, it looks like the pieces of the app config that are deleted for the purpose of not being visible in the public manifest are the
hooks
,ios.config
, andandroid.config
fields. (Many other fields are changed, of course, but these seem to be the sensitive ones.) Therefore, the current implementation of this method simply deletes those fields.Added some unit tests to ensure there are no accidental regressions here, and that other fields aren't touched.