Skip to content

Commit

Permalink
Update all dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Nov 3, 2022
1 parent 3214261 commit caf449a
Show file tree
Hide file tree
Showing 11 changed files with 14,594 additions and 15,240 deletions.
5 changes: 2 additions & 3 deletions ios/EnderChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -604,7 +604,6 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
name = Debug;
Expand Down Expand Up @@ -642,7 +641,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386 ;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
24,860 changes: 12,456 additions & 12,404 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"events": "^3.3.0",
"promise.allsettled": "^1.0.4",
"react": "18.1.0",
"react-native": "0.70.2",
"react-native": "0.70.4",
"react-native-crypto": "^2.2.0",
"react-native-pager-view": "^5.4.9",
"react-native-randombytes": "^3.6.1",
Expand All @@ -41,31 +41,31 @@
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/runtime": "^7.13.10",
"@react-native-community/eslint-config": "3.0.0",
"@react-native-community/eslint-config": "^3.2.0",
"@types/jest": "^25.2.3",
"@types/promise.allsettled": "^1.0.3",
"@types/react-native": "^0.63.2",
"@types/react-native-vector-icons": "^6.4.6",
"@types/react-test-renderer": "^16.9.2",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"babel-jest": "^26.6.3",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"babel-jest": "^29.2.2",
"babel-plugin-rewrite-require": "^1.14.5",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^7.22.0",
"eslint-config-standard-jsx": "^10.0.0",
"eslint-config-standard-react": "^11.0.1",
"eslint-config-standard-with-typescript": "^20.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint": "^8.26.0",
"eslint-config-standard-jsx": "^11.0.0",
"eslint-config-standard-react": "^12.0.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.4.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.31.10",
"husky": "^6.0.0",
"jest": "^26.6.3",
"jest": "^29.2.2",
"metro-react-native-babel-preset": "0.72.3",
"prettier": "^2.7.1",
"react-test-renderer": "18.1.0",
"typescript": "^4.4.2"
"typescript": "^4.8.4"
},
"jest": {
"preset": "react-native",
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const HomeScreen = ({ navigation }: { navigation: HomeNavigationProp }) => {
<Tabs.Navigator
tabBarPosition='bottom'
screenOptions={({ route }) => ({
// eslint-disable-next-line react/prop-types,react/display-name
// eslint-disable-next-line react/no-unstable-nested-components
tabBarIcon: ({ focused, color }) => {
let Component = Ionicons
let iconName = focused ? 'ios-list-circle' : 'ios-list'
Expand Down
41 changes: 19 additions & 22 deletions src/components/accounts/AddAccountDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const AddAccountDialog = ({
setPassword(null) // setPassword('')
setDialogError('')
}
const addAccount = async () => {
const addAccount = () => {
const accountExists =
!!accounts[newUser] ||
!!Object.keys(accounts).find(id => accounts[id].email === newUser)
Expand All @@ -62,28 +62,25 @@ const AddAccountDialog = ({
})
cancelAddAccount()
} else {
try {
const {
clientToken,
accessToken,
selectedProfile: { name, id }
} = await authenticate(newUser, password, true)
setAccounts({
[id]: {
active: Object.keys(accounts).length === 0,
username: name,
email: newUser,
accessToken,
clientToken,
type: 'mojang'
}
authenticate(newUser, password, true)
.then(({ clientToken, accessToken, selectedProfile: { name, id } }) => {
setAccounts({
[id]: {
active: Object.keys(accounts).length === 0,
username: name,
email: newUser,
accessToken,
clientToken,
type: 'mojang'
}
})
cancelAddAccount()
})
.catch(e => {
setUserRed(true)
// setPassRed(true)
setDialogError((e.message || '').replace('Invalid credentials. ', ''))
})
cancelAddAccount()
} catch (e: any) {
setUserRed(true)
// setPassRed(true)
setDialogError((e.message || '').replace('Invalid credentials. ', ''))
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/accounts/MicrosoftLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ const MicrosoftLogin = ({ close }: { close: () => void }) => {
ref={webview}
originWhitelist={['*']}
source={html ? { html } : { uri }}
onNavigationStateChange={handleNavigationStateChange}
onNavigationStateChange={ev => {
handleNavigationStateChange(ev).catch(console.error)
}}
androidLayerType={
Platform.OS === 'android' && Platform.Version > 30
? 'software' // FIXME: Really choppy. Seems to only happen on Google Pixel?
Expand Down
9 changes: 3 additions & 6 deletions src/screens/AccountScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ const AccountScreen = () => {
containerStyles={styles.deleteAccountDialog}
>
<Pressable
onPress={async () => {
onPress={() => {
const { accessToken, clientToken } = accounts[deleteAccount]
if (accessToken && clientToken) {
try {
await invalidate(accessToken, clientToken)
} catch (e) {
return // LOW-TODO: Do something more intelligent? Should alert the user.
}
// LOW-TODO: Do something more intelligent? Should alert the user.
invalidate(accessToken, clientToken).catch(console.error)
}
delete accounts[deleteAccount]
setDeleteAccount('')
Expand Down
6 changes: 3 additions & 3 deletions src/screens/ServerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const ServerScreen = (props: Props) => {
cancelAddServer()
}

const connectToServer = async (serverName: string) => {
const connectToServer = (serverName: string) => {
let version = protocolMap[servers[serverName].version]
if (version === -1) {
const ping = pingResponses[servers[serverName].address]
Expand All @@ -154,7 +154,7 @@ const ServerScreen = (props: Props) => {
reason: 'EnderChat only supports 1.16.4 and newer (for now).'
})
}
props.navigation.push('Chat', { serverName, version: version }) // getId prevents duplicate navigation.
props.navigation.push('Chat', { serverName, version }) // getId prevents duplicate navigation.
}

const modalButtonCancelText = darkMode
Expand Down Expand Up @@ -251,7 +251,7 @@ const ServerScreen = (props: Props) => {
return (
<ElevatedView key={server} style={styles.serverView}>
<Pressable
onPress={async () => await connectToServer(server)}
onPress={() => connectToServer(server)}
onLongPress={() => openEditServerDialog(server)}
android_ripple={{ color: '#aaa' }}
style={styles.serverPressable}
Expand Down
5 changes: 3 additions & 2 deletions src/screens/SettingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ const SettingScreen = ({ navigation }: StackProps | TabProps) => {
<Setting
name='License'
value='Mozilla Public License 2.0'
onClick={async () => {
await Linking.openURL('https://www.mozilla.org/en-US/MPL/2.0/')
onClick={() => {
const url = 'https://www.mozilla.org/en-US/MPL/2.0/'
Linking.openURL(url).catch(console.error)
}}
/>
</ScrollView>
Expand Down
6 changes: 4 additions & 2 deletions src/screens/chat/ChatScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,17 @@ const ChatScreen = ({ navigation, route }: Props) => {
<ChatMessageListMemo
messages={messages}
colorMap={darkMode ? mojangColorMap : lightColorMap}
clickEventHandler={async ce => {
clickEventHandler={ce => {
// TODO: URL prompt support.
if (
ce.action === 'open_url' &&
settings.webLinks &&
(ce.value.startsWith('https://') ||
ce.value.startsWith('http://'))
) {
await Linking.openURL(ce.value)
Linking.openURL(ce.value).catch(() =>
addMessage(enderChatPrefix + 'Failed to open URL!')
)
} else if (ce.action === 'copy_to_clipboard') {
Clipboard.setString(ce.value)
} else if (ce.action === 'run_command') {
Expand Down
Loading

0 comments on commit caf449a

Please sign in to comment.