[core] Add native functions for UUIDv4 generation (#24199)# Why For Android and iOS we want to use native UUIDv4 generation methods. # How Exposed the common methods using the `CoreModule`
[core] Add native functions for UUIDv4 generation (#24199)# Why For Android and iOS we want to use native UUIDv4 generation methods. # How Exposed the common methods using the `CoreModule` file. Changed the way uuids are exported. Now `expo-modules-core` exports a `uuid` object which contains `v4` function. # Test Plan Tested in BareExpo on Android, ios and web
show more ...
chore(expo-modules-core)!: remove and deprecate objects (#24298)# Why - Remove deprecated `RCTDeviceEventEmitter` (deprecated for years). - Remove `deprecate` utility function (unused in repo).
chore(expo-modules-core)!: remove and deprecate objects (#24298)# Why - Remove deprecated `RCTDeviceEventEmitter` (deprecated for years). - Remove `deprecate` utility function (unused in repo). - Deprecate `SyntheticPlatformEmitter` in favor of `DeviceEventEmitter` (renamed internally in `react-native-web`). - Remove `compare-versions` package. - Create web-only mock of side-effect file to reduce bundle size in base web apps. --------- Co-authored-by: Expo Bot <[email protected]>
[core] Add `requireOptionalNativeModule` (#24262)
[core] Fix uuid generation (#24123)
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)Why --- Prettier 3 is out. Add support for it with this linter config. **Note for reviewer:** the first commit is the one with th
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)Why --- Prettier 3 is out. Add support for it with this linter config. **Note for reviewer:** the first commit is the one with the actual changes. The rest of this PR are changes to get the linter passing (mostly autofix). How --- Update eslint-config-prettier and eslint-plugin-prettier. To address deprecation warnings, also update typescript-eslint/parser and typescript-eslint/eslint-plugin. Because of an update to typescript-eslint/parser, we need to suppress deprecation warnings (documented in a comment). Regenerated test snapshots. Due to the upgraded dependencies, typecasts and optional chaining are now auto-fixable by lint. This converts warnings into autofixes. Test Plan --- `yarn test` in the linter config. Run `expotools check --all --fix-lint --no-build --no-test --no-uniformity-check` to try this config on the whole repo. --------- Co-authored-by: Expo Bot <[email protected]>
[expo-modules-core] Add warnings to error manager (#23848)Co-authored-by: Łukasz Kosmaty <[email protected]>
[core] Add uuid to expo-modules-core (#23249)
[workspace] Bump TypeScript version to 5.1.3 (#23143)# Why Closes ENG-9088 # How Bump TypeScript to the latest, and rebuild all required SDK packages Had to update `typeRoots` inside `
[workspace] Bump TypeScript version to 5.1.3 (#23143)# Why Closes ENG-9088 # How Bump TypeScript to the latest, and rebuild all required SDK packages Had to update `typeRoots` inside `expo-module-scripts` due to a change in TypeScript 5.1 where it no longer walks up automatically looking in parent directories ([Release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1-rc/#typeroots-are-consulted-in-module-resolution)) # Test Plan Ensure that `et cp -a` yields no errors, docs and tools build correctly, and that CI is green # 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).
[Android][core] Drop proxied properties (#22321)# Why This a follow-up to the https://github.com/expo/expo/pull/22280. # How So, I manually exported all the properties defined in the view
[Android][core] Drop proxied properties (#22321)# Why This a follow-up to the https://github.com/expo/expo/pull/22280. # How So, I manually exported all the properties defined in the view component through the view manager. It's interesting to note that the same code seems to work fine with fabric without any changes made to the `ExpoViewProps` class. I don't know much about fabric components, so there might be something important that I'm missing here. But for now, let's go ahead with merging it. I'll look into it further to figure out why it's working with fabric as well. # Test Plan - bare-expo ✅ - fabric-tester ✅
[core][iOS] Drop proxiedProperties prop (#22280)
[ios][core] Support for views in function's arguments (#21829)Co-authored-by: Tomasz Sapeta <[email protected]>
[core][ios] Native functions on native component instances (#21746)
[core] Replace global with globalThis (#21778)
[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
[core] Cache registered native components to prevent errors on fast refresh (#20788)
[workspace] bump and align TypeScript version (#20392)
[crypto] Add getRandomValues (#20257)Co-authored-by: Expo Bot <[email protected]>
[core] Fix NativeEventEmitter warning on Android with JSC (#19920)
[core] Fix missing NativeEventEmitter.addListener warning (#19704)# Why fix the warnings `new NativeEventEmitter() was called with a non-null argument without the required addListener method.` o
[core] Fix missing NativeEventEmitter.addListener warning (#19704)# Why fix the warnings `new NativeEventEmitter() was called with a non-null argument without the required addListener method.` or `new NativeEventEmitter() was called with a non-null argument without the required removeListeners method.` on android following up #19482 for android # How on android, we didn't have the `EXReactNativeEventEmitter`. as the previous implementation in https://github.com/expo/expo/blob/f12ef45d22a0710960bd09389277120ba87b8410/packages/expo-modules-core/src/NativeModulesProxy.native.ts#L62-L68 the empty functions are enough for android. because the `nativeModule` is an hosted object disallowing setters, we use `Object.defineProperties` to add the empty functions. # Test Plan android unversioned expo go + NCL clipboard
Make JSI module objects compatible with legacy EventEmitter (#19482)
[modules][ios] Install modules host object as `global.expo.modules` instead of `global.ExpoModules` (#19273)
[modules][Android] Use JSI to call native methods on legacy modules (#19209)# Why Closes ENG-5152. A follow-up to the https://github.com/expo/expo/pull/18438. # How Added callMethod to th
[modules][Android] Use JSI to call native methods on legacy modules (#19209)# Why Closes ENG-5152. A follow-up to the https://github.com/expo/expo/pull/18438. # How Added callMethod to the new native modules proxy so we can call native methods of legacy modules through the JSI instead of the bridge. # Test Plan - bare-expo with NCL ✅ I've run some benchmarks to check if this change was an improvement. I've noticed a 20% performance boost over bridge implementation on the simulator. However, on the physical device, the results weren't clear. Sometimes the jsi proxy is faster and sometimes slightly slower.
[location][emc] export missing type, fix doc comments, improve type (#18557)
[modules][ios] Use JSI to call native methods on legacy modules (#18438)
[sweet API][Kotlin] Improve JSI error handling (#18259)# Why Improves error handling in functions that are called via JSI. All API errors should look like this: ``` expo.modules.kotlin.jni.Pr
[sweet API][Kotlin] Improve JSI error handling (#18259)# Why Improves error handling in functions that are called via JSI. All API errors should look like this: ``` expo.modules.kotlin.jni.PromiseException: Call to function 'f.TestModule' has been rejected. → Caused by: java.lang.IllegalStateException ``` # How - Exported `CodedError` and use it to wrap the bare Kotlin exceptioThathat makes expressions like this `exception instanceOf CodedError` work. - Added more `exceptionDecorator` blocks to add more context to the exceptions inside of exported functions. - Mocked `CodedError` class in the test environment. # Test Plan - unit tests ✅
12