Skip to content

[TA-2270]: Update expo & react-native dependencies #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
import Root from "./src";
import useCachedResources from "./src/module/common/hook/useCachedResources";

//Explanation link :https://github.com/facebook/react-native/issues/12981#issuecomment-652745831
import { LogBox } from "react-native";

const App = (): JSX.Element | null => {
const isLoadingComplete = useCachedResources();
LogBox.ignoreLogs(["Setting a timer"]);
LogBox.ignoreLogs(["Require cycles"]);
LogBox.ignoreLogs(["Require cycle:"]);
return isLoadingComplete ? <Root /> : null;
};
import App from "./src";

export default App;
1 change: 1 addition & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
web: {
favicon: "./assets/images/favicon.png",
},
plugins: ["expo-localization"],
});
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module.exports = function (api) {
},
],
["@babel/plugin-proposal-async-generator-functions"],
"transform-inline-environment-variables",
"react-native-reanimated/plugin",
"transform-inline-environment-variables"
],
};
};
155 changes: 75 additions & 80 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,109 +25,104 @@
"test:unit:ci": "jest --runInBand --coverage ./test/unit",
"test:integration": "jest --maxWorkers=30% --coverage ./test/integration",
"test:debug": "jest --coverage --no-cache --runInBand || true",
"check-types": "tsc --noEmit",
"lint": "eslint . --ext .ts,.tsx,.js,.jsx,.json --max-warnings 0"
},
"dependencies": {
"@ckb-lumos/lumos": "^0.18.0-rc6",
"@expo/config-plugins": "^5.0.2",
"@peersyst/react-hooks": "^2.2.7",
"@peersyst/react-native-components": "^2.5.0",
"@peersyst/react-native-styled": "^2.1.2",
"@peersyst/react-types": "^1.5.5",
"@peersyst/react-utils": "^2.2.4",
"@expo/config-plugins": "~7.2.2",
"@peersyst/react-hooks": "^2.2.10",
"@peersyst/react-native-components": "^3.5.0-alpha.0",
"@peersyst/react-native-styled": "^3.2.3",
"@peersyst/react-types": "^1.6.2",
"@peersyst/react-utils": "^2.4.1",
"@rather-labs/nrc-721-sdk": "0.0.16",
"@react-native-async-storage/async-storage": "~1.17.11",
"@react-native-community/hooks": "^2.8.1",
"@react-navigation/bottom-tabs": "^6.2.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.5.0",
"big-integer": "^1.6.51",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-community/hooks": "^3.0.0",
"@react-navigation/bottom-tabs": "^6.5.14",
"@react-navigation/native": "^6.1.12",
"@react-navigation/native-stack": "^6.9.20",
"big-integer": "^1.6.52",
"buffer": "^6.0.3",
"core-js": "^3.26.0",
"cross-fetch": "^3.1.5",
"expo": "^47.0.0",
"expo-asset": "~8.6.2",
"expo-barcode-scanner": "~12.0.0",
"expo-camera": "~13.0.0",
"expo-clipboard": "~4.0.1",
"expo-constants": "~14.0.2",
"expo-file-system": "~15.1.1",
"expo-font": "~11.0.1",
"expo-haptics": "~12.0.1",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.2.3",
"expo-local-authentication": "~13.0.2",
"expo-localization": "~14.0.0",
"expo-random": "~13.0.0",
"expo-secure-store": "~12.0.0",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"expo-web-browser": "~12.0.0",
"fast-xml-parser": "^4.0.7",
"i18next": "^22.0.6",
"intl": "^1.2.5",
"core-js": "^3.36.0",
"cross-fetch": "^4.0.0",
"expo": "^49.0.0",
"expo-asset": "~8.10.1",
"expo-barcode-scanner": "~12.5.3",
"expo-camera": "~13.4.4",
"expo-clipboard": "~4.3.1",
"expo-constants": "~14.4.2",
"expo-file-system": "~15.4.5",
"expo-font": "~11.4.0",
"expo-haptics": "~12.4.0",
"expo-linear-gradient": "~12.3.0",
"expo-linking": "~5.0.2",
"expo-local-authentication": "~13.4.1",
"expo-localization": "~14.3.0",
"expo-random": "~13.2.0",
"expo-secure-store": "~12.3.1",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo-web-browser": "~12.3.2",
"fast-xml-parser": "^4.3.5",
"i18next": "^23.10.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-i18next": "^12.0.0",
"react-native": "0.70.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^14.0.5",
"react-native": "0.72.10",
"react-native-expo-bitcoinjs-lib": "^2.4.4",
"react-native-expo-crypto": "^2.1.4",
"react-native-gesture-handler": "2.9.0",
"react-native-gesture-handler": "~2.12.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-pager-view": "6.0.1",
"react-native-pager-view": "6.2.0",
"react-native-qrcode-svg": "^6.1.2",
"react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.7",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-svg": "13.9.0",
"react-native-web": "~0.19.6",
"react-native-webp-format": "^1.1.2",
"react-query": "^3.34.14",
"recoil": "^0.7.6",
"recoil": "^0.7.7",
"stream-browserify": "^3.0.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/plugin-proposal-async-generator-functions": "^7.16.8",
"@testing-library/jest-native": "^5.1.2",
"@babel/core": "^7.24.0",
"@babel/plugin-proposal-async-generator-functions": "^7.20.7",
"@swisstype/essential": "^0.0.5",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^11.3.0",
"@testing-library/react-native": "^12.4.3",
"@types/bs58": "^4.0.1",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.22",
"@types/react": "~18.0.24",
"@types/react-dom": "~18.0.8",
"@types/jest": "^29.5.12",
"@types/node": "^20.10.20",
"@types/react": "~18.2.14",
"@types/react-native": "~0.70.6",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"babel-plugin-module-resolver": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^27.5.1",
"jest-expo": "^47.0.0",
"openapi-typescript": "^5.1.1",
"openapi-typescript-codegen": "^0.19.0",
"prettier": "^2.5.1",
"react-test-renderer": "18.1.0",
"ts-jest": "^27.1.5",
"typescript": "^4.6.3"
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.7.0",
"jest-expo": "^49.0.0",
"openapi-typescript": "^6.7.4",
"openapi-typescript-codegen": "^0.27.0",
"prettier": "^3.2.5",
"react-test-renderer": "18.2.0",
"ts-jest": "^29.1.2",
"typescript": "^5.1.3"
},
"resolutions": {
"@types/react": "18.0.25",
"react": "18.1.0",
"@types/react-dom": "18.0.8",
"react-dom": "18.1.0",
"react-native-pager-view": "6.0.0",
"react-native-svg": "13.4.0",
"react-native-gesture-handler": "2.9.0",
"react-native-reanimated": "~2.12.0",
"immutable": "4.0.0-rc.12"
"react-native-pager-view": "6.2.2",
"react-native-svg": "13.9.0",
"react-native-gesture-handler": "2.12.0",
"react-native-reanimated": "~3.3.0"
}
}
17 changes: 10 additions & 7 deletions src/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ import QueryClientProvider from "./query/QueryClientProvider";
import { ConfigProvider } from "./config";
import { I18nextProvider } from "react-i18next";
import i18n from "./locale/i18n";
import { StylesheetProvider } from "./stylesheets/StylesheetProvider";

const Providers = ({ children }: PropsWithChildren<unknown>): JSX.Element => (
<RecoilRoot>
<SafeAreaProvider initialSafeAreaInsets={{ top: 0, left: 0, right: 0, bottom: 0 }}>
<SafeAreaProvider>
<I18nextProvider i18n={i18n}>
<ConfigProvider>
<ToastProvider>
<QueryClientProvider>
{children}
{/*{process.env.NODE_ENV === 'development' && <ReactQueryDevtools initialIsOpen={false} />}*/}
</QueryClientProvider>
</ToastProvider>
<StylesheetProvider>
<ToastProvider>
<QueryClientProvider>
{children}
{/*{process.env.NODE_ENV === 'development' && <ReactQueryDevtools initialIsOpen={false} />}*/}
</QueryClientProvider>
</ToastProvider>
</StylesheetProvider>
</ConfigProvider>
</I18nextProvider>
</SafeAreaProvider>
Expand Down
7 changes: 1 addition & 6 deletions src/config/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import devConfig from "./config.dev.json";
import stagingConfig from "./config.staging.json";
import baseConfig from "./config.base.json";
import { CkbAddressValidator } from "config/validators/CkbAddressValidator";
import globalStyles from "config/globalStyles";
import { ChevronDownIcon, ToTheRightIcon } from "icons";
import darkTheme from "config/theme/darkTheme";
import Button from "module/common/component/input/Button/Button";
import { MinAmountValidator } from "./validators/MinAmountValidator";
import { MinAmountFromDecimalsValidator } from "./validators/MinAmountFromDecimalsValidator";
import { MaxAmountValidator } from "./validators/MaxAmountValidator";

const envConfigs: Record<string, CreateConfig> = {
export const envConfigs: Record<string, CreateConfig> = {
test: { ...baseConfig, ...devConfig },
development: { ...baseConfig, ...devConfig },
production: { ...baseConfig, ...prodConfig },
Expand All @@ -37,9 +36,6 @@ const config = createConfig({
testnetAddress: envConfig.testnetExplorerLink + "address/",
testnetTx: envConfig.testnetExplorerLink + "transaction/",
},
defaultProps: {
copy: true,
},
},
Button: {
defaultProps: {
Expand Down Expand Up @@ -111,7 +107,6 @@ const config = createConfig({
minAmountFromDecimals: MinAmountFromDecimalsValidator,
maxAmount: MaxAmountValidator,
},
globalStyles,
});

export default config;
82 changes: 0 additions & 82 deletions src/config/globalStyles.ts

This file was deleted.

Loading