Skip to content

Commit 0e85550

Browse files
chore: React Native 0.76 support (#1664)
1 parent 19da22c commit 0e85550

8 files changed

+1479
-2392
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
flow-typed/
22
build/
33
experiments-rtl/
4+
website/
5+
6+
jest-setup.ts

.eslintrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"extends": "@callstack",
33
"rules": {
4-
"flowtype/no-weak-types": 0,
54
"react-native/no-raw-text": 0,
65
"no-console": 1,
76
"react/no-multi-comp": 0,

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Our pre-commit hooks verify that your commit message matches this format when co
3232

3333
### Linting and tests
3434

35-
We use `flow` for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that the linter and tests pass when committing. You can also run the following commands manually:
35+
We use TypeScript for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that the linter and tests pass when committing. You can also run the following commands manually:
3636

37-
- `yarn flow`: run flow on all files.
37+
- `yarn typecheck`: run TypeScript compiler on all files.
3838
- `yarn lint`: run eslint and prettier.
3939
- `yarn test`: run tests.
4040

@@ -43,7 +43,7 @@ We use `flow` for type checking, `eslint` with `prettier` for linting and format
4343
When you're sending a pull request:
4444

4545
- Prefer small pull requests focused on one change.
46-
- Verify that `flow`, `eslint` and tests are passing.
46+
- Verify that `typecheck`, `eslint` and tests are passing.
4747
- Preview the documentation to make sure it looks good.
4848
- Follow the pull request template when opening a pull request.
4949

babel.config.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ module.exports = {
1414
],
1515
env: {
1616
test: {
17-
// https://github.com/react-native-community/upgrade-support/issues/152
18-
plugins: ['@babel/plugin-transform-flow-strip-types'],
17+
presets: ['@react-native/babel-preset'],
1918
},
2019
},
2120
};

jest-setup.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { resetToDefaults } from './src/pure';
22

3-
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
4-
53
beforeEach(() => {
64
resetToDefaults();
75
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"jest": "^29.7.0",
8585
"prettier": "^2.8.8",
8686
"react": "18.3.1",
87-
"react-native": "0.75.1",
87+
"react-native": "0.76.0-rc.6",
8888
"react-test-renderer": "18.3.1",
8989
"release-it": "^17.6.0",
9090
"strip-ansi": "^6.0.1",

src/__tests__/__snapshots__/render-debug.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ exports[`debug: shallow 1`] = `
396396
value=""
397397
/>
398398
<MyButton
399-
onPress={[Function changeFresh]}
399+
onPress={[Function anonymous]}
400400
>
401401
Change freshness!
402402
</MyButton>
@@ -447,7 +447,7 @@ exports[`debug: shallow with message 1`] = `
447447
value=""
448448
/>
449449
<MyButton
450-
onPress={[Function changeFresh]}
450+
onPress={[Function anonymous]}
451451
>
452452
Change freshness!
453453
</MyButton>

yarn.lock

+1,469-2,381
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)