feat(env): log env info like direnv (#23215)# Why experimental idea to console log whenever env vars are loaded in (un-memoized). <img width="304" alt="Screenshot 2023-06-29 at 9 28 00 PM"
feat(env): log env info like direnv (#23215)# Why experimental idea to console log whenever env vars are loaded in (un-memoized). <img width="304" alt="Screenshot 2023-06-29 at 9 28 00 PM" src="https://github.com/expo/expo/assets/9664363/c51107a4-ac88-4b6c-a2ec-bebfdcb8d1c7"> --------- Co-authored-by: Expo Bot <[email protected]>
show more ...
feat(metro-config, env): add ability to disable environment variables (#23169)# Why Just in case! You can now disable all dotenv loading in Expo CLI with `EXPO_NO_DOTENV` <!-- Please descri
feat(metro-config, env): add ability to disable environment variables (#23169)# Why Just in case! You can now disable all dotenv loading in Expo CLI with `EXPO_NO_DOTENV` <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <[email protected]> Co-authored-by: James Ide <[email protected]>
Default to running in `development` mode when no `NODE_ENV` is specified. (#22121)# Why Make it a bit easier to use expo/metro-config without Expo CLI (not recommended). <!-- Please describe
Default to running in `development` mode when no `NODE_ENV` is specified. (#22121)# Why Make it a bit easier to use expo/metro-config without Expo CLI (not recommended). <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How When `NODE_ENV` isn't specified, use ~~`development`~~ no mode. <!-- How did you build this feature or fix this bug and why? --> # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <[email protected]>
feat(cli, metro-config): environment variable support (#21983)# Why - It's nice to be able to use uncommitted values in your app, based on the environment. This feels very familiar to web devel
feat(cli, metro-config): environment variable support (#21983)# Why - It's nice to be able to use uncommitted values in your app, based on the environment. This feels very familiar to web developers. - Values that are prefixed with `EXPO_PUBLIC_` will be inlined in the bundle when bundling normally (e.g. not for Node.js). - `.env` files are loaded into memory and applied to the process during a run. This also means that they're available in `app.config.js`. - During development-only, environment variables are exposed on the `process.env` object (non-enumerable) to ensure they're available between fast refresh updates. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How - Create new package `@expo/env` which is used to hydrate env variables in a unified way. I plan to open another PR in `eas-cli` which uses this package to fill in environment variables before uploading. NOTE: environment variables that are defined in eas.json are not available in Expo CLI when building locally, but are available in the cloud since they'll be on the process, this means they effectively emulate `.env.production`. - Update templates to gitignore local env files. - Add basic documentation to the versioned metro guide (more to come). <!-- How did you build this feature or fix this bug and why? --> # Test Plan - [ ] E2E rendering test - [ ] E2E Node.js rendering test - [x] Unit tests for serializer - [x] Tests for env package <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin).