-
Notifications
You must be signed in to change notification settings - Fork 2.7k
React Native 0.78 support #8120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gosha212
wants to merge
13
commits into
master
Choose a base branch
from
feat/rn_78
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a88e48e
Added missing feature flags
gosha212 509a0a3
Merge branch 'master' into feat/rn_78
gosha212 69a53f3
Fixes for rn 78
gosha212 a29a092
Fixed unit tests
gosha212 ec3043e
Fixed unit tests
gosha212 07dd969
Fixed unit tests
gosha212 89c6484
Initial comit for RN078 iOS
markdevocht 1f86209
Implemented dynamic pipelines (#8124)
gosha212 539104c
Downgraded reanimated to support both 77 and 78
gosha212 67edbb1
Fixed BW for rn77
gosha212 89b141b
RN 77 Fixes
gosha212 35d0d34
RN 77 Fixes
gosha212 bf445c4
RN 77 Fixes
gosha212 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- label: ":android: Android (RN 0.77.3)" | ||
env: | ||
JAVA_HOME: /opt/openjdk/jdk-17.0.9.jdk/Contents/Home/ | ||
REACT_NATIVE_VERSION: 0.77.3 | ||
command: | ||
- "nvm install" | ||
- "./scripts/ci.android.sh" | ||
key: "android_rn_77" | ||
timeout_in_minutes: 90 | ||
artifact_paths: "/Users/builder/uibuilder/work/artifacts/**/*" | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- label: ":android: Android (RN 0.78.3)" | ||
env: | ||
JAVA_HOME: /opt/openjdk/jdk-17.0.9.jdk/Contents/Home/ | ||
REACT_NATIVE_VERSION: 0.78.3 | ||
command: | ||
- "nvm install" | ||
- "./scripts/ci.android.sh" | ||
key: "android" | ||
timeout_in_minutes: 90 | ||
artifact_paths: "/Users/builder/uibuilder/work/artifacts/**/*" | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- label: ":ios: iOS (RN 0.77.3)" | ||
env: | ||
REACT_NATIVE_VERSION: 0.77.3 | ||
command: | ||
- "nvm install" | ||
- "./scripts/ci.ios.sh" | ||
key: "ios_rn_77" | ||
timeout_in_minutes: 90 | ||
artifact_paths: "/Users/builder/uibuilder/work/artifacts/**/*" | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- label: ":ios: iOS (RN 0.78.3)" | ||
env: | ||
REACT_NATIVE_VERSION: 0.78.3 | ||
command: | ||
- "nvm install" | ||
- "./scripts/ci.ios.sh" | ||
key: "ios" | ||
timeout_in_minutes: 90 | ||
artifact_paths: "/Users/builder/uibuilder/work/artifacts/**/*" | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- wait | ||
- label: ":package: Publish" | ||
env: | ||
JAVA_HOME: /opt/openjdk/jdk-17.0.9.jdk/Contents/Home/ | ||
if: "build.pull_request.id == null" | ||
command: | ||
- "nvm install" | ||
- "npm install" | ||
- "npm run release" | ||
depends_on: | ||
- ios | ||
- android | ||
timeout_in_minutes: 90 | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- block: ":rocket: Release!" | ||
prompt: "Fill out the details for release" | ||
if: 'build.message =~ /^release\$/i' | ||
fields: | ||
- text: "VERSION" | ||
key: "version" | ||
- text: "NPM_TAG" | ||
key: "npm-tag" | ||
default: 'null' | ||
required: false | ||
- text: "BUILD_DOCUMENTATION_VERSION" | ||
key: "build-documentation-version" | ||
default: 'null' | ||
hint: 'Leave NULL if no version is specified' | ||
- text: "REMOVE_DOCUMENTATION_VERSION" | ||
key: "remove-documentation-version" | ||
default: 'null' | ||
hint: 'Leave NULL if no version is specified' | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash -e | ||
|
||
echo "steps:" | ||
|
||
cat .buildkite/jobs/pipeline.release.yml | ||
cat .buildkite/jobs/pipeline.android_rn_77.yml | ||
cat .buildkite/jobs/pipeline.android_rn_78.yml | ||
cat .buildkite/jobs/pipeline.ios_rn_77.yml | ||
cat .buildkite/jobs/pipeline.ios_rn_78.yml | ||
cat .buildkite/jobs/pipeline.publish.yml | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const React = require('react'); | ||
require('react-native'); | ||
const renderer = require('react-test-renderer'); | ||
const { render } = require('@testing-library/react-native'); | ||
const { Navigation } = require('../../lib/src/index'); | ||
|
||
describe('remx support', () => { | ||
|
@@ -13,39 +13,47 @@ describe('remx support', () => { | |
}); | ||
|
||
it('renders normally', () => { | ||
const tree = renderer.create(<MyConnectedComponent />); | ||
const tree2 = renderer.create(<MyConnectedComponent />); | ||
expect(tree.toJSON().children).toEqual(['no name']); | ||
const { getByText } = render(<MyConnectedComponent />); | ||
const { getByText: getByText2 } = render(<MyConnectedComponent />); | ||
expect(getByText('no name')).toBeTruthy(); | ||
expect(getByText2('no name')).toBeTruthy(); | ||
}); | ||
|
||
it('rerenders as a result of an underlying state change (by selector)', () => { | ||
const renderCountIncrement = jest.fn(); | ||
const tree = renderer.create( | ||
const { getByText, rerender } = render( | ||
<MyConnectedComponent renderCountIncrement={renderCountIncrement} /> | ||
); | ||
|
||
expect(tree.toJSON().children).toEqual(['no name']); | ||
expect(getByText('no name')).toBeTruthy(); | ||
expect(renderCountIncrement).toHaveBeenCalledTimes(1); | ||
|
||
store.setters.setName('Bob'); | ||
expect(store.getters.getName()).toEqual('Bob'); | ||
expect(tree.toJSON().children).toEqual(['Bob']); | ||
|
||
// Re-render to get updated content | ||
rerender(<MyConnectedComponent renderCountIncrement={renderCountIncrement} />); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revisit whether actually necessary |
||
expect(getByText('Bob')).toBeTruthy(); | ||
|
||
expect(renderCountIncrement).toHaveBeenCalledTimes(2); | ||
}); | ||
|
||
it('rerenders as a result of an underlying state change with a new key', () => { | ||
const renderCountIncrement = jest.fn(); | ||
const tree = renderer.create( | ||
const { queryByText, rerender } = render( | ||
<MyConnectedComponent printAge={true} renderCountIncrement={renderCountIncrement} /> | ||
); | ||
|
||
expect(tree.toJSON().children).toEqual(null); | ||
// Initially should show nothing (null children means no text) | ||
expect(queryByText('30')).toBeNull(); | ||
expect(renderCountIncrement).toHaveBeenCalledTimes(1); | ||
|
||
store.setters.setAge(30); | ||
expect(store.getters.getAge()).toEqual(30); | ||
expect(tree.toJSON().children).toEqual(['30']); | ||
|
||
// Re-render to get updated content | ||
rerender(<MyConnectedComponent printAge={true} renderCountIncrement={renderCountIncrement} />); | ||
expect(queryByText('30')).toBeTruthy(); | ||
|
||
expect(renderCountIncrement).toHaveBeenCalledTimes(2); | ||
}); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revisit whether this is indeed necessary