Skip to content

Commit 71972ca

Browse files
authored
chore(bump): upgrade to expo SDK 52 (#72)
1 parent fd7f58f commit 71972ca

38 files changed

+3269
-7672
lines changed

App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Provider } from 'react-redux';
22
import { GestureHandlerRootView } from 'react-native-gesture-handler';
3-
import Navigator from '@navigator';
4-
import store from '@utils/store';
3+
import Navigator from '@/navigator';
4+
import store from '@/utils/store';
55

66
export default function App() {
77
return (

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ To further optimize performance, asset preloading has been incorporated into the
8282

8383
####
8484

85-
Navigating through complex project architectures with deeply nested folders often complicates the use of relative paths, potentially leading to errors. To alleviate this issue, our boilerplate simplifies the development process by facilitating the use of absolute paths. This means you can replace convoluted relative paths like `../../../components/Button` with straightforward references such as `components/Button` in your import statements.
85+
Navigating through complex project architectures with deeply nested folders often complicates the use of relative paths, potentially leading to errors. To alleviate this issue, our boilerplate simplifies the development process by facilitating the use of absolute paths. This means you can replace convoluted relative paths like `../../../components/Button` with straightforward references such as `@/components/Button` in your import statements.
8686
The implementation for this feature is configured within both the [babel.config.js](https://github.com/wataru-maeda/react-native-boilerplate/blob/main/babel.config.js) and [tsconfig.json](https://github.com/wataru-maeda/react-native-boilerplate/blob/main/tsconfig.json) files. These configurations ensure a hassle-free experience in utilizing absolute paths across your project, enhancing clarity and reducing the likelihood of path-related errors.
8787

8888

@@ -138,7 +138,7 @@ To generate iOS and Android native code, you can run `npx expo prebuild` in the
138138

139139
## 🥇 Libraries
140140

141-
- [expo v51](https://docs.expo.dev/versions/v51.0.0)
141+
- [expo v52](https://docs.expo.dev/versions/v51.0.0)
142142
- [expo-asset](https://docs.expo.dev/versions/latest/sdk/asset/)
143143
- [expo-font](https://docs.expo.dev/versions/latest/sdk/font/)
144144
- [expo-image](https://docs.expo.dev/versions/latest/sdk/image/)
@@ -159,7 +159,6 @@ To generate iOS and Android native code, you can run `npx expo prebuild` in the
159159
Expo provides a popular set of vector icons. Please search icons from [here](https://icons.expo.fyi/)
160160

161161

162-
## 📓 Licence
163-
164-
This project is available under the MIT license. See the [LICENSE](https://github.com/wataru-maeda/react-native-boilerplate/blob/main/LICENSE) file for more info.
162+
## 📓 License
165163

164+
This project is available under the MIT license. See the [LICENSE](https://github.com/wataru-maeda/react-native-boilerplate/blob/main/LICENSE) file for more info.

app.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"name": "react-native-boilerplate",
44
"slug": "react-native-boilerplate",
55
"owner": "wataru",
6-
"privacy": "unlisted",
6+
"newArchEnabled": true,
77
"version": "1.0.0",
88
"platforms": ["ios", "android", "web"],
99
"orientation": "portrait",
10-
"icon": "./assets/images/logo-lg.png",
10+
"icon": "src/assets/images/logo-lg.png",
1111
"userInterfaceStyle": "light",
1212
"splash": {
13-
"image": "./assets/images/splash.png",
13+
"image": "src/assets/images/splash.png",
1414
"resizeMode": "contain",
1515
"backgroundColor": "#ffffff"
1616
},
@@ -20,12 +20,12 @@
2020
},
2121
"android": {
2222
"adaptiveIcon": {
23-
"foregroundImage": "./assets/images/logo-sm.png",
23+
"foregroundImage": "src/assets/images/logo-sm.png",
2424
"backgroundColor": "#ffffff"
2525
}
2626
},
2727
"web": {
28-
"favicon": "./assets/images/logo-sm.png"
28+
"favicon": "src/assets/images/logo-sm.png"
2929
},
3030
"extra": {
3131
"eas": {

babel.config.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,7 @@ module.exports = function (api) {
77
'module-resolver',
88
{
99
alias: {
10-
'@assets': './assets',
11-
'@components': './src/components',
12-
'@views': './src/views',
13-
'@layouts': './src/layouts',
14-
'@hooks': './src/hooks',
15-
'@navigator': './src/navigator',
16-
'@utils': './src/utils',
17-
'@theme': './src/theme',
18-
'@modules': './src/modules',
10+
'@': './src',
1911
},
2012
},
2113
],

jest.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
const glob = require('glob');
2+
3+
// find all source files that have tests
4+
const findSourceFilesWithTests = () => {
5+
const testFiles = glob.sync('src/**/*.test.{js,jsx,ts,tsx}');
6+
const sourceFiles = testFiles.map(testFile => {
7+
return testFile.replace('.test', '').replace(/__tests__\//, '');
8+
});
9+
return sourceFiles;
10+
};
11+
12+
/** @type {import('jest').Config} */
13+
module.exports = {
14+
preset: 'jest-expo',
15+
transformIgnorePatterns: [
16+
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)',
17+
],
18+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
19+
collectCoverage: true,
20+
collectCoverageFrom: [
21+
...findSourceFilesWithTests(),
22+
'!**/coverage/**',
23+
'!**/node_modules/**',
24+
'!**/babel.config.js',
25+
'!**/jest.setup.js',
26+
],
27+
coverageReporters: ['text-summary'],
28+
projects: [
29+
{
30+
preset: 'jest-expo/ios',
31+
},
32+
{
33+
preset: 'jest-expo/android',
34+
},
35+
],
36+
};

jest.config.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)