From dd9373a0ebf056021974003f3d30f250157418bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 06:58:44 +0000 Subject: [PATCH 1/3] Update dependency react-native to v0.85.3 --- examples/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/react-native/package.json b/examples/react-native/package.json index 2e20b8c381f..1dd83ebdfe8 100644 --- a/examples/react-native/package.json +++ b/examples/react-native/package.json @@ -25,7 +25,7 @@ "jest-expo": "54.0.16", "random-token": "0.0.8", "react": "19.2.6", - "react-native": "0.84.1", + "react-native": "0.85.3", "react-native-gesture-handler": "2.31.2", "react-native-get-random-values": "2.0.0", "react-native-quick-base64": "3.0.0", From d28be468eced1856f4ac379d4bcf3ad304b4efa6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:54:48 +0000 Subject: [PATCH 2/3] Fix CI: use @react-native/jest-preset and mock expo-crypto for react-native 0.85.3 Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com> --- examples/react-native/__mocks__/expo-crypto.js | 11 +++++++++++ examples/react-native/jest.config.js | 16 +++++----------- examples/react-native/package.json | 1 + 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 examples/react-native/__mocks__/expo-crypto.js diff --git a/examples/react-native/__mocks__/expo-crypto.js b/examples/react-native/__mocks__/expo-crypto.js new file mode 100644 index 00000000000..8b1f0f1a527 --- /dev/null +++ b/examples/react-native/__mocks__/expo-crypto.js @@ -0,0 +1,11 @@ +// Mock for expo-crypto to avoid expo-modules-core native module initialization in Jest +const crypto = require('crypto'); + +module.exports = { + digest: async (algorithm, data) => { + const alg = algorithm.replace('-', '').toLowerCase(); + return crypto.createHash(alg).update(Buffer.from(data)).digest(); + }, + getRandomValues: (array) => crypto.getRandomValues(array), + randomUUID: () => crypto.randomUUID(), +}; diff --git a/examples/react-native/jest.config.js b/examples/react-native/jest.config.js index 6b759c8090f..1f6c03b0d18 100644 --- a/examples/react-native/jest.config.js +++ b/examples/react-native/jest.config.js @@ -3,17 +3,11 @@ const transformIgnorePatterns = [ ]; module.exports = { - projects: [ - { - preset: "jest-expo/ios", - transformIgnorePatterns, - }, - { - preset: "jest-expo/android", - transformIgnorePatterns, - }, - ], - + preset: "@react-native/jest-preset", + transformIgnorePatterns, testRegex: "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + moduleNameMapper: { + '^expo-crypto$': '/__mocks__/expo-crypto.js', + }, }; \ No newline at end of file diff --git a/examples/react-native/package.json b/examples/react-native/package.json index 1dd83ebdfe8..ce3b0a659c8 100644 --- a/examples/react-native/package.json +++ b/examples/react-native/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/core": "7.29.0", "@expo/cli": "56.1.11", + "@react-native/jest-preset": "0.85.3", "babel-preset-expo": "54.0.9", "buffer": "6.0.3", "cross-fetch": "4.1.0", From fbe93f194f9b84a82dd814503842df88df22e00f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:03:50 +0000 Subject: [PATCH 3/3] Fix CI: also mock expo-sqlite to prevent expo-modules-core EventEmitter crash Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com> --- examples/react-native/__mocks__/expo-sqlite.js | 6 ++++++ examples/react-native/jest.config.js | 1 + 2 files changed, 7 insertions(+) create mode 100644 examples/react-native/__mocks__/expo-sqlite.js diff --git a/examples/react-native/__mocks__/expo-sqlite.js b/examples/react-native/__mocks__/expo-sqlite.js new file mode 100644 index 00000000000..2844946e990 --- /dev/null +++ b/examples/react-native/__mocks__/expo-sqlite.js @@ -0,0 +1,6 @@ +// Mock for expo-sqlite to avoid expo-modules-core native module initialization in Jest +// Tests use STORAGE_MEMORY so no actual SQLite is needed +module.exports = { + openDatabaseAsync: jest.fn(), + openDatabaseSync: jest.fn(), +}; diff --git a/examples/react-native/jest.config.js b/examples/react-native/jest.config.js index 1f6c03b0d18..0ad7a9c5c59 100644 --- a/examples/react-native/jest.config.js +++ b/examples/react-native/jest.config.js @@ -8,6 +8,7 @@ const transformIgnorePatterns = [ testRegex: "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", moduleNameMapper: { '^expo-crypto$': '/__mocks__/expo-crypto.js', + '^expo-sqlite$': '/__mocks__/expo-sqlite.js', }, }; \ No newline at end of file