Skip to content

Commit

Permalink
chore: React Native 0.76 support (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski authored Oct 18, 2024
1 parent 19da22c commit 0e85550
Show file tree
Hide file tree
Showing 8 changed files with 1,479 additions and 2,392 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
flow-typed/
build/
experiments-rtl/
website/

jest-setup.ts
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@callstack",
"rules": {
"flowtype/no-weak-types": 0,
"react-native/no-raw-text": 0,
"no-console": 1,
"react/no-multi-comp": 0,
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Our pre-commit hooks verify that your commit message matches this format when co

### Linting and tests

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:
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:

- `yarn flow`: run flow on all files.
- `yarn typecheck`: run TypeScript compiler on all files.
- `yarn lint`: run eslint and prettier.
- `yarn test`: run tests.

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

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

Expand Down
3 changes: 1 addition & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ module.exports = {
],
env: {
test: {
// https://github.com/react-native-community/upgrade-support/issues/152
plugins: ['@babel/plugin-transform-flow-strip-types'],
presets: ['@react-native/babel-preset'],
},
},
};
2 changes: 0 additions & 2 deletions jest-setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { resetToDefaults } from './src/pure';

jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

beforeEach(() => {
resetToDefaults();
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"jest": "^29.7.0",
"prettier": "^2.8.8",
"react": "18.3.1",
"react-native": "0.75.1",
"react-native": "0.76.0-rc.6",
"react-test-renderer": "18.3.1",
"release-it": "^17.6.0",
"strip-ansi": "^6.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/__snapshots__/render-debug.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ exports[`debug: shallow 1`] = `
value=""
/>
<MyButton
onPress={[Function changeFresh]}
onPress={[Function anonymous]}
>
Change freshness!
</MyButton>
Expand Down Expand Up @@ -447,7 +447,7 @@ exports[`debug: shallow with message 1`] = `
value=""
/>
<MyButton
onPress={[Function changeFresh]}
onPress={[Function anonymous]}
>
Change freshness!
</MyButton>
Expand Down
3,850 changes: 1,469 additions & 2,381 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 0e85550

Please sign in to comment.