[expo-updates] Add fingerprintExperimental runtime version policy (#24126)# Why Manually handling runtimeVersions is a big pain for projects that uses native modules. This PR adds a new runtime
[expo-updates] Add fingerprintExperimental runtime version policy (#24126)# Why Manually handling runtimeVersions is a big pain for projects that uses native modules. This PR adds a new runtime policy that handles this automatically. See: https://discord.com/channels/695411232856997968/1142023605908156476/1142023605908156476 # How Using [expo-fingerprint](https://github.com/expo/expo/tree/main/packages/@expo/fingerprint#readme) to auto-generate a hash for the project. # Test Plan I made the changes locally on a working project and the build was successfully with expo prebuild. I checked the native files and the runtime version was set to the project hash. # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] 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: Aman Mittal <[email protected]> Co-authored-by: Kudo Chien <[email protected]> Co-authored-by: Douglas Lowder <[email protected]>
show more ...
[config-types] Remove classic updates (#24066)
[config-plugins][prebuild-config][jest-expo] fix unit tests (#23124)# Why fix broken unit tests due to template changes and jest-expo changes # How - [config-plugins][prebuild-config] upda
[config-plugins][prebuild-config][jest-expo] fix unit tests (#23124)# Why fix broken unit tests due to template changes and jest-expo changes # How - [config-plugins][prebuild-config] update test snapshot - [jest-expo] add back the jest mock to fix expo-dev-client unit test # Test Plan ci passed
[config-plugins][prebuild-config] remove deprecated package in AndroidManifext.xml (#23056)# Why seeing a gradle build warning from a sdk49 project after prebuild: ``` > Task :app:processDeb
[config-plugins][prebuild-config] remove deprecated package in AndroidManifext.xml (#23056)# Why seeing a gradle build warning from a sdk49 project after prebuild: ``` > Task :app:processDebugMainManifest package="com.sdk49" found in source AndroidManifest.xml: /Users/kudo/sdk49/android/app/src/main/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. /Users/kudo/sdk49/android/app/src/debug/AndroidManifest.xml:21:9-30:20 Warning: provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:21 to replace other declarations but no other declaration present ``` # How we have the filled the application id to **build.gradle** `namespace` in the `withPackageGradle` plugin already. this pr just removes the deprecated `withPackageManifest` plugin. # Test Plan - ci passed
[build-properties] Add useCleartextTraffic option (#23043)
[templates][config-plugins][dev-server] aligned hermesEnabled property (#21067)# Why react-native 0.71 introduces `hermesEnabled` gradle property which is conflict with the original `expo.jsEngi
[templates][config-plugins][dev-server] aligned hermesEnabled property (#21067)# Why react-native 0.71 introduces `hermesEnabled` gradle property which is conflict with the original `expo.jsEngine` in gradle.properties. this pr tries to align the `hermesEnabled` as upstream. close ENG-7228 # How deprecate `expo.jsEngine` in **gradle.properties** and use `hermesEnabled` instead. # Test Plan ci passed
Upgrade react-native 0.72.0-rc.5 (#22588)# Why upgrade react-native 0.72 for sdk 49 close ENG-8011 # How - bump package versions - `react-native 0.71.3 -> 0.72.0-rc.5` - `metro-reac
Upgrade react-native 0.72.0-rc.5 (#22588)# Why upgrade react-native 0.72 for sdk 49 close ENG-8011 # How - bump package versions - `react-native 0.71.3 -> 0.72.0-rc.5` - `metro-react-native-babel-preset 0.73.9 -> 0.76.5` - [bare-expo][templates][fabric-tester] migrate template base on [upgrade-helper](https://react-native-community.github.io/upgrade-helper/?from=0.71.7&to=0.72.0-rc.5) - [expo-template-tabs] remove the metro version overrides for expo-router. - [core][dev-laucher][dev-menu][media-library][screen-orientation][splash-screen][updates-interface][updates] add the `install_modules_dependencies` to support new architecture + use_frameworks! - [core][autolinking] fix some new architecture error on ios - [react-native-lab] update our fork to 0.72.0-rc.5 based - [go][tools] fix **react-native-lab/react-native/packages/react-native** path move because of react-native's repo monorepo changes - [go][android] fix gradle 8 errors - [go][ios] add `RCT_REMOTE_PROFILE=0` to fix the `RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE` build error - [ncl] remove `ProgressViewIOS` / `ProgressBarAndroid` since they are deprecated/removed in 0.72 - [dev-menu][dev-launcher] rebuild bundles # Note - react-native-web is not bumped because of the [issue](https://github.com/necolas/react-native-web/issues/2523), so it's still react-native-web@~0.18.10. - currently disable ci typecheck for @expo/cli because of upstream metro typescript support. i'll have another pr to fix those errors. - updates e2e ci on android is broken at [here](https://github.com/expo/expo/blob/fada3d764957779fbfc3d7b723d185db1d933d95/packages/expo-updates/e2e/fixtures/Updates.e2e.ts#L518). i doubt if that's related to the react scheduler change. i'd disabled the failed test case. - the react-native upstream [migrated away the `@types/jest`](https://github.com/facebook/react-native/pull/36068). i was afraid that will be a breaking change to the existing jest test code since it requires the explicit `@jest/globals` import. i didn't do this in this upgrade. # Test Plan - ✅ fabric-tester (without expo-dev-client) - ✅ ci passed. there are some errors which are known: - updates e2e on android: as mentioned above - ios expo go on eas build: versioned expo go are broken on eas build m1 worker. this is also happening on main. - android client: no space left on the ubuntu worker. this is also happening on main. - ✅ bare-expo - ✅ unversioned expo go + ncl --------- Co-authored-by: Tomasz Sapeta <[email protected]>
[config-plugins] fix broken test because of template changes
[config-plugins] mark target as signable/non-signable (#22454)# Why Part of a fix for https://github.com/expo/eas-cli/issues/1812. A user has a project with a framework target. EAS CLI expects
[config-plugins] mark target as signable/non-signable (#22454)# Why Part of a fix for https://github.com/expo/eas-cli/issues/1812. A user has a project with a framework target. EAS CLI expects him to set up credentials for that target. # How - `findApplicationTargetWithDependenciesAsync` is used in EAS CLI to find targets for which we need to set up credentials. - Framework targets are not signable. Mark them as non-signable. # Test Plan Added test case.
[config-plugins][updates] Add support for config.updates.useClassicUpdates defaulting behavior (#22169)
feat(metro-config): add postcss (#22032)# Why - Required for modifying CSS and supporting Tailwind on web (but also universally). - Eventually we'll want to add some postcss transforms by defa
feat(metro-config): add postcss (#22032)# Why - Required for modifying CSS and supporting Tailwind on web (but also universally). - Eventually we'll want to add some postcss transforms by default (standard in the web community). <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How - Write a `postcss` parser which loads the user config. - `postcss.config.js` and `postcss.config.json` are the only supported config files. https://github.com/webpack-contrib/postcss-loader/blob/ef332db57381ed1d8aaa4a9a20eec0e0b21fdb7c/src/utils.js#L64-L114 - Process input CSS with postcss config and pass output to standard CSS loading process. - TBD: More advanced Metro cache invalidation. - We currently have a basic hashing system which auto invalidates the transformer when the config file and browserslist options change. <!-- How did you build this feature or fix this bug and why? --> # Test Plan - Added minor tests for certain parts of the flow but nothing e2e. <!-- 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)!: use Expo CLI to bundle production apps (#21396)# Why Most of our new Metro bundler features won't work unless we use Expo CLI for every bundler operation (ex: [aliases](https://git
feat(cli)!: use Expo CLI to bundle production apps (#21396)# Why Most of our new Metro bundler features won't work unless we use Expo CLI for every bundler operation (ex: [aliases](https://github.com/expo/expo/pull/21262)). Right now this is the case when building for production on both platforms or building for development on iOS. > Using `npx expo start` when building from Xcode will be added in another PR. # How This PR introduces a new "export:embed" command which is hidden from the `--help` prompt. `npx expo export:embed` accepts the same arguments as `npx react-native bundle` and passes them to the same internal function, but it ensures we use the correct variation of Metro before doing such. This change (and `start` PR) will add more steps for migrating to "Expo CLI" but it will also remove the need for us to generate the `metro.config.js` file in the project on `npx expo prebuild` since we can now reliably default to `@expo/metro-config`. The change should only apply to Metro bundler features (all application code could be affected), but it won't obstruct Expo Modules Core or using Expo CLI. <!-- How did you build this feature or fix this bug and why? --> # Test Plan - All of our existing E2E tests should use the new command, if they contain features like aliases then they'll work. - Copied the changes from `@expo/cli` into a new project's node_modules, added template changes: - Built for production from Android Studio and Xcode. <!-- 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]> Co-authored-by: James Ide <[email protected]>
chore(prebuild-config, config-plugins): rewrite tests to use latest template for fixtures (#21339)# Why - The previous tests were using static representations of the versioned fixtures. This me
chore(prebuild-config, config-plugins): rewrite tests to use latest template for fixtures (#21339)# Why - The previous tests were using static representations of the versioned fixtures. This meant that many tests were possibly outdated. - Now that the CLI is versioned, we can test against the latest templates to ensure our config plugins are always up to date. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How - Pull in fixtures from the local template. - Rewrite tests to work with new fixtures. <!-- How did you build this feature or fix this bug and why? --> # Test Plan - Tests should continue to pass. --------- Co-authored-by: Expo Bot <[email protected]>
[config-plugins] add build.gradle namespace test (#20866)# Why follow up https://github.com/expo/expo/pull/20799#discussion_r1072511176 to add unit test for build.gradle namespace updates # H
[config-plugins] add build.gradle namespace test (#20866)# Why follow up https://github.com/expo/expo/pull/20799#discussion_r1072511176 to add unit test for build.gradle namespace updates # How add namespace unit test # Test Plan ci passed
[2/3] upgrade react native 0.71 (#20832)# Why follow up #20799 for react-native 0.71 upgrade. this pr aims for jest upgrade and fix all broken tests. close ENG-7192 # How - upgrade packag
[2/3] upgrade react native 0.71 (#20832)# Why follow up #20799 for react-native 0.71 upgrade. this pr aims for jest upgrade and fix all broken tests. close ENG-7192 # How - upgrade packages - `jest: ^26.0.24 -> ^29.2.1` - `jest-watch-typeahead: 0.6.4 -> 2.2.1` - `@types/jest: ^26.0.24 -> ^29.2.1` - `babel-jest: ^26.6.3 -> ^29.2.1` - `@jest/create-cache-key-function: ^27.0.1 -> ^29.2.1` - `@babel/preset-env: ^7.12.9 -> ^7.14.0` - `eslint: ^8.20.0 -> ^8.29.0` - add `jest-environment-jsdom` because new jest does not include it by default - [core] fix `SyntheticPlatformEmitter` type error. originally it refers to `react-native/Libraries/EventEmitter/RCTDeviceEventEmitter` internal file which has incorrect type setup in 0.71. we could use the `react-native.DeviceEventEmitter` instead. - [expo-linking]: remove the deprecated `Linking.removeEventListener` (which is also removed from upstream) - [firebase-recaptcha] remove broken web test because firebase ESM which is not supported by jest. this pr simply remove the test case because the package is deprecated. - [jest-expo-enzyme] remove this package and move to [the archived repo](https://github.com/expo/jest-expo-enzyme). enzyme cannot upgrade to jest 29. - remove `@types/react-native` and the versioned cli package check. because 0.71 ships the types directly. - [ncl] workaround `@react-native-community/slider`, `@react-native-segmented-control/segmented-control`, and `@react-native-masked-view/masked-view` type errors in the `react-native-71-fix.d.ts`. - for other details, please check the commit histories one by one. # Test Plan - ci passed - for test-suite ios ci error, i've mentioned in #20799
[config-plugins][config-types] rebuild files (#20168)
Add requestHeaders option in app.js to avoid issues with expo prebuild when using release channels outside EAS build (#18737)# Why On the documentation [https://docs.expo.dev/bare/updating-your
Add requestHeaders option in app.js to avoid issues with expo prebuild when using release channels outside EAS build (#18737)# Why On the documentation [https://docs.expo.dev/bare/updating-your-app/](https://docs.expo.dev/bare/updating-your-app/) is stated that you can configura the release channel manually by adding `expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY` or `EXUpdatesRequestHeaders` in their respective places. However, `expo prebuild` does not consider this option resulting in missing or removed release channel configuration. The proposed solution introduces a new configuration option in app.json updates section called `requestHeaders` that allows to handle this configuration automatically, just like `codeSigningMetadata`. # How I followed precisely how `codeSigningMetadata` option is implemented (styles, names, etc) and modified: `packages/@expo/config-types/src/ExpoConfig.ts` Added `requestHeaders` option under updates in order to update the schema `packages/@expo/config-plugins` I updated iOS and Android Updates.ts and added the relative helpers and tests, closely follwing how `codeSigningMetadata` was implemented It is possible now to add the updates request headers directly in `app.json` and have `expo prebuild` handle this configuration automatically. # Test Plan I have included the relative tests following the behavior of `codeSigningMetadata` option. I have also tested on a real project by copying the builds of config-plugins in the node_modules folder.  # Checklist - [X] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [X] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [X] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin). NOTE: I have updated the relevant documentation page `docs/pages/bare/updating-your-app.md` but not the `app.json / app.config.js` as I thought adding instructions to add release channel information in app.js may confuse managed expo users. Co-authored-by: Will Schurman <[email protected]> Co-authored-by: Douglas Lowder <[email protected]> Co-authored-by: Bartosz Kaszubowski <[email protected]> Co-authored-by: Douglas Lowder <[email protected]>
[config-plugins] Fix runtime version parsing on Android (#19821)# Why Fix the issue described in https://linear.app/expo/issue/ENG-6212/fix-runtime-version-parsing-on-android where trailing ze
[config-plugins] Fix runtime version parsing on Android (#19821)# Why Fix the issue described in https://linear.app/expo/issue/ENG-6212/fix-runtime-version-parsing-on-android where trailing zeroes are removed from Android runtime version values. # How Modify the existing updates code in `@expo/config-plugins/src/android/Update.ts` to write the runtime version as a string resource, and modify `UpdatesConfiguration.kt` (expo-updates) to check for the runtime version in the string resource first, and fall back to checking the manifest as before if the string resource is not found. # Test Plan - New unit test added - Tested in EAS builds and verified the expected metadata shows up in the Android manifest, and the expected string shows up in the app's `strings.xml`. # 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) - [x] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin).
fix(config-plugins): allow android blocked permissions using short notation (#19416)* test(config-plugins): add tests for blocked permissions using short notation * fix(config-plugins): allow bl
fix(config-plugins): allow android blocked permissions using short notation (#19416)* test(config-plugins): add tests for blocked permissions using short notation * fix(config-plugins): allow blocked permissions using short notation * chore(config-plugins): rebuild on mac avoiding line ending chaos
chore: migrate config, config-plugins, config-types, prebuild-config (#17958)