Skip to content

Commit 93a095c

Browse files
committed
chore: update package dependencies
1 parent 9c0a3f5 commit 93a095c

File tree

36 files changed

+423
-312
lines changed

36 files changed

+423
-312
lines changed

.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"trailingComma": "all",
99
"bracketSpacing": true,
1010
"arrowParens": "always",
11+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
1112
"importOrder": ["<THIRD_PARTY_MODULES>", "@sendbird[./]?", "^[./]"],
1213
"importOrderSeparation": true,
1314
"importOrderSortSpecifiers": true,

docs-validation/3_core-components/Provider/PlatformServiceProvider.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { MediaServiceInterface } from '@sendbird/uikit-react-native';
2+
import type { ReactNode } from 'react';
23

34
const isMediaFile = (_: string) => 0;
45
const MyDocumentPickerModule = {
@@ -34,7 +35,7 @@ async function fileServiceInterface(service: FileServiceInterface) {
3435
* {@link }
3536
* */
3637
async function mediaServiceInterface(service: MediaServiceInterface) {
37-
const jsx: JSX.Element = service.VideoComponent({
38+
const jsx: ReactNode = service.VideoComponent({
3839
source: 0 as number | { uri: string },
3940
resizeMode: '' as 'cover' | 'stretch' | 'contain' | undefined,
4041
onLoad: () => 0,

docs-validation/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131
"@babel/runtime": "^7.12.5",
3232
"@react-native-community/eslint-config": "^2.0.0",
3333
"@types/jest": "^26.0.23",
34-
"@types/react": "^18.0.15",
34+
"@types/react": "*",
3535
"@types/react-native": "*",
36-
"@types/react-test-renderer": "^17.0.1",
3736
"@typescript-eslint/eslint-plugin": "^5.7.0",
3837
"@typescript-eslint/parser": "^5.7.0",
3938
"babel-jest": "^26.6.3",
@@ -44,6 +43,6 @@
4443
"react-dom": "17.0.2",
4544
"react-native-monorepo-tools": "^1.1.4",
4645
"react-test-renderer": "17.0.2",
47-
"typescript": "4.9.4"
46+
"typescript": "5.2.2"
4847
}
4948
}

package.json

+11-9
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,31 @@
3939
},
4040
"devDependencies": {
4141
"@testing-library/react-native": "11",
42-
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
42+
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
4343
"@types/jest": "^29.4.0",
44-
"@typescript-eslint/eslint-plugin": "^5.9.1",
45-
"@typescript-eslint/parser": "^5.9.1",
44+
"@typescript-eslint/eslint-plugin": "^6.9.1",
45+
"@typescript-eslint/parser": "^6.9.1",
4646
"babel-jest": "^29.4.3",
4747
"chalk": "^4",
4848
"concurrently": "^8.0.1",
4949
"conventional-changelog-conventionalcommits": "^5.0.0",
5050
"del-cli": "^4.0.1",
51-
"eslint": "^8.6.0",
52-
"eslint-config-prettier": "^8.5.0",
51+
"eslint": "^8.52.0",
52+
"eslint-config-prettier": "^9.0.0",
5353
"jest": "^29.4.3",
5454
"lerna": "^5.1.6",
5555
"node-fetch": "2.x",
5656
"patch-package": "^6.4.7",
5757
"postinstall-postinstall": "^2.1.0",
58-
"prettier": "^2.7.1",
58+
"prettier": "^2.8.8",
5959
"react": "17.0.2",
6060
"react-native": "0.67.5",
6161
"react-native-builder-bob": "^0.18.2",
6262
"react-native-fast-image": "^8.5.11",
6363
"react-native-safe-area-context": "^3.3.2",
6464
"react-test-renderer": "^17.0.2",
65-
"typedoc": "^0.23.7",
66-
"typescript": "4.9.4"
65+
"typedoc": "^0.25.3",
66+
"typescript": "5.2.2"
6767
},
6868
"jest": {
6969
"preset": "react-native",
@@ -96,6 +96,8 @@
9696
]
9797
},
9898
"resolutions": {
99-
"@sendbird/chat": "4.9.8"
99+
"@sendbird/chat": "4.9.8",
100+
"@types/react": "^18",
101+
"@types/react-native": "^0.67"
100102
}
101103
}

packages/uikit-chat-hooks/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@types/react": "*",
5252
"react": "17.0.2",
5353
"react-native-builder-bob": "^0.18.0",
54-
"typescript": "4.9.4"
54+
"typescript": "5.2.2"
5555
},
5656
"peerDependencies": {
5757
"@sendbird/chat": "^4.9.8",

packages/uikit-react-native-foundation/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"react-native-builder-bob": "^0.18.0",
5858
"react-native-fast-image": "^8.5.11",
5959
"react-native-safe-area-context": "^3.3.2",
60-
"typescript": "4.9.4"
60+
"typescript": "5.2.2"
6161
},
6262
"peerDependencies": {
6363
"react": ">=17.0.2",

packages/uikit-react-native-foundation/src/components/Icon/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import { Image, ImageStyle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33

44
import { FileType, convertFileTypeToMessageType, getFileIconFromMessageType } from '@sendbird/uikit-utils';
@@ -17,7 +17,7 @@ type Props = {
1717
style?: StyleProp<ImageStyle>;
1818
containerStyle?: StyleProp<ViewStyle>;
1919
};
20-
const Icon: ((props: Props) => JSX.Element) & {
20+
const Icon: ((props: Props) => ReactNode) & {
2121
Assets: typeof IconAssets;
2222
File: typeof FileIcon;
2323
} = ({ icon, color, size = 24, containerStyle, style }) => {
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import type { ReactNode } from 'react';
12
import type { FastImageProps } from 'react-native-fast-image';
23

3-
let FastImageInternal: (props: FastImageProps) => JSX.Element | null = () => null;
4+
let FastImageInternal: (props: FastImageProps) => ReactNode | null = () => null;
45

56
try {
6-
FastImageInternal = require('react-native-fast-image') as (props: FastImageProps) => JSX.Element;
7+
FastImageInternal = require('react-native-fast-image') as (props: FastImageProps) => ReactNode;
78
} catch {}
89

910
export default FastImageInternal;

packages/uikit-react-native-foundation/src/components/Image/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ReactNode } from 'react';
12
import type { ImageProps as NativeImageProps } from 'react-native';
23
import { NativeModules } from 'react-native';
34

@@ -7,7 +8,7 @@ export interface SendbirdImageProps extends Omit<NativeImageProps, 'onLoad' | 'o
78
tintColor?: string;
89
}
910

10-
export type SendbirdImageComponent = (props: SendbirdImageProps) => JSX.Element;
11+
export type SendbirdImageComponent = (props: SendbirdImageProps) => ReactNode;
1112

1213
function getImageModule(): SendbirdImageComponent {
1314
const hasFastImage = Boolean(NativeModules.FastImageView);

packages/uikit-react-native-foundation/src/components/RegexText/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22

33
import { replaceWithRegex } from '@sendbird/uikit-utils';
44

@@ -12,15 +12,15 @@ export interface RegexTextPattern {
1212
index: number;
1313
keyPrefix: string;
1414
parentProps?: TextProps;
15-
}): string | JSX.Element;
15+
}): string | ReactNode;
1616
}
1717

1818
type Props = { patterns: RegexTextPattern[] } & TextProps;
1919

2020
const RegexText = ({ children, patterns, ...props }: Props) => {
2121
if (patterns.length === 0 || typeof children !== 'string') return <>{children}</>;
2222

23-
const matchedTexts: Array<string | JSX.Element> = [children];
23+
const matchedTexts: Array<string | ReactNode> = [children];
2424

2525
patterns.forEach(({ regex, replacer }, patterIndex) => {
2626
const matchedTextsTemp = matchedTexts.concat();

packages/uikit-react-native-foundation/src/styles/HeaderStyleContext.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { HeaderProps } from '../ui/Header';
66
import getDefaultHeaderHeight from './getDefaultHeaderHeight';
77

88
export type HeaderStyleContextType = {
9-
HeaderComponent: (props: HeaderProps) => React.ReactElement | null;
9+
HeaderComponent: (props: HeaderProps) => React.ReactNode | null;
1010
defaultTitleAlign: 'left' | 'center';
1111
statusBarTranslucent: boolean;
1212
topInset: number;

packages/uikit-react-native-foundation/src/types.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import type { ReactElement, ReactNode } from 'react';
2+
import type { ReactNode } from 'react';
33
import type { TextStyle } from 'react-native';
44

55
export interface UIKitTypography {
@@ -178,11 +178,11 @@ export interface UIKitColors {
178178
};
179179
}
180180

181-
export type HeaderElement = string | ReactElement | null;
181+
export type HeaderElement = ReactNode;
182182
export type HeaderPartProps = {
183-
title?: HeaderElement;
184-
right?: HeaderElement;
185-
left?: HeaderElement;
183+
title?: ReactNode;
184+
right?: ReactNode;
185+
left?: ReactNode;
186186
onPressLeft?: (...params: any[]) => any;
187187
onPressRight?: (...params: any[]) => any;
188188
};

packages/uikit-react-native-foundation/src/ui/Avatar/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { ReactNode, useState } from 'react';
22
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33

44
import { conditionChaining } from '@sendbird/uikit-utils';
@@ -21,7 +21,7 @@ type Props = {
2121
muted?: boolean;
2222
containerStyle?: StyleProp<ViewStyle>;
2323
};
24-
const Avatar: ((props: Props) => JSX.Element) & SubComponents = ({
24+
const Avatar: ((props: Props) => ReactNode) & SubComponents = ({
2525
uri,
2626
square,
2727
muted = false,

packages/uikit-react-native-foundation/src/ui/BottomSheet/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import { TouchableOpacity, useWindowDimensions } from 'react-native';
33
import { useSafeAreaInsets } from 'react-native-safe-area-context';
44

@@ -17,7 +17,7 @@ export type BottomSheetItem = {
1717
disabled?: boolean;
1818
onPress: () => void;
1919
}[];
20-
HeaderComponent?: (props: HeaderProps) => JSX.Element;
20+
HeaderComponent?: (props: HeaderProps) => ReactNode;
2121
};
2222
type Props = {
2323
visible: boolean;

packages/uikit-react-native-foundation/src/ui/Dialog/DialogSheet.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import { StyleProp, View, ViewStyle } from 'react-native';
33

44
import Icon from '../../components/Icon';
@@ -9,7 +9,7 @@ import useUIKitTheme from '../../theme/useUIKitTheme';
99
type Props = React.PropsWithChildren<{
1010
style?: StyleProp<ViewStyle>;
1111
}>;
12-
const DialogSheet: ((props: Props) => JSX.Element) & { Item: typeof SheetItem } = ({ style, children }) => {
12+
const DialogSheet: ((props: Props) => ReactNode) & { Item: typeof SheetItem } = ({ style, children }) => {
1313
const { colors } = useUIKitTheme();
1414
return (
1515
<View style={[styles.container, { backgroundColor: colors.ui.dialog.default.none.background }, style]}>

packages/uikit-react-native-foundation/src/ui/GroupChannelPreview/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import useUIKitTheme from '../../theme/useUIKitTheme';
1111
import Badge from '../Badge';
1212

1313
type Props = {
14-
customCover?: React.ReactElement;
14+
customCover?: React.ReactNode;
1515
coverUrl: string;
1616

1717
title: string;
1818

1919
titleCaption: string;
20-
titleCaptionLeft?: React.ReactElement;
20+
titleCaptionLeft?: React.ReactNode;
2121

2222
bodyIcon?: keyof typeof Icon.Assets;
2323
body: string;

packages/uikit-react-native-foundation/src/ui/Header/index.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import { TouchableOpacity, TouchableOpacityProps, View } from 'react-native';
33
import { useSafeAreaInsets } from 'react-native-safe-area-context';
44

55
import { conditionChaining } from '@sendbird/uikit-utils';
66

77
import Text, { TextProps } from '../../components/Text';
8-
import type { BaseHeaderProps } from '../../index';
8+
import type { BaseHeaderProps, HeaderElement } from '../../index';
99
import createStyleSheet from '../../styles/createStyleSheet';
1010
import useHeaderStyle from '../../styles/useHeaderStyle';
1111
import useUIKitTheme from '../../theme/useUIKitTheme';
1212

13-
type HeaderElement = string | React.ReactElement | null;
1413
export type HeaderProps = BaseHeaderProps<
1514
{
1615
title?: HeaderElement;
@@ -27,7 +26,7 @@ export type HeaderProps = BaseHeaderProps<
2726
>;
2827

2928
const AlignMapper = { left: 'flex-start', center: 'center', right: 'flex-end' } as const;
30-
const Header: ((props: HeaderProps) => JSX.Element) & {
29+
const Header: ((props: HeaderProps) => ReactNode) & {
3130
Button: typeof HeaderButton;
3231
Title: typeof HeaderTitle;
3332
Subtitle: typeof HeaderSubtitle;

packages/uikit-react-native-foundation/src/ui/OpenChannelMessage/MessageContainer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const MessageContainer = ({
101101
);
102102
};
103103

104-
const SendingStatusContainer = ({ children }: { children: React.ReactElement }) => {
104+
const SendingStatusContainer = ({ children }: { children: React.ReactNode }) => {
105105
return (
106106
<Box flexDirection={'row'}>
107107
<Box marginTop={2}>{children}</Box>

packages/uikit-react-native-foundation/src/ui/OpenChannelPreview/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import createStyleSheet from '../../styles/createStyleSheet';
1010
import useUIKitTheme from '../../theme/useUIKitTheme';
1111

1212
type Props = {
13-
customCover?: React.ReactElement;
13+
customCover?: React.ReactNode;
1414
coverUrl: string;
1515
title: string;
1616
participantsCount?: number;

packages/uikit-react-native-foundation/src/ui/ProfileCard/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import { StyleProp, View, ViewStyle } from 'react-native';
33

44
import Divider from '../../components/Divider';
@@ -11,7 +11,7 @@ type Props = {
1111
uri: string;
1212
username: string;
1313

14-
button?: JSX.Element;
14+
button?: ReactNode;
1515

1616
bodyLabel: string;
1717
body: string;

packages/uikit-react-native/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"react-native-permissions": "^3.6.0",
9898
"react-native-safe-area-context": "^3.3.2",
9999
"react-native-video": "^5.2.0",
100-
"typescript": "4.9.4"
100+
"typescript": "5.2.2"
101101
},
102102
"peerDependencies": {
103103
"@bam.tech/react-native-image-resizer": ">=3.0.0",

packages/uikit-react-native/src/components/ChannelInput/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { MutableRefObject, useEffect, useState } from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { KeyboardAvoidingView, Platform, TextInput, View } from 'react-native';
33
import { useSafeAreaInsets } from 'react-native-safe-area-context';
44

@@ -61,10 +61,10 @@ export type ChannelInputProps = {
6161
setMessageToReply?: (message?: undefined | SendbirdUserMessage | SendbirdFileMessage) => void;
6262

6363
// mention
64-
SuggestedMentionList?: (props: SuggestedMentionListProps) => JSX.Element | null;
64+
SuggestedMentionList?: (props: SuggestedMentionListProps) => React.ReactNode | null;
6565

6666
// sub-components
67-
AttachmentsButton?: (props: AttachmentsButtonProps) => JSX.Element | null;
67+
AttachmentsButton?: (props: AttachmentsButtonProps) => React.ReactNode | null;
6868
};
6969

7070
const AUTO_FOCUS = Platform.select({ ios: false, android: true, default: false });
@@ -181,7 +181,7 @@ const useTextClearOnDisabled = (setText: (val: string) => void, chatDisabled: bo
181181
};
182182

183183
const useAutoFocusOnEditMode = (
184-
textInputRef: MutableRefObject<TextInput | undefined>,
184+
textInputRef: React.MutableRefObject<TextInput | undefined>,
185185
messageToEdit?: SendbirdBaseMessage,
186186
) => {
187187
useEffect(() => {

packages/uikit-react-native/src/components/StatusComposition.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22

33
type Props = {
44
loading?: boolean;
5-
LoadingComponent?: JSX.Element;
5+
LoadingComponent?: ReactNode;
66
error?: boolean;
7-
ErrorComponent?: JSX.Element;
7+
ErrorComponent?: ReactNode;
88
children: React.ReactNode;
99
};
1010
const StatusComposition = ({ children, error, ErrorComponent, LoadingComponent, loading }: Props) => {

packages/uikit-react-native/src/containers/InternalErrorBoundaryContainer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const DefaultErrorBoundaryComponent = (props: ErrorBoundaryProps) => {
1414

1515
class InternalErrorBoundaryContainer extends React.PureComponent<{
1616
onError?: (props: ErrorBoundaryProps) => void;
17-
ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
17+
ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;
1818
children?: React.ReactNode;
1919
}> {
2020
static defaultProps = {

packages/uikit-react-native/src/containers/SendbirdUIKitContainer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export type SendbirdUIKitContainerProps = React.PropsWithChildren<{
9898
errorBoundary?: {
9999
disabled?: boolean;
100100
onError?: (props: ErrorBoundaryProps) => void;
101-
ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
101+
ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;
102102
};
103103
toast?: {
104104
dismissTimeout?: number;

0 commit comments

Comments
 (0)