Skip to content

Commit

Permalink
Merge branch 'main' into text-onPress-does-not-trigger-accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed Aug 30, 2022
2 parents 59d63e5 + 621f4cf commit 93d3bc0
Show file tree
Hide file tree
Showing 609 changed files with 23,146 additions and 5,606 deletions.
227 changes: 101 additions & 126 deletions .circleci/config.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
bots/node_modules
docs/generatedComponentApiDocs.js
flow/
flow-typed/
Libraries/Renderer/*
Libraries/vendor/**/*
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
module.exports = {
root: true,

extends: ['./packages/eslint-config-react-native-community/index.js'],
extends: ['@react-native-community'],

plugins: ['@react-native/eslint-plugin-specs'],

Expand Down
4 changes: 2 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.env_mode=resolved
inference_mode=constrain_writes

[lints]
sketchy-null-number=warn
Expand All @@ -74,4 +74,4 @@ untyped-import
untyped-type-import

[version]
^0.183.0
^0.185.1
4 changes: 2 additions & 2 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.env_mode=resolved
inference_mode=constrain_writes

[lints]
sketchy-null-number=warn
Expand All @@ -74,4 +74,4 @@ untyped-import
untyped-type-import

[version]
^0.183.0
^0.185.1
19 changes: 19 additions & 0 deletions .github/workflows/autorebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 14 additions & 6 deletions .github/workflows/danger_pr.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
name: Run Danger on PR

on:
pull_request:
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
contents: read
actions: write
checks: write
contents: write
issues: write
pull-requests: write
statuses: write

jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: yarn install
- name: Run Yarn Install on Root
run: yarn install
working-directory: .
- name: Run Yarn Install inside Bots
run: yarn install
working-directory: bots
- name: Danger
run: DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks --failOnErrors --id danger_pr
run: yarn danger ci --use-github-checks --failOnErrors
working-directory: bots
env:
PUBLIC_PULLBOT_GITHUB_TOKEN_A: a6edf8e8d40ce4e8b11a
PUBLIC_PULLBOT_GITHUB_TOKEN_B: 150e1341f4dd9c944d2a
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ rn_xplat_cxx_library2(
":RCTCxxUtils",
":ReactInternal",
"//fbobjc/Libraries/FBReactKit:RCTFBSystrace",
"//xplat/folly:molly",
react_native_root_target("React/CoreModules:CoreModules"),
react_native_xplat_target("cxxreact:bridge"),
react_native_xplat_target("cxxreact:jsbigstring"),
Expand Down Expand Up @@ -164,7 +163,6 @@ rn_xplat_cxx_library2(
":RCTCxxUtils",
":ReactInternal",
"//xplat/fbsystrace:fbsystrace",
"//xplat/folly:headers_only_do_not_use",
react_native_xplat_target("cxxreact:module"),
react_native_xplat_target("cxxreact:bridge"),
react_native_xplat_target("reactperflogger:reactperflogger"),
Expand Down Expand Up @@ -201,7 +199,7 @@ rn_xplat_cxx_library2(
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode(),
visibility = ["PUBLIC"],
deps = [
"//xplat/folly:molly",
"//xplat/folly:dynamic",
],
)

Expand Down Expand Up @@ -257,6 +255,7 @@ REACT_PUBLIC_HEADERS = {
"React/RCTBridgeMethod.h": RCTBASE_PATH + "RCTBridgeMethod.h",
"React/RCTBridgeModule.h": RCTBASE_PATH + "RCTBridgeModule.h",
"React/RCTBridgeModuleDecorator.h": RCTBASE_PATH + "RCTBridgeModuleDecorator.h",
"React/RCTBundleManager.h": RCTBASE_PATH + "RCTBundleManager.h",
"React/RCTBundleURLProvider.h": RCTBASE_PATH + "RCTBundleURLProvider.h",
"React/RCTComponent.h": RCTVIEWS_PATH + "RCTComponent.h",
"React/RCTComponentData.h": RCTVIEWS_PATH + "RCTComponentData.h",
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## v0.69.5

### Changed

- Bump react-native-codegen to 0.69.2 ([df3d52bfbf](https://github.com/facebook/react-native/commit/df3d52bfbf4254cd16e1dc0ca0af2743cd7e11c1) by [@dmitryrykun](https://github.com/dmitryrykun))

#### Android specific

- Replaced reactnativeutilsjni with reactnativejni in the build process to reduce size ([54a4fcbfdc](https://github.com/facebook/react-native/commit/54a4fcbfdcc8111b3010b2c31ed3c1d48632ce4c) by [@SparshaSaha](https://github.com/SparshaSaha))

### Fixed

- Codegen should ignore `.d.ts` files ([0f0d52067c](https://github.com/facebook/react-native/commit/0f0d52067cb89fdb39a99021f0745282ce087fc2) by [@tido64](https://github.com/tido64))

## v0.69.4

### Changed

- Upgrade RN CLI to v8.0.4 ([66c68c37ce](https://github.com/facebook/react-native/commit/66c68c37ce94f6c1160e7f260c0d1887539c6605) by [@thymikee](https://github.com/thymikee))

#### Android specific

- Modified **getDefaultJSExecutorFactory** method ([87cfd386cb](https://github.com/facebook/react-native/commit/87cfd386cb2e02bfa440c94706d9d0274f83070c) by [@KunalFarmah98](https://github.com/KunalFarmah98))

## v0.69.3

### Fixed

#### iOS specific

- Fix React-bridging header not found for third party modules ([fa2acc32d1](https://github.com/facebook/react-native/commit/fa2acc32d1490f6e418689dec321f8bd4ef7bb28) by [@Kudo](https://github.com/Kudo))

## v0.69.2

### Changed
Expand Down Expand Up @@ -242,6 +274,22 @@

- Encode URL params in URLSearchParams.toString() ([1042a8012f](https://github.com/facebook/react-native/commit/1042a8012fb472bd5c882b469fe507dd6279d562) by [@sshic](https://github.com/sshic))

## v0.68.3

### Changed

#### Android specific

- Let's not build reactnativeutilsjni shared library ([af9225ec5f](https://github.com/facebook/react-native/commit/af9225ec5fd22da802e3da4d786fa7f6ec956b0f) by [@SparshaSaha](https://github.com/SparshaSaha))
- Modified **getDefaultJSExecutorFactory** method ([87cfd386cb](https://github.com/facebook/react-native/commit/87cfd386cb2e02bfa440c94706d9d0274f83070c) by [@KunalFarmah98](https://github.com/KunalFarmah98))

### Fixed

- Use monotonic clock for performance.now() ([114d31feee](https://github.com/facebook/react-native/commit/114d31feeeb47f5a57419e5088c3cbe9340f757a))

#### Android specific

- Logging a soft error when ReactRootView has an id other than -1 instead of crashing the app in hybrid apps ([1ca2c24930](https://github.com/facebook/react-native/commit/1ca2c2493027c1b027146cd41e17dd8a4fc33a41) by [@Kunal-Airtel2022](https://github.com/Kunal-Airtel2022))

## v0.68.2

Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/AccessibilityManagerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as React from 'react';
const {TestModule} = NativeModules;

class AccessibilityManagerTest extends React.Component<{...}> {
componentDidMount() {
componentDidMount(): void {
invariant(
NativeAccessibilityManager,
"NativeAccessibilityManager doesn't exist",
Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/AppEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class AppEventsTest extends React.Component<{...}, State> {
NativeAppEventEmitter.addListener('testEvent', this.receiveEvent);
const event = {data: TEST_PAYLOAD, ts: Date.now()};
TestModule.sendAppEvent('testEvent', event);
// eslint-disable-next-line react/no-did-mount-set-state
this.setState({sent: event});
}

Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/GlobalEvalWithSourceUrlTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

class GlobalEvalWithSourceUrlTest extends React.Component<{...}> {
componentDidMount() {
componentDidMount(): void {
if (typeof global.globalEvalWithSourceUrl !== 'function') {
throw new Error(
'Expected to find globalEvalWithSourceUrl function on global object but found ' +
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/ImageSnapshotTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {Image} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

class ImageSnapshotTest extends React.Component<{...}> {
componentDidMount() {
componentDidMount(): void {
if (!TestModule.verifySnapshot) {
throw new Error('TestModule.verifySnapshot not defined.');
}
Expand Down
4 changes: 2 additions & 2 deletions IntegrationTests/IntegrationTestsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ require('./LoggingTestModule');
type Test = any;

class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
state = {
state: {test: ?Test} = {
test: (null: ?Test),
};

render() {
render(): React.Node {
if (this.state.test) {
return (
<ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/SimpleSnapshotTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {StyleSheet, View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

class SimpleSnapshotTest extends React.Component<{...}> {
componentDidMount() {
componentDidMount(): void {
if (!TestModule.verifySnapshot) {
throw new Error('TestModule.verifySnapshot not defined.');
}
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/SyncMethodTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {View} = ReactNative;
const {TestModule, RNTesterTestModule} = ReactNative.NativeModules;

class SyncMethodTest extends React.Component<{...}> {
componentDidMount() {
componentDidMount(): void {
if (
RNTesterTestModule.echoString('test string value') !== 'test string value'
) {
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/TimersTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class TimersTest extends React.Component<Props, State> {
);
}

_incrementInterval() {
_incrementInterval(): void {
if (this.state.count > 3) {
throw new Error('interval incremented past end.');
}
Expand Down
6 changes: 3 additions & 3 deletions IntegrationTests/WebSocketTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class WebSocketTest extends React.Component<{...}, State> {
});
};

_socketIsConnected = () => {
_socketIsConnected = (): boolean => {
return this.state.socketState === 1; //'OPEN'
};

_socketIsDisconnected = () => {
_socketIsDisconnected = (): boolean => {
return this.state.socketState === 3; //'CLOSED'
};

Expand Down Expand Up @@ -106,7 +106,7 @@ class WebSocketTest extends React.Component<{...}, State> {
this._sendText(this.state.testMessage);
};

_receivedTestExpectedResponse = () => {
_receivedTestExpectedResponse = (): boolean => {
return this.state.lastMessage === this.state.testExpectedResponse;
};

Expand Down
3 changes: 2 additions & 1 deletion Libraries/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class Alert {
cancelButtonKey = String(index);
} else if (btn.style === 'destructive') {
destructiveButtonKey = String(index);
} else if (btn.isPreferred) {
}
if (btn.isPreferred) {
preferredButtonKey = String(index);
}
if (btn.text || index < (callbackOrButtons || []).length - 1) {
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Animated/AnimatedEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class AnimatedEvent {
this._listeners = this._listeners.filter(listener => listener !== callback);
}

__attach(viewRef: any, eventName: string) {
__attach(viewRef: any, eventName: string): void {
invariant(
this.__isNative,
'Only native driven events need to be attached.',
Expand All @@ -191,7 +191,7 @@ class AnimatedEvent {
);
}

__detach(viewTag: any, eventName: string) {
__detach(viewTag: any, eventName: string): void {
invariant(
this.__isNative,
'Only native driven events need to be detached.',
Expand Down
7 changes: 4 additions & 3 deletions Libraries/Animated/animations/SpringAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

'use strict';

const AnimatedValue = require('../nodes/AnimatedValue');
const AnimatedValueXY = require('../nodes/AnimatedValueXY');
const AnimatedInterpolation = require('../nodes/AnimatedInterpolation');
import type AnimatedValue from '../nodes/AnimatedValue';
import type AnimatedValueXY from '../nodes/AnimatedValueXY';
import type AnimatedInterpolation from '../nodes/AnimatedInterpolation';

const Animation = require('./Animation');
const SpringConfig = require('../SpringConfig');

Expand Down
7 changes: 4 additions & 3 deletions Libraries/Animated/animations/TimingAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

'use strict';

const AnimatedValue = require('../nodes/AnimatedValue');
const AnimatedValueXY = require('../nodes/AnimatedValueXY');
const AnimatedInterpolation = require('../nodes/AnimatedInterpolation');
import type AnimatedValue from '../nodes/AnimatedValue';
import type AnimatedValueXY from '../nodes/AnimatedValueXY';
import type AnimatedInterpolation from '../nodes/AnimatedInterpolation';

const Animation = require('./Animation');

const {shouldUseNativeDriver} = require('../NativeAnimatedHelper');
Expand Down
6 changes: 3 additions & 3 deletions Libraries/Animated/createAnimatedComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
// components. If you want to animate a composite component, you need to
// re-render it. In this case, we have a fallback that uses forceUpdate.
// This fallback is also called in Fabric.
_animatedPropsCallback = () => {
_animatedPropsCallback = (): void => {
if (this._component == null) {
// AnimatedProps is created in will-mount because it's used in render.
// But this callback may be invoked before mount in async mode,
Expand Down Expand Up @@ -192,15 +192,15 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
}
}

_setComponentRef = setAndForwardRef({
_setComponentRef: (ref: React.ElementRef<any>) => void = setAndForwardRef({
getForwardedRef: () => this.props.forwardedRef,
setLocalRef: ref => {
this._prevComponent = this._component;
this._component = ref;
},
});

render() {
render(): React.Node {
const animatedProps =
this._propsAnimated.__getValue(this._initialAnimatedProps) || {};
const {style = {}, ...props} = animatedProps;
Expand Down
3 changes: 2 additions & 1 deletion Libraries/Animated/nodes/AnimatedAddition.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

'use strict';

import type AnimatedNode from './AnimatedNode';

const AnimatedInterpolation = require('./AnimatedInterpolation');
const AnimatedNode = require('./AnimatedNode');
const AnimatedValue = require('./AnimatedValue');
const AnimatedWithChildren = require('./AnimatedWithChildren');

Expand Down
Loading

0 comments on commit 93d3bc0

Please sign in to comment.