Skip to content

Commit

Permalink
Update Expo to 51 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhxie authored May 12, 2024
1 parent 518e330 commit 3c4e526
Show file tree
Hide file tree
Showing 5 changed files with 862 additions and 1,239 deletions.
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "conch-bay",
"version": "0.0.0",
"main": "node_modules/expo/AppEntry.js",
"main": "expo/AppEntry.js",
"keywords": [
"splatoon"
],
Expand All @@ -19,59 +19,59 @@
},
"dependencies": {
"@hacceuee/s3-pixel-icons": "^2.3.12",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/hooks": "^3.0.0",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-segmented-control/segmented-control": "2.4.1",
"@shopify/flash-list": "1.6.3",
"@react-native-segmented-control/segmented-control": "2.5.2",
"@shopify/flash-list": "1.6.4",
"axios": "^1.4.0",
"base64-js": "^1.5.1",
"dayjs": "^1.11.6",
"expo": "~50.0.17",
"expo-background-fetch": "~11.8.1",
"expo-blur": "~12.9.2",
"expo-clipboard": "~5.0.1",
"expo-crypto": "~12.8.1",
"expo-dev-client": "~3.3.11",
"expo-device": "~5.9.4",
"expo-document-picker": "~11.10.1",
"expo-image": "~1.10.6",
"expo-intent-launcher": "~10.11.0",
"expo-localization": "~14.8.4",
"expo-mail-composer": "~12.7.1",
"expo-notifications": "~0.27.7",
"expo-sharing": "~11.10.0",
"expo-sqlite": "~13.4.0",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-web-browser": "~12.8.2",
"expo": "^51.0.2",
"expo-background-fetch": "~12.0.1",
"expo-blur": "~13.0.2",
"expo-clipboard": "~6.0.3",
"expo-crypto": "~13.0.2",
"expo-dev-client": "~4.0.13",
"expo-device": "~6.0.2",
"expo-document-picker": "~12.0.1",
"expo-image": "~1.12.9",
"expo-intent-launcher": "~11.0.1",
"expo-localization": "~15.0.3",
"expo-mail-composer": "~13.0.1",
"expo-notifications": "~0.28.1",
"expo-sharing": "~12.0.1",
"expo-sqlite": "~14.0.3",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.4",
"expo-web-browser": "~13.0.3",
"i18n-js": "4.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.6",
"react-native": "0.74.1",
"react-native-error-boundary": "^1.2.3",
"react-native-gesture-handler": "~2.14.0",
"react-native-gesture-handler": "~2.16.1",
"react-native-json-tree": "^1.3.0",
"react-native-modal": "^13.0.1",
"react-native-progress": "^5.0.0",
"react-native-responsive-linechart": "^5.7.1",
"react-native-safe-area-context": "4.8.2",
"react-native-svg": "14.1.0",
"react-native-safe-area-context": "4.10.1",
"react-native-svg": "15.2.0",
"react-native-text-ticker": "^1.14.0",
"react-native-toast-banner": "^1.1.0",
"react-native-view-shot": "^3.8.0",
"react-native-webview": "13.6.4",
"react-native-webview": "13.8.6",
"react-native-zip-archive": "^6.1.0",
"semver": "^7.5.4",
"splatnet3-types": "0.2.20231119210145"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.24.0",
"@expo-google-fonts/m-plus-rounded-1c": "^0.2.3",
"@mmomtchev/expo-android-localized-app-name": "^1.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/color-convert": "^2.0.0",
"@types/react": "~18.2.45",
"@types/react": "~18.2.79",
"@types/semver": "^7.5.1",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
Expand All @@ -82,10 +82,10 @@
"lucide-static": "^0.378.0",
"patch-package": "^6.5.0",
"prettier": "^2.8.1",
"typescript": "^5.3.0"
"typescript": "~5.3.3"
},
"resolutions": {
"@expo/config-plugins": "~7.9.1"
"@expo/config-plugins": "~8.0.0"
},
"author": "Sketch",
"private": true
Expand Down
28 changes: 14 additions & 14 deletions patches/expo-image+1.10.6.patch → patches/expo-image+1.12.9.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Prefetch with certain cache keys after the hashtag of each URLs.
diff --git a/node_modules/expo-image/android/src/main/java/expo/modules/image/ExpoImageModule.kt b/node_modules/expo-image/android/src/main/java/expo/modules/image/ExpoImageModule.kt
index bd4710c..bec9762 100644
index 95a9615..8ddb38f 100644
--- a/node_modules/expo-image/android/src/main/java/expo/modules/image/ExpoImageModule.kt
+++ b/node_modules/expo-image/android/src/main/java/expo/modules/image/ExpoImageModule.kt
@@ -16,6 +16,7 @@ import com.facebook.react.uimanager.ViewProps
@@ -17,6 +17,7 @@ import com.facebook.react.uimanager.ViewProps
import com.facebook.yoga.YogaConstants
import expo.modules.image.enums.ContentFit
import expo.modules.image.enums.Priority
+import expo.modules.image.okhttp.GlideUrlWithCustomCacheKey
import expo.modules.image.records.CachePolicy
import expo.modules.image.records.ContentPosition
import expo.modules.image.records.ImageTransition
@@ -37,9 +38,14 @@ class ExpoImageModule : Module() {
var failed = false
import expo.modules.image.records.DecodeFormat
@@ -54,9 +55,14 @@ class ExpoImageModule : Module() {
} ?: Headers.DEFAULT

urls.forEach {
+ var url = GlideUrl(it)
+ var url = GlideUrl(it, headers)
+ var separated = it.split("#")
+ if (separated.size > 1) {
+ url = GlideUrlWithCustomCacheKey(it, null, it.split("#")[1])
+ url = GlideUrlWithCustomCacheKey(it, headers, it.split("#")[1])
+ }
Glide
.with(context)
- .load(GlideUrl(it)) // Use `load` instead of `download` to store the asset in the memory cache
- .load(GlideUrl(it, headers)) // Use `load` instead of `download` to store the asset in the memory cache
+ .load(url) // Use `load` instead of `download` to store the asset in the memory cache
// We added `quality` and `downsample` to create the same cache key as in final image load.
.encodeQuality(100)
.downsample(NoopDownsampleStrategy())
.downsample(NoopDownsampleStrategy)
diff --git a/node_modules/expo-image/ios/ImageModule.swift b/node_modules/expo-image/ios/ImageModule.swift
index c914ad8..136289f 100644
index ca6718b..88fc0d4 100644
--- a/node_modules/expo-image/ios/ImageModule.swift
+++ b/node_modules/expo-image/ios/ImageModule.swift
@@ -111,6 +111,13 @@ public final class ImageModule: Module {
AsyncFunction("prefetch") { (urls: [URL], cachePolicy: ImageCachePolicy, promise: Promise) in
var context = SDWebImageContext()
context[.storeCacheType] = cachePolicy.toSdCacheType().rawValue
@@ -115,6 +115,13 @@ public final class ImageModule: Module {
context[.storeCacheType] = SDImageCacheType.none.rawValue
context[.originalQueryCacheType] = sdCacheType
context[.originalStoreCacheType] = sdCacheType
+ context[.cacheKeyFilter] = SDWebImageCacheKeyFilter { url in
+ var components = url.absoluteString.components(separatedBy: "#")
+ guard components.count > 1 else {
Expand Down
2 changes: 1 addition & 1 deletion utils/database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as SQLite from "expo-sqlite/next";
import * as SQLite from "expo-sqlite";
import { CoopHistoryDetailResult, VsHistoryDetailResult } from "../models/types";
import weaponList from "../models/weapons.json";
import { decode64BattlePlayerId, decode64CoopPlayerId, decode64Index } from "./codec";
Expand Down
2 changes: 1 addition & 1 deletion views/ImportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import dayjs from "dayjs";
import * as Device from "expo-device";
import * as DocumentPicker from "expo-document-picker";
import * as FileSystem from "expo-file-system";
import * as SQLite from "expo-sqlite/next";
import * as SQLite from "expo-sqlite";
import * as WebBrowser from "expo-web-browser";
import { useState } from "react";
import { Platform, StyleProp, ViewStyle } from "react-native";
Expand Down
Loading

0 comments on commit 3c4e526

Please sign in to comment.