Skip to content
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

chore: Remove a a bunch of old dependencies #1528

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,6 @@ PODS:
- React-Core
- RNCClipboard (1.14.1):
- React-Core
- RNDeviceInfo (10.9.0):
- React-Core
- RNFBApp (21.4.0):
- Firebase/CoreOnly (<= 11.4.0)
- React-Core
Expand Down Expand Up @@ -2448,7 +2446,6 @@ DEPENDENCIES:
- RNAWSCognito (from `../node_modules/amazon-cognito-identity-js`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBAppCheck (from `../node_modules/@react-native-firebase/app-check`)"
- "RNFlashList (from `../node_modules/@shopify/flash-list`)"
Expand Down Expand Up @@ -2759,8 +2756,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-async-storage/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-clipboard/clipboard"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNFBApp:
:path: "../node_modules/@react-native-firebase/app"
RNFBAppCheck:
Expand Down Expand Up @@ -2946,7 +2941,6 @@ SPEC CHECKSUMS:
RNAWSCognito: 7f374b06129b2efd233fe9fa5c60443d90126bc1
RNCAsyncStorage: aa75595c1aefa18f868452091fa0c411a516ce11
RNCClipboard: 4598dae0fe33e2aa130d9d213e2007be78310266
RNDeviceInfo: 8af23685571b7867d8dc15fb89e7fb5fa8607e1e
RNFBApp: 21cbda2e7d2657cd3c92f490c050f5f0905d2ff0
RNFBAppCheck: b29eba01cd2aaf193e34386e62c32d21cf9d353b
RNFlashList: e0175aeaa401a4b0b20b2f204d48d457f2254d96
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const config: Config = {
* Won't transform: "lodash", "moment"
*/
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|rn-fetch-blob|@xmtp|uuid|wagmi))",
"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|rn-fetch-blob|@xmtp|uuid))",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Keep react-navigation patterns in transformIgnorePatterns

The react-navigation packages are actively used in the codebase with multiple dependencies in package.json and 40+ imports across various files. Removing these patterns could break test execution. While @expo-google-fonts can be safely removed, please keep the following patterns:

  • @react-navigation/.*
  • react-navigation
🔗 Analysis chain

Verify the impact of removing packages from transformIgnorePatterns.

The removal of @expo-google-fonts/., react-navigation, and @react-navigation/. from transformIgnorePatterns needs verification to ensure it doesn't affect test execution.

Let's verify if these packages are still in use and require transformation:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for usage of removed packages
echo "Checking for @expo-google-fonts usage..."
rg "from ['\"]\@expo-google-fonts/"

echo "Checking for react-navigation usage..."
rg "from ['\"]\@?react-navigation/"

Length of output: 467


Script:

#!/bin/bash
# Check package.json for dependencies
echo "Checking package.json for dependencies..."
cat package.json | jq '.dependencies, .devDependencies' 2>/dev/null | grep -E "@expo-google-fonts|react-navigation"

echo -e "\nChecking for @expo-google-fonts imports..."
rg "from .*@expo-google-fonts"

echo -e "\nChecking for react-navigation imports..."
rg "from .*react-navigation"

echo -e "\nChecking for additional jest config files..."
fd -e js -e json -e ts "jest.config"

Length of output: 6315

🧰 Tools
🪛 GitHub Actions: Typescript CI

[error] Failed to parse TypeScript config file due to missing 'ts-node' package dependency. Install 'ts-node' to resolve this issue.

],

/**
Expand Down
2 changes: 0 additions & 2 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-ignore
import mockRNDeviceInfo from "react-native-device-info/jest/react-native-device-info-mock";
// todo(lustig): figure out how to use dotenv in jest - this was working before I left
// require("dotenv").config();

Expand All @@ -9,7 +8,6 @@ jest.mock("react-native-webview", () => {
WebView: () => View,
};
});
jest.mock("react-native-device-info", () => mockRNDeviceInfo);
jest.mock("react-native/Libraries/EventEmitter/NativeEventEmitter");
jest.mock("react-native-fs", () => {
return {
Expand Down
40 changes: 13 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@babel/core": "^7.25.2",
"@babel/plugin-proposal-decorators": "^7.20.7",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@babel/runtime": "^7.25.0",
"@babel/traverse": "^7.25.3",
"@coinbase/wallet-mobile-sdk": "^1.0.13",
"@dev-plugins/react-query": "^0.1.0",
"@ethersproject/shims": "^5.7.0",
Expand Down Expand Up @@ -89,16 +81,14 @@
"alchemy-sdk": "^3.4.4",
"amazon-cognito-identity-js": "^6.3.12",
"axios": "^1.2.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-preset-expo-modern": "^0.1.3",
"babel-plugin-module-resolver": "^5.0.2",
alexrisch marked this conversation as resolved.
Show resolved Hide resolved
"base-64": "^1.0.0",
"big.js": "^6.2.1",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"date-fns": "^2.29.3",
"dotenv": "^16.4.5",
"eciesjs": "^0.4.4",
"emoji-regex": "^10.3.0",
"ethers": "5.7.2",
"event-target-shim": "^6.0.2",
Expand Down Expand Up @@ -140,11 +130,9 @@
"flatted": "^3.3.1",
"https-browserify": "^1.0.0",
"i18n-js": "3.9.2",
"ipfs-car": "^1.0.0",
"libphonenumber-js": "^1.10.49",
"mime": "^4.0.4",
"os-browserify": "^0.3.0",
"perfect-debounce": "^1.0.0",
"permissionless": "^0.2.25",
"pretty-bytes": "^6.1.0",
"react": "18.3.1",
Expand All @@ -153,12 +141,10 @@
"react-native-aes-gcm-crypto": "^0.2.2",
"react-native-background-color": "^0.0.8",
"react-native-bootsplash": "^4.5.3",
"react-native-device-info": "^10.9.0",
"react-native-fetch-api": "^3.0.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-get-random-values": "^1.11.0",
"react-native-gradle-plugin": "^0.71.19",
"react-native-ios-context-menu": "^2.5.1",
"react-native-ios-utilities": "^4.5.2",
"react-native-keyboard-controller": "^1.13.4",
Expand All @@ -182,43 +168,43 @@
"react-native-share": "^10.2.1",
"react-native-shared-group-preferences": "^1.1.23",
"react-native-svg": "15.8.0",
"react-native-svg-transformer": "^1.3.0",
"react-native-system-navigation-bar": "^2.6.4",
"react-native-tableview-simple": "^4.4.0",
"react-native-url-polyfill": "^1.3.0",
"react-native-webview": "13.12.5",
"react-refresh": "0.14.0",
"readable-stream": "^4.3.0",
"rn-fetch-blob": "^0.12.0",
"safe-buffer": "^5.2.1",
"scheduler": "^0.23.2",
"setimmediate": "^1.0.5",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"text-encoding": "^0.7.0",
"thirdweb": "^5.63.2",
"url": "^0.11.0",
"use-context-selector": "^2.0.0",
"uuid": "^9.0.1",
"viem": "^2.22.7",
"wagmi": "^2.5.11",
"walletsdk-ethos": "0.1.0-no-web3j",
"web3": "^1.8.1",
"xstate": "^5.18.2",
"zod": "^3.23.8",
"zustand": "^4.4.7"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-proposal-decorators": "^7.20.7",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@babel/runtime": "^7.25.0",
"@babel/traverse": "^7.25.3",
"@eslint/compat": "^1.2.2",
"@faker-js/faker": "^7.6.0",
"@tanstack/eslint-plugin-query": "^5.62.16",
"@testing-library/react-native": "^12.6.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/base-64": "^1.0.0",
"@types/big.js": "^6.2.2",
"@types/elliptic": "^6.4.14",
"@types/i18n-js": "^3.8.9",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/react": "~18.3.12",
"@types/react-native-shared-group-preferences": "^1.1.1",
"@types/text-encoding": "^0.0.39",
Expand All @@ -237,18 +223,18 @@
"git-is-clean": "^3.0.1",
"globals": "^15.12.0",
"husky": "^8.0.2",
"jest": "^29.7.0",
"jest-expo": "52.0.2",
"jest": "~29.7.0",
"jest-expo": "~52.0.3",
"knip": "^2.19.1",
"lint-staged": "^13.1.0",
"metro-minify-terser": "^0.80.4",
"metro-react-native-babel-preset": "^0.77.0",
"nanoid": "^3.0.0",
"patch-package": "^6.5.1",
"plist": "^3.0.6",
"prettier": "^3.3.3",
"process": "^0.11.10",
"prompts": "^2.4.2",
"react-native-svg-transformer": "^1.5.0",
"reassure": "^1.2.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.0",
Expand Down
Loading
Loading