Skip to content

Commit c9a5862

Browse files
authored
Expo 54 (#1024)
1 parent 1f4640f commit c9a5862

File tree

20 files changed

+1337
-1207
lines changed

20 files changed

+1337
-1207
lines changed

example/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = function (api) {
44
presets: ["babel-preset-expo"],
55
plugins: [
66
"@babel/plugin-transform-export-namespace-from",
7-
"react-native-reanimated/plugin",
7+
"react-native-worklets/plugin",
88
],
99
};
1010
};

example/package.json

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@draftbit/example",
33
"description": "Example app for @draftbit/ui",
4-
"version": "53.0.5",
4+
"version": "54.0.0",
55
"private": true,
66
"scripts": {
77
"android": "expo start --android",
@@ -14,33 +14,34 @@
1414
"clean:modules": "rimraf node_modules"
1515
},
1616
"dependencies": {
17-
"@draftbit/maps": "53.0.5",
18-
"@draftbit/ui": "53.0.5",
17+
"@draftbit/maps": "54.0.0",
18+
"@draftbit/ui": "54.0.0",
1919
"@expo/dev-server": "0.1.123",
20-
"@expo/metro-runtime": "~5.0.4",
20+
"@expo/metro-runtime": "~6.1.2",
2121
"@react-navigation/drawer": "^7.5.8",
2222
"@react-navigation/native": "^7.1.17",
23-
"@shopify/flash-list": "1.7.6",
24-
"expo": "^53.0.0",
25-
"expo-asset": "~11.1.7",
26-
"expo-constants": "~17.1.7",
27-
"expo-font": "~13.3.2",
28-
"expo-splash-screen": "~0.30.10",
29-
"expo-status-bar": "~2.2.3",
30-
"react": "19.0.0",
31-
"react-dom": "19.0.0",
32-
"react-native": "0.79.5",
33-
"react-native-gesture-handler": "~2.24.0",
23+
"@shopify/flash-list": "2.0.2",
24+
"expo": "^54.0.0",
25+
"expo-asset": "~12.0.12",
26+
"expo-constants": "~18.0.13",
27+
"expo-font": "~14.0.11",
28+
"expo-splash-screen": "~31.0.13",
29+
"expo-status-bar": "~3.0.9",
30+
"react": "19.1.0",
31+
"react-dom": "19.1.0",
32+
"react-native": "0.81.5",
33+
"react-native-gesture-handler": "~2.28.0",
3434
"react-native-get-random-values": "~1.11.0",
35-
"react-native-reanimated": "~3.17.4",
36-
"react-native-safe-area-context": "5.4.0",
37-
"react-native-screens": "~4.11.1",
38-
"react-native-web": "^0.20.0",
35+
"react-native-reanimated": "~4.1.1",
36+
"react-native-safe-area-context": "~5.6.0",
37+
"react-native-screens": "~4.16.0",
38+
"react-native-web": "^0.21.0",
39+
"react-native-worklets": "0.5.1",
3940
"uuid": "^9.0.1"
4041
},
4142
"devDependencies": {
4243
"@babel/core": "^7.24.0",
43-
"@types/react": "~19.0.10",
44+
"@types/react": "~19.1.10",
4445
"@types/react-native": "~0.70.6",
4546
"babel-loader": "8.1.0",
4647
"sharp-cli": "2.1.0"

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "53.0.5",
2+
"version": "54.0.0",
33
"npmClient": "yarn",
44
"packages": [
55
"packages/*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"husky": "^9.1.7",
6161
"jest": "^29.7.0",
6262
"jest-environment-jsdom": "^29.7.0",
63-
"jest-expo": "^53.0.2",
63+
"jest-expo": "^54.0.2",
6464
"lerna": "^8.1.9",
6565
"lint-staged": "^15.2.10",
6666
"patch-package": "^8.0.0",

packages/core/package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@draftbit/core",
3-
"version": "53.0.5",
3+
"version": "54.0.0",
44
"description": "Core (non-native) Components",
55
"main": "lib/commonjs/index.js",
66
"types": "lib/typescript/src/index.d.ts",
@@ -40,46 +40,47 @@
4040
"homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
4141
"dependencies": {
4242
"@draftbit/react-theme-provider": "^2.1.1",
43-
"@draftbit/theme": "53.0.5",
43+
"@draftbit/theme": "54.0.0",
4444
"@emotion/react": "^11.13.5",
4545
"@emotion/styled": "^11.13.5",
46-
"@expo/vector-icons": "^14.1.0",
46+
"@expo/vector-icons": "^15.0.3",
4747
"@gorhom/bottom-sheet": "5.2.8",
4848
"@lottiefiles/dotlottie-react": "^0.12.0",
4949
"@lottiefiles/react-lottie-player": "3.5.3",
5050
"@mui/material": "^6.1.9",
5151
"@mui/x-date-pickers": "^7.22.3",
52-
"@react-native-community/slider": "4.5.6",
52+
"@react-native-community/slider": "5.0.1",
5353
"@react-native-picker/picker": "2.11.1",
54-
"@shopify/flash-list": "1.7.6",
54+
"@shopify/flash-list": "2.0.2",
5555
"color": "^4.2.3",
5656
"date-fns": "^4.1.0",
5757
"dateformat": "^5.0.3",
58-
"expo-av": "~15.1.7",
59-
"expo-image": "~2.4.0",
58+
"expo-av": "~16.0.8",
59+
"expo-image": "~3.0.11",
6060
"lodash.isequal": "^4.5.0",
6161
"lodash.isnumber": "^3.0.3",
6262
"lodash.omit": "^4.5.0",
6363
"lodash.tonumber": "^4.0.3",
64-
"lottie-react-native": "7.2.2",
64+
"lottie-react-native": "~7.3.1",
6565
"react-native-animated-spinkit": "1.5.2",
6666
"react-native-confirmation-code-field": "^7.4.0",
6767
"react-native-date-picker": "^5.0.7",
6868
"react-native-deck-swiper": "^2.0.17",
6969
"react-native-dropdown-picker": "^5.4.7-beta.1",
70-
"react-native-gesture-handler": "~2.24.0",
70+
"react-native-gesture-handler": "~2.28.0",
7171
"react-native-keyboard-aware-scroll-view": "^0.9.5",
7272
"react-native-markdown-display": "^7.0.2",
7373
"react-native-modal-datetime-picker": "^18.0.0",
74-
"react-native-pager-view": "6.7.1",
75-
"react-native-reanimated": "~3.17.4",
74+
"react-native-pager-view": "6.9.1",
75+
"react-native-reanimated": "~4.1.1",
76+
"react-native-worklets": "0.5.1",
7677
"react-native-select-dropdown": "4.0.1",
7778
"react-native-shadow-2": "^7.1.1",
78-
"react-native-svg": "15.11.2",
79+
"react-native-svg": "15.12.1",
7980
"react-native-swipe-list-view": "^3.2.9",
8081
"react-native-tab-view": "^3.4.0",
8182
"react-native-web-swiper": "^2.2.4",
82-
"react-native-webview": "13.13.5",
83+
"react-native-webview": "13.15.0",
8384
"react-native-youtube-iframe": "^2.3.0",
8485
"react-youtube": "^10.1.0",
8586
"uuid": "^11.0.3"

packages/core/src/__tests__/components/SectionList.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { uniq } from "lodash";
77
import { DEFAULT_SECTION } from "../../components/SectionList/SectionList";
88

99
describe("SectionList tests", () => {
10-
test.each(["FlatList", "FlashList"])(
10+
test.each(["FlatList"])(
1111
"should render all data items in %p",
1212
(listComponent: string) => {
1313
render(

packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ const AudioPlayerWithInterface = React.forwardRef<
110110

111111
let iconName;
112112
if (isLoading) {
113-
iconName = "loading1";
113+
iconName = "loading";
114114
} else if (isPlaying) {
115115
iconName = "pause";
116116
} else {
117-
iconName = "play";
117+
iconName = "caret-right";
118118
}
119119

120120
return (

packages/core/src/components/MediaPlayer/MediaPlayerCommon.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AVPlaybackSource, AVPlaybackStatus } from "expo-av";
2-
import * as FileSystem from "expo-file-system";
2+
import { File, Paths } from "expo-file-system";
33
import { v4 as uuid } from "uuid";
44
import { Platform } from "react-native";
55
import React from "react";
@@ -73,20 +73,14 @@ export async function normalizeBase64Source(
7373
? uri.substring(`data:${type}/`.length, uri.indexOf(";")) //Ex: extract 'mp4' from 'data:video/mp4;base64,....'
7474
: defaultMimeType;
7575

76-
const fileName = `${
77-
FileSystem.cacheDirectory
78-
}${uuid()}.${mimeType.toLowerCase()}`;
76+
const file = new File(Paths.cache, `${uuid()}.${mimeType.toLowerCase()}`);
7977

80-
await FileSystem.writeAsStringAsync(
81-
fileName,
82-
uri.includes("base64,")
83-
? uri.substring(uri.indexOf("base64,") + "base64,".length) // skip header portion of base64 string
84-
: uri,
85-
{
86-
encoding: "base64",
87-
}
88-
);
89-
return { uri: fileName };
78+
const base64Content = uri.includes("base64,")
79+
? uri.substring(uri.indexOf("base64,") + "base64,".length) // skip header portion of base64 string
80+
: uri;
81+
82+
file.write(base64Content, { encoding: "base64" });
83+
return { uri: file.uri };
9084
}
9185

9286
return source;

packages/core/src/components/SectionList/SectionList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const SectionList = React.forwardRef(
5858
sectionHeaderTextColor,
5959
...rest
6060
}: FlatListSectionListProps<T> | FlashListSectionListProps<T>,
61-
ref: React.Ref<FlatListComponent | FlashList<any>>
61+
ref: React.Ref<FlatListComponent | typeof FlashList<any>>
6262
) => {
6363
const data = React.useMemo(
6464
() => (Array.isArray(dataProp) ? dataProp : []) as T[],
@@ -210,7 +210,7 @@ const SectionList = React.forwardRef(
210210
case "FlashList":
211211
return (
212212
<FlashList
213-
ref={ref as React.Ref<FlashList<SectionListItem<T>>>}
213+
ref={ref as any}
214214
stickyHeaderIndices={sectionHeaderIndicies}
215215
{...(rest as FlashListProps<SectionListItem<T>>)}
216216
data={dataWithSections}

packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { FlashList } from "@shopify/flash-list";
3-
import type { FlashListProps, ContentStyle } from "@shopify/flash-list";
3+
import type { FlashListProps } from "@shopify/flash-list";
44
import { useFlashListSplitContentContainerStyles } from "./useSplitContentContainerStyles";
55

66
/**
@@ -14,16 +14,16 @@ const SimpleStyleFlashList = React.forwardRef(
1414
data,
1515
...rest
1616
}: Omit<FlashListProps<T>, "contentContainerStyle">,
17-
ref: React.Ref<FlashList<any>>
17+
ref: React.Ref<typeof FlashList<any>>
1818
) => {
1919
const { style, contentContainerStyle } =
2020
useFlashListSplitContentContainerStyles(styleProp);
2121

2222
return (
2323
<FlashList
24-
ref={ref}
25-
style={style}
26-
contentContainerStyle={contentContainerStyle as ContentStyle}
24+
ref={ref as any}
25+
style={style as any}
26+
contentContainerStyle={contentContainerStyle}
2727
data={data}
2828
{...rest}
2929
/>

0 commit comments

Comments
 (0)