Skip to content

Commit a010060

Browse files
committed
chore(publishing): 🔧 fixed linting and testing
1 parent 09952a0 commit a010060

13 files changed

+27
-23
lines changed

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-gifted-chat",
3-
"version": "0.16.3",
3+
"version": "1.0.0-beta-1",
44
"description": "The most complete chat UI for React Native",
55
"main": "node_modules/expo/AppEntry.js",
66
"types": "lib/index.d.ts",
@@ -80,6 +80,7 @@
8080
"babel-jest": "25.5.1",
8181
"babel-preset-expo": "8.3.0",
8282
"expo": "^41.0.0",
83+
"expo-app-loading": "1.0.3",
8384
"expo-constants": "~10.1.3",
8485
"expo-image-picker": "~10.1.4",
8586
"expo-location": "~12.0.4",
@@ -104,7 +105,6 @@
104105
"dependencies": {
105106
"@expo/react-native-action-sheet": "^3.6.0",
106107
"dayjs": "^1.8.26",
107-
"expo-app-loading": "^1.0.3",
108108
"prop-types": "^15.7.2",
109109
"react-native-communications": "^2.2.1",
110110
"react-native-iphone-x-helper": "^1.3.1",

‎src/Bubble.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export default class Bubble<
525525
<TouchableWithoutFeedback
526526
onPress={this.onPress}
527527
onLongPress={this.onLongPress}
528-
accessibilityTraits='text'
528+
accessibilityRole='text'
529529
{...this.props.touchableProps}
530530
>
531531
<View>

‎src/GiftedAvatar.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default class GiftedAvatar extends React.Component<GiftedAvatarProps> {
159159
styles.avatarTransparent,
160160
this.props.avatarStyle,
161161
]}
162-
accessibilityTraits='image'
162+
accessibilityRole='image'
163163
/>
164164
)
165165
}
@@ -169,7 +169,7 @@ export default class GiftedAvatar extends React.Component<GiftedAvatarProps> {
169169
disabled={!this.props.onPress}
170170
onPress={this.props.onPress}
171171
onLongPress={this.props.onLongPress}
172-
accessibilityTraits='image'
172+
accessibilityRole='image'
173173
>
174174
{this.renderAvatar()}
175175
</TouchableOpacity>
@@ -188,7 +188,7 @@ export default class GiftedAvatar extends React.Component<GiftedAvatarProps> {
188188
{ backgroundColor: this.avatarColor },
189189
this.props.avatarStyle,
190190
]}
191-
accessibilityTraits='image'
191+
accessibilityRole='image'
192192
>
193193
{this.renderInitials()}
194194
</TouchableOpacity>

‎src/InputToolbar.tsx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,14 @@ export function InputToolbar<TMessage extends IMessage = IMessage>(
4949
'keyboardWillShow',
5050
() => setPosition('relative'),
5151
)
52-
return () => keyboardWillShowListener?.remove()
53-
}, [])
54-
55-
useEffect(() => {
5652
const keyboardWillHideListener = Keyboard.addListener(
5753
'keyboardWillHide',
5854
() => setPosition('absolute'),
5955
)
60-
return () => keyboardWillHideListener?.remove()
56+
return () => {
57+
keyboardWillShowListener?.remove()
58+
keyboardWillHideListener?.remove()
59+
}
6160
}, [])
6261

6362
const { containerStyle, ...rest } = props

‎src/LoadEarlier.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function LoadEarlier(props: LoadEarlierProps): React.ReactElement {
6363
style={[styles.container, props.containerStyle]}
6464
onPress={onLoadEarlier}
6565
disabled={isLoadingEarlier}
66-
accessibilityTraits='button'
66+
accessibilityRole='button'
6767
>
6868
<View style={[styles.wrapper, props.wrapperStyle]}>
6969
{isLoadingEarlier ? (

‎src/MessageText.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const MessageText = <TMessage extends IMessage = IMessage>({
9595
// When someone sends a message that includes a website address beginning with "www." (omitting the scheme),
9696
// react-native-parsed-text recognizes it as a valid url, but Linking fails to open due to the missing scheme.
9797
if (WWW_URL_PATTERN.test(url)) {
98-
onUrlPress(`http://${url}`)
98+
onUrlPress(`https://${url}`)
9999
} else {
100100
Linking.canOpenURL(url).then(supported => {
101101
if (!supported) {

‎src/Send.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const Send = <TMessage extends IMessage = IMessage>({
7777
accessibilityLabel='send'
7878
style={[styles.container, containerStyle]}
7979
onPress={handleOnPress}
80-
accessibilityTraits='button'
80+
accessibilityRole='button'
8181
disabled={disabled}
8282
{...sendButtonProps}
8383
>

‎src/__tests__/__snapshots__/Bubble.test.tsx.snap‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ exports[`should render <Bubble /> and compare with snapshot 1`] = `
2929
}
3030
>
3131
<View
32+
accessibilityRole="text"
3233
accessible={true}
3334
focusable={true}
3435
onClick={[Function]}

‎src/__tests__/__snapshots__/GiftedAvatar.test.tsx.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`should render <GiftedAvatar /> and compare with snapshot 1`] = `
44
<View
5-
accessibilityTraits="image"
5+
accessibilityRole="image"
66
style={
77
Array [
88
Object {

‎src/__tests__/__snapshots__/LoadEarlier.test.tsx.snap‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`should render <LoadEarlier /> and compare with snapshot 1`] = `
44
<View
5+
accessibilityRole="button"
56
accessible={true}
67
focusable={true}
78
onClick={[Function]}

0 commit comments

Comments
 (0)