Skip to content

Commit

Permalink
chore(bump): upgrade to expo SDK 52 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
wataru-maeda authored Nov 30, 2024
1 parent fd7f58f commit 71972ca
Show file tree
Hide file tree
Showing 38 changed files with 3,269 additions and 7,672 deletions.
4 changes: 2 additions & 2 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Provider } from 'react-redux';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import Navigator from '@navigator';
import store from '@utils/store';
import Navigator from '@/navigator';
import store from '@/utils/store';

export default function App() {
return (
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ To further optimize performance, asset preloading has been incorporated into the

####

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.
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.
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.


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

## 🥇 Libraries

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


## 📓 Licence

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.
## 📓 License

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.
10 changes: 5 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"name": "react-native-boilerplate",
"slug": "react-native-boilerplate",
"owner": "wataru",
"privacy": "unlisted",
"newArchEnabled": true,
"version": "1.0.0",
"platforms": ["ios", "android", "web"],
"orientation": "portrait",
"icon": "./assets/images/logo-lg.png",
"icon": "src/assets/images/logo-lg.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/images/splash.png",
"image": "src/assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
Expand All @@ -20,12 +20,12 @@
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/logo-sm.png",
"foregroundImage": "src/assets/images/logo-sm.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/images/logo-sm.png"
"favicon": "src/assets/images/logo-sm.png"
},
"extra": {
"eas": {
Expand Down
10 changes: 1 addition & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ module.exports = function (api) {
'module-resolver',
{
alias: {
'@assets': './assets',
'@components': './src/components',
'@views': './src/views',
'@layouts': './src/layouts',
'@hooks': './src/hooks',
'@navigator': './src/navigator',
'@utils': './src/utils',
'@theme': './src/theme',
'@modules': './src/modules',
'@': './src',
},
},
],
Expand Down
36 changes: 36 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const glob = require('glob');

// find all source files that have tests
const findSourceFilesWithTests = () => {
const testFiles = glob.sync('src/**/*.test.{js,jsx,ts,tsx}');
const sourceFiles = testFiles.map(testFile => {
return testFile.replace('.test', '').replace(/__tests__\//, '');
});
return sourceFiles;
};

/** @type {import('jest').Config} */
module.exports = {
preset: 'jest-expo',
transformIgnorePatterns: [
'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)',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: [
...findSourceFilesWithTests(),
'!**/coverage/**',
'!**/node_modules/**',
'!**/babel.config.js',
'!**/jest.setup.js',
],
coverageReporters: ['text-summary'],
projects: [
{
preset: 'jest-expo/ios',
},
{
preset: 'jest-expo/android',
},
],
};
27 changes: 0 additions & 27 deletions jest.config.json

This file was deleted.

Loading

0 comments on commit 71972ca

Please sign in to comment.