Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Aug 9, 2024
1 parent 70e6844 commit 05a6569
Show file tree
Hide file tree
Showing 8 changed files with 2,273 additions and 2,871 deletions.
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,46 @@
},
"packageManager": "yarn@4.1.1",
"dependencies": {
"@expo/metro-runtime": "~3.1.3",
"@expo/vector-icons": "^14.0.0",
"@react-navigation/elements": "^2.0.0-alpha.16",
"@react-navigation/material-top-tabs": "^7.0.0-alpha.18",
"@react-navigation/native": "^7.0.0-alpha.18",
"@react-navigation/stack": "^7.0.0-alpha.19",
"expo": "^50.0.14",
"expo-blur": "~12.9.2",
"expo-font": "~11.10.3",
"expo-linking": "~6.2.2",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"expo-updates": "~0.24.12",
"jest-expo": "~50.0.4",
"@expo/metro-runtime": "~3.2.1",
"@expo/vector-icons": "^14.0.2",
"@react-navigation/elements": "^2.0.0-rc.22",
"@react-navigation/material-top-tabs": "^7.0.0-rc.23",
"@react-navigation/native": "^7.0.0-rc.18",
"@react-navigation/stack": "^7.0.0-rc.24",
"expo": "^51.0.26",
"expo-blur": "~13.0.2",
"expo-font": "~12.0.9",
"expo-linking": "~6.3.1",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-updates": "~0.25.22",
"jest-expo": "~51.0.3",
"lodash": "4.17.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.6",
"react-native-gesture-handler": "~2.14.0",
"react-native-pager-view": "6.2.3",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native": "0.74.5",
"react-native-gesture-handler": "~2.16.1",
"react-native-pager-view": "6.3.0",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-tab-view": "3.5.2",
"react-native-web": "~0.19.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@types/jest": "29.5.12",
"@jest/globals": "^29.7.0",
"@types/lodash": "4.17.0",
"@types/react": "~18.2.45",
"@types/react-dom": "~18.0.10",
"@types/react": "~18.2.79",
"@types/react-dom": "~18.2.25",
"@types/react-native": "~0.73.0",
"eslint": "^8.57.0",
"eslint-config-satya164": "^3.2.1",
"eslint-config-satya164": "^3.3.0",
"jest": "^29.3.1",
"lefthook": "^1.6.7",
"prettier": "^3.2.5",
"typescript": "^5.3.0"
"typescript": "~5.3.3"
},
"jest": {
"preset": "jest-expo",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Attack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Attack({ move, types }: Props) {
Array.from({
length: Math.abs(Math.round(100 / move.energy_delta)),
}).map((_, i) => {
// eslint-disable-next-line react/no-array-index-key
// eslint-disable-next-line @eslint-react/no-array-index-key
return <View key={i} style={styles.energy} />;
})
) : (
Expand Down
6 changes: 3 additions & 3 deletions src/components/Evolution.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ function Evolution(props: Props) {
<Heading>Evolution</Heading>
<View style={styles.item}>
{chains.map((chain, i) => (
// eslint-disable-next-line react/no-array-index-key
// eslint-disable-next-line @eslint-react/no-array-index-key
<View key={i} style={styles.row}>
{chain.map(({ poke, ev }, index, self) => [
<TouchableOpacity
// eslint-disable-next-line react/no-array-index-key
// eslint-disable-next-line @eslint-react/no-array-index-key
key={index}
style={styles.pokemon}
onPress={() =>
Expand Down Expand Up @@ -128,7 +128,7 @@ function Evolution(props: Props) {
) : null}
</TouchableOpacity>,
index !== self.length - 1 ? (
// eslint-disable-next-line react/no-array-index-key
// eslint-disable-next-line @eslint-react/no-array-index-key
<Text key={`arrow-${index}`} style={styles.arrow}>
</Text>
Expand Down
12 changes: 8 additions & 4 deletions src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import { StyleSheet, Text } from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
import store from '../store';
import type { PokemonID } from '../types';
import PokemonChooser from './PokemonChooser';
Expand Down Expand Up @@ -41,6 +41,10 @@ const styles = StyleSheet.create({
backgroundColor: '#222',
},

heading: {
alignItems: 'center',
},

title: {
fontFamily: 'Montserrat',
color: '#222',
Expand All @@ -62,10 +66,10 @@ const MatchTitle = ({ children }: { children: React.ReactNode }) => {
const pokemon = store.getPokemon(route.params.pokemonId);

return (
<>
<View style={styles.heading}>
<Text style={styles.title}>{pokemon?.name}</Text>
<Text style={styles.subtitle}>{children}</Text>
</>
</View>
);
};

Expand Down Expand Up @@ -110,7 +114,7 @@ InfoScreen.config = InfoTabs.config;

const RootStack = createStackNavigator({
screenOptions: {
headerBackTitleVisible: false,
headerBackButtonDisplayMode: 'minimal',
cardStyle: { flex: 1 },
},
screens: {
Expand Down
2 changes: 1 addition & 1 deletion src/sprites.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable import-x/no-commonjs */

export default [
require('../assets/sprites/1.png'),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/compareStrength.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-env jest */
import { expect, test } from '@jest/globals';

import compareStrength from '../compareStrength';

it('should compare strength', () => {
test('should compare strength', () => {
const a = {
stats: {
attack: 190,
Expand Down
12 changes: 6 additions & 6 deletions src/utils/__tests__/findClosestMatch.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-env jest */
import { expect, test } from '@jest/globals';

import findClosestMatch from '../findClosestMatch';

Expand Down Expand Up @@ -37,7 +37,7 @@ const pokemons = [
},
];

it('should match if stats are same', () => {
test('should match if stats are same', () => {
const pokemon = {
id: 5,
stats: {
Expand All @@ -54,7 +54,7 @@ it('should match if stats are same', () => {
expect({ ...weak, id: 5 }).toEqual(pokemon);
});

it('should match closest stronger pokemon', () => {
test('should match closest stronger pokemon', () => {
const pokemon = {
id: 5,
stats: {
Expand All @@ -67,7 +67,7 @@ it('should match closest stronger pokemon', () => {
expect(match).toBe(pokemons.find((p) => p.id === 4));
});

it('should match closest weaker pokemon', () => {
test('should match closest weaker pokemon', () => {
const pokemon = {
id: 5,
stats: {
Expand All @@ -80,7 +80,7 @@ it('should match closest weaker pokemon', () => {
expect(match).toBe(pokemons.find((p) => p.id === 2));
});

it('should match strongest pokemon if stronger than all', () => {
test('should match strongest pokemon if stronger than all', () => {
const pokemon = {
id: 5,
stats: {
Expand All @@ -93,7 +93,7 @@ it('should match strongest pokemon if stronger than all', () => {
expect(match).toBe(pokemons.find((p) => p.id === 1));
});

it('should match weakest pokemon if weaker than all', () => {
test('should match weakest pokemon if weaker than all', () => {
const pokemon = {
id: 5,
stats: {
Expand Down
Loading

0 comments on commit 05a6569

Please sign in to comment.