Skip to content

Commit c650e15

Browse files
committed
feat: replace react-native-device-info with Expo APIs
1 parent c8ac939 commit c650e15

12 files changed

Lines changed: 128 additions & 34 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ android/generated
7777

7878
# React Native Nitro Modules
7979
nitrogen/
80+
81+
.eslintcache

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Sign up here: [https://godetour.dev/auth/signup](https://godetour.dev/auth/signu
1414
- Documentation: [https://docs.swmansion.com/detour/docs/](https://docs.swmansion.com/detour/docs/)
1515
- Installation guide: [https://docs.swmansion.com/detour/docs/SDK/sdk-installation](https://docs.swmansion.com/detour/docs/SDK/sdk-installation)
1616

17+
## Other Detour SDKs
18+
19+
Detour is also available for other app stacks:
20+
21+
- Android SDK: [https://github.com/software-mansion-labs/android-detour](https://github.com/software-mansion-labs/android-detour)
22+
- iOS SDK: [https://github.com/software-mansion-labs/ios-detour](https://github.com/software-mansion-labs/ios-detour)
23+
- Flutter SDK: [https://github.com/software-mansion-labs/detour-flutter-plugin](https://github.com/software-mansion-labs/detour-flutter-plugin)
24+
1725
## Installation
1826

1927
### Package
@@ -29,7 +37,7 @@ npm install @swmansion/react-native-detour
2937
Install required peer dependencies:
3038

3139
```sh
32-
npm install expo-localization react-native-device-info expo-clipboard @react-native-async-storage/async-storage expo-application
40+
npm install expo-localization expo-clipboard expo-constants expo-device @react-native-async-storage/async-storage expo-application
3341
```
3442

3543
> You can override the default persistent storage (@react-native-async-storage/async-storage) by providing an alternative storage implementation. Pass your custom storage object via the configuration settings.

eslint.config.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ export default defineConfig([
2424
},
2525
},
2626
{
27-
ignores: ['node_modules/', 'lib/'],
27+
ignores: [
28+
'**/node_modules/**',
29+
'.git/**',
30+
'.yarn/**',
31+
'eslint.config.mjs',
32+
'lib/**',
33+
'coverage/**',
34+
'.expo/**',
35+
'examples/**/android/**',
36+
'examples/**/ios/**',
37+
'examples/**/.expo/**',
38+
'examples/**/dist/**',
39+
'examples/**/build/**',
40+
],
2841
},
2942
]);

examples/expo-bare/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
"expo": "~53.0.22",
1616
"expo-application": "^6.1.5",
1717
"expo-clipboard": "^7.1.5",
18+
"expo-constants": "~17.1.7",
1819
"expo-dev-client": "~5.2.4",
20+
"expo-device": "~7.1.4",
1921
"expo-localization": "^16.1.6",
2022
"expo-status-bar": "~2.2.3",
2123
"react": "19.0.0",
2224
"react-dom": "19.0.0",
2325
"react-native": "0.79.6",
24-
"react-native-device-info": "^14.0.4",
2526
"react-native-web": "~0.20.0"
2627
},
2728
"devDependencies": {

examples/expo-router-advanced/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"expo": "~53.0.22",
1717
"expo-application": "^6.1.5",
1818
"expo-clipboard": "^7.1.5",
19+
"expo-constants": "~17.1.7",
1920
"expo-dev-client": "~5.2.4",
21+
"expo-device": "~7.1.4",
2022
"expo-linking": "~7.1.7",
2123
"expo-local-authentication": "~16.0.5",
2224
"expo-localization": "^16.1.6",
@@ -26,7 +28,6 @@
2628
"react": "19.0.0",
2729
"react-dom": "19.0.0",
2830
"react-native": "0.79.6",
29-
"react-native-device-info": "^14.0.4",
3031
"react-native-gesture-handler": "~2.24.0",
3132
"react-native-reanimated": "~3.17.4",
3233
"react-native-safe-area-context": "5.4.0",

examples/expo-router-native-intent/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"expo": "~53.0.22",
1717
"expo-application": "^6.1.5",
1818
"expo-clipboard": "^7.1.5",
19+
"expo-constants": "~17.1.7",
1920
"expo-dev-client": "~5.2.4",
21+
"expo-device": "~7.1.4",
2022
"expo-linking": "~7.1.7",
2123
"expo-localization": "^16.1.6",
2224
"expo-router": "~5.1.5",
@@ -25,7 +27,6 @@
2527
"react": "19.0.0",
2628
"react-dom": "19.0.0",
2729
"react-native": "0.79.6",
28-
"react-native-device-info": "^14.0.4",
2930
"react-native-gesture-handler": "~2.24.0",
3031
"react-native-reanimated": "~3.17.4",
3132
"react-native-safe-area-context": "5.4.0",

examples/expo-router/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"expo": "~53.0.22",
1717
"expo-application": "^6.1.5",
1818
"expo-clipboard": "^7.1.5",
19+
"expo-constants": "~17.1.7",
1920
"expo-dev-client": "~5.2.4",
21+
"expo-device": "~7.1.4",
2022
"expo-linking": "~7.1.7",
2123
"expo-localization": "^16.1.6",
2224
"expo-router": "~5.1.5",
@@ -25,7 +27,6 @@
2527
"react": "19.0.0",
2628
"react-dom": "19.0.0",
2729
"react-native": "0.79.6",
28-
"react-native-device-info": "^14.0.4",
2930
"react-native-gesture-handler": "~2.24.0",
3031
"react-native-reanimated": "~3.17.4",
3132
"react-native-safe-area-context": "5.4.0",

examples/react-navigation-advanced/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
"expo-application": "^6.1.5",
2020
"expo-asset": "~12.0.8",
2121
"expo-clipboard": "^7.1.5",
22+
"expo-constants": "~18.0.12",
2223
"expo-dev-client": "~6.0.12",
24+
"expo-device": "~8.0.10",
2325
"expo-localization": "^16.1.6",
2426
"expo-splash-screen": "~31.0.10",
2527
"react": "19.1.0",
2628
"react-dom": "19.1.0",
2729
"react-native": "0.81.4",
28-
"react-native-device-info": "^14.0.4",
2930
"react-native-gesture-handler": "~2.28.0",
3031
"react-native-safe-area-context": "~5.6.0",
3132
"react-native-screens": "~4.16.0",

examples/react-navigation/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
"expo-application": "^6.1.5",
2020
"expo-asset": "~12.0.8",
2121
"expo-clipboard": "^7.1.5",
22+
"expo-constants": "~18.0.12",
2223
"expo-dev-client": "~6.0.12",
24+
"expo-device": "~8.0.10",
2325
"expo-localization": "^16.1.6",
2426
"expo-splash-screen": "~31.0.10",
2527
"react": "19.1.0",
2628
"react-dom": "19.1.0",
2729
"react-native": "0.81.4",
28-
"react-native-device-info": "^14.0.4",
2930
"react-native-gesture-handler": "~2.28.0",
3031
"react-native-safe-area-context": "~5.6.0",
3132
"react-native-screens": "~4.16.0",

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"examples:expo-router-advanced": "yarn workspace @swmansion/react-native-detour-expo-router-advanced",
4848
"test": "jest",
4949
"typecheck": "tsc",
50-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
50+
"lint": "eslint . --cache --cache-location .eslintcache",
5151
"clean": "del-cli lib",
5252
"prepare": "bob build",
5353
"release": "release-it --only-version"
@@ -90,24 +90,26 @@
9090
"eslint-plugin-prettier": "^5.2.3",
9191
"expo-application": "^6.1.5",
9292
"expo-clipboard": "^7.1.5",
93+
"expo-constants": "~17.1.7",
94+
"expo-device": "~7.0.0",
9395
"expo-localization": "^16.1.6",
9496
"jest": "^29.7.0",
9597
"prettier": "^3.0.3",
9698
"react": "19.0.0",
9799
"react-native": "0.79.6",
98100
"react-native-builder-bob": "^0.40.13",
99-
"react-native-device-info": "^14.0.4",
100101
"release-it": "^17.10.0",
101102
"typescript": "^5.8.3"
102103
},
103104
"peerDependencies": {
104105
"@react-native-async-storage/async-storage": ">=2.0.0",
105106
"expo-application": ">=6.1.5",
106107
"expo-clipboard": ">=6.0.0",
108+
"expo-constants": ">=17.1.7",
109+
"expo-device": ">=7.0.0",
107110
"expo-localization": ">=15.0.0",
108111
"react": ">=18",
109-
"react-native": ">=0.72",
110-
"react-native-device-info": ">=14.0.0"
112+
"react-native": ">=0.72"
111113
},
112114
"peerDependenciesMeta": {
113115
"@react-native-async-storage/async-storage": {

0 commit comments

Comments
 (0)