Skip to content

Commit bed2819

Browse files
committed
chore: update to RN 0.77 nightly
chore: fix host-component-names chore: update deps chore: fix lint
1 parent f2de20c commit bed2819

File tree

4 files changed

+670
-287
lines changed

4 files changed

+670
-287
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@babel/preset-react": "^7.25.9",
7373
"@babel/preset-typescript": "^7.26.0",
7474
"@callstack/eslint-config": "^15.0.0",
75-
"@react-native/babel-preset": "^0.76.1",
75+
"@react-native/babel-preset": "0.77.0-nightly-20241105-fe656be26",
7676
"@release-it/conventional-changelog": "^9.0.2",
7777
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
7878
"@types/jest": "^29.5.14",
@@ -82,13 +82,14 @@
8282
"babel-plugin-module-resolver": "^5.0.2",
8383
"del-cli": "^6.0.0",
8484
"eslint": "^8.57.1",
85+
"eslint-plugin-flowtype": "^8.0.3",
8586
"eslint-plugin-prettier": "^4.2.1",
8687
"flow-bin": "~0.170.0",
8788
"jest": "^29.7.0",
8889
"prettier": "^2.8.8",
89-
"react": "18.3.1",
90-
"react-native": "0.76.1",
91-
"react-test-renderer": "18.3.1",
90+
"react": "19.0.0-rc-fb9a90fa48-20240614",
91+
"react-native": "0.77.0-nightly-20241105-fe656be26",
92+
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
9293
"release-it": "^17.10.0",
9394
"strip-ansi": "^6.0.1",
9495
"typescript": "^5.6.3"

src/__tests__/host-component-names.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Image, Modal, ScrollView, Switch, Text, TextInput } from 'react-native';
3+
import { render, screen } from '..';
34
import {
45
isHostImage,
56
isHostModal,
@@ -8,7 +9,6 @@ import {
89
isHostText,
910
isHostTextInput,
1011
} from '../helpers/host-component-names';
11-
import { render, screen } from '..';
1212

1313
test('detects host Text component', () => {
1414
render(<Text>Hello</Text>);

src/__tests__/react-native-animated.tsx renamed to src/__tests__/react-native-animated.test.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ describe('AnimatedView', () => {
4141
jest.useRealTimers();
4242
});
4343

44-
it('should use native driver when useNativeDriver is true', async () => {
44+
it('works when useNativeDriver is false', async () => {
4545
render(
46-
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
46+
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
4747
Test
4848
</AnimatedView>,
4949
);
@@ -53,15 +53,16 @@ describe('AnimatedView', () => {
5353
expect(screen.root).toHaveStyle({ opacity: 1 });
5454
});
5555

56-
it('should not use native driver when useNativeDriver is false', async () => {
56+
it('does not crash when useNativeDriver is true', async () => {
5757
render(
58-
<AnimatedView fadeInDuration={250} useNativeDriver={false}>
58+
<AnimatedView fadeInDuration={250} useNativeDriver={true}>
5959
Test
6060
</AnimatedView>,
6161
);
6262
expect(screen.root).toHaveStyle({ opacity: 0 });
6363

6464
await act(() => jest.advanceTimersByTime(250));
65-
expect(screen.root).toHaveStyle({ opacity: 1 });
65+
// Native driver does not work in Jest tests
66+
// expect(screen.root).toHaveStyle({ opacity: 1 });
6667
});
6768
});

0 commit comments

Comments
 (0)