Skip to content

Commit eb64202

Browse files
committed
Merge commit 'b2f871a6fa9c92dd0712055384b9eca6d828e37d' into realize-last-focused
2 parents 03f180f + b2f871a commit eb64202

File tree

133 files changed

+3779
-2833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3779
-2833
lines changed

.circleci/config.yml

Lines changed: 93 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ executors:
2828
<<: *defaults
2929
docker:
3030
# Note: Version set separately for Windows builds, see below.
31-
- image: circleci/node:14
31+
- image: circleci/node:16
3232
nodeprevlts:
3333
<<: *defaults
3434
docker:
35-
- image: circleci/node:12
35+
- image: circleci/node:14
3636
reactnativeandroid:
3737
<<: *defaults
3838
docker:
@@ -376,7 +376,7 @@ jobs:
376376
- run:
377377
name: Configure Environment Variables
378378
command: |
379-
echo 'export PATH=/usr/local/opt/node@14/bin:$PATH' >> $BASH_ENV
379+
echo 'export PATH=/usr/local/opt/node@16/bin:$PATH' >> $BASH_ENV
380380
source $BASH_ENV
381381
382382
- with_brew_cache_span:
@@ -393,7 +393,7 @@ jobs:
393393
name: Configure Node
394394
# Sourcing find-node.sh will ensure nvm is set up.
395395
# It also helps future invocation of find-node.sh prevent permission issue with nvm.sh.
396-
command: source scripts/find-node.sh && nvm install 14 && nvm alias default 14
396+
command: source scripts/find-node.sh && nvm install 16 && nvm alias default 16
397397

398398
- run:
399399
name: Configure Watchman
@@ -588,6 +588,37 @@ jobs:
588588
name: Build the template application
589589
command: cd template/android/ && ./gradlew assembleDebug
590590

591+
# -------------------------
592+
# JOBS: Test Android RNTester
593+
# -------------------------
594+
test_android_rntester:
595+
executor: reactnativeandroid
596+
parameters:
597+
use_hermes:
598+
type: boolean
599+
default: false
600+
steps:
601+
- checkout
602+
- run_yarn
603+
604+
- run:
605+
name: Generate artifacts for Maven
606+
command: ./gradlew :ReactAndroid:installArchives
607+
608+
- when:
609+
condition: << parameters.use_hermes >>
610+
steps:
611+
- run:
612+
name: Build RNTester with Hermes
613+
command: ./gradlew :packages:rn-tester:android:app:assembleHermesDebug
614+
- when:
615+
condition:
616+
not: << parameters.use_hermes >>
617+
steps:
618+
- run:
619+
name: Build RNTester with JSC
620+
command: ./gradlew :packages:rn-tester:android:app:assembleJscDebug
621+
591622
# -------------------------
592623
# JOBS: Test iOS Template
593624
# -------------------------
@@ -621,6 +652,40 @@ jobs:
621652
-scheme $PROJECT_NAME \
622653
-sdk iphonesimulator
623654
655+
# -------------------------
656+
# JOBS: Test iOS RNTester
657+
# -------------------------
658+
test_ios_rntester:
659+
executor: reactnativeios
660+
parameters:
661+
use_hermes:
662+
type: boolean
663+
default: false
664+
steps:
665+
- checkout
666+
- run_yarn
667+
668+
- when:
669+
condition: << parameters.use_hermes >>
670+
steps:
671+
- run:
672+
name: Set USE_HERMES=1
673+
command: echo "export USE_HERMES=1" >> $BASH_ENV
674+
675+
- run:
676+
name: Install CocoaPods dependencies
677+
command: |
678+
rm -rf packages/rn-tester/Pods
679+
cd packages/rn-tester && bundle exec pod install
680+
681+
- run:
682+
name: Build RNTester
683+
command: |
684+
xcodebuild build \
685+
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
686+
-scheme RNTester \
687+
-sdk iphonesimulator
688+
624689
# -------------------------
625690
# JOBS: Windows
626691
# -------------------------
@@ -644,8 +709,8 @@ jobs:
644709
name: Install Node
645710
# Note: Version set separately for non-Windows builds, see above.
646711
command: |
647-
nvm install 14.17.0
648-
nvm use 14.17.0
712+
nvm install 16
713+
nvm use 16
649714
650715
# Setup Dependencies
651716
- run:
@@ -885,12 +950,34 @@ workflows:
885950
filters:
886951
branches:
887952
ignore: gh-pages
953+
- test_android_rntester:
954+
name: test_android_rntester_hermes
955+
use_hermes: true
956+
filters:
957+
branches:
958+
ignore: gh-pages
959+
- test_android_rntester:
960+
name: test_android_rntester_jsc
961+
filters:
962+
branches:
963+
ignore: gh-pages
888964
- test_ios_template:
889965
requires:
890966
- build_npm_package
891967
filters:
892968
branches:
893969
ignore: gh-pages
970+
- test_ios_rntester:
971+
name: test_ios_rntester_hermes
972+
use_hermes: true
973+
filters:
974+
branches:
975+
ignore: gh-pages
976+
- test_ios_rntester:
977+
name: test_ios_rntester_jsc
978+
filters:
979+
branches:
980+
ignore: gh-pages
894981
- test_ios:
895982
name: test_ios_unit_jsc
896983
run_unit_tests: true

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ untyped-import
7070
untyped-type-import
7171

7272
[version]
73-
^0.168.0
73+
^0.170.0

.flowconfig.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ untyped-import
7070
untyped-type-import
7171

7272
[version]
73-
^0.168.0
73+
^0.170.0

.github/workflows/apply-version-label-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
continue-on-error: true
1111

1212
steps:
13-
- uses: gabrieldonadel/[email protected].2
13+
- uses: react-native-community/[email protected].3
1414
with:
1515
github-token: ${{ secrets.GITHUB_TOKEN }}
1616
required-label: "Type: Upgrade Issue"

BUCK

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ rn_library(
723723
"//xplat/js:node_modules__abort_19controller",
724724
"//xplat/js:node_modules__anser",
725725
"//xplat/js:node_modules__base64_19js",
726-
"//xplat/js:node_modules__deprecated_19react_19native_19prop_19types",
727726
"//xplat/js:node_modules__event_19target_19shim",
728727
"//xplat/js:node_modules__invariant",
729728
"//xplat/js:node_modules__nullthrows",

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## v0.67.2
4+
5+
### Fixed
6+
7+
- Fix error "mockModal is not a function" ([507b05f4c0](https://github.com/facebook/react-native/commit/507b05f4c02b46109f483a2b79c924a775fd7bd3) by [@AntoineDoubovetzky](https://github.com/AntoineDoubovetzky))
8+
9+
#### Android specific
10+
11+
- Fix potential crash if ReactRootView does not have insets attached. ([6239e2f5ce](https://github.com/facebook/react-native/commit/6239e2f5ce82f7c2e683eb4699b9ce3ff1b58ac5) by [@enahum](https://github.com/enahum))
12+
- Upgrading OkHttp from 4.9.1 to 4.9.2 to fix CVE-2021-0341. ([e896d21](https://github.com/facebook/react-native/commit/e896d21ced3c0c917c2fc0044d2b93b44df9a081) by [@owjsub](https://github.com/owjsub))
13+
14+
#### iOS specific
15+
16+
- Fix `Time.h` patch not being applied when running `pod install --project-directory=ios` ([60cef850bd](https://github.com/facebook/react-native/commit/60cef850bd3fd12c32ee1196bd19a559592d1465) by [@tido64](https://github.com/tido64))
17+
- Find-node.sh now respects .nvmrc ([35bcf934b1](https://github.com/facebook/react-native/commit/35bcf934b186e581d100d43e563044300759557f) by [@igrayson](https://github.com/igrayson))
18+
319
## v0.67.1
420

521
### Fixed

Libraries/Animated/AnimatedImplementation.js

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import type {DecayAnimationConfig} from './animations/DecayAnimation';
3838
import type {SpringAnimationConfig} from './animations/SpringAnimation';
3939
import type {Mapping, EventConfig} from './AnimatedEvent';
4040

41+
import AnimatedColor from './nodes/AnimatedColor';
42+
4143
export type CompositeAnimation = {
4244
start: (callback?: ?EndCallback) => void,
4345
stop: () => void,
@@ -102,7 +104,7 @@ const _combineCallbacks = function (
102104
};
103105

104106
const maybeVectorAnim = function (
105-
value: AnimatedValue | AnimatedValueXY,
107+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
106108
config: Object,
107109
anim: (value: AnimatedValue, config: Object) => CompositeAnimation,
108110
): ?CompositeAnimation {
@@ -121,16 +123,42 @@ const maybeVectorAnim = function (
121123
// We use `stopTogether: false` here because otherwise tracking will break
122124
// because the second animation will get stopped before it can update.
123125
return parallel([aX, aY], {stopTogether: false});
126+
} else if (value instanceof AnimatedColor) {
127+
const configR = {...config};
128+
const configG = {...config};
129+
const configB = {...config};
130+
const configA = {...config};
131+
for (const key in config) {
132+
const {r, g, b, a} = config[key];
133+
if (
134+
r !== undefined &&
135+
g !== undefined &&
136+
b !== undefined &&
137+
a !== undefined
138+
) {
139+
configR[key] = r;
140+
configG[key] = g;
141+
configB[key] = b;
142+
configA[key] = a;
143+
}
144+
}
145+
const aR = anim((value: AnimatedColor).r, configR);
146+
const aG = anim((value: AnimatedColor).g, configG);
147+
const aB = anim((value: AnimatedColor).b, configB);
148+
const aA = anim((value: AnimatedColor).a, configA);
149+
// We use `stopTogether: false` here because otherwise tracking will break
150+
// because the second animation will get stopped before it can update.
151+
return parallel([aR, aG, aB, aA], {stopTogether: false});
124152
}
125153
return null;
126154
};
127155

128156
const spring = function (
129-
value: AnimatedValue | AnimatedValueXY,
157+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
130158
config: SpringAnimationConfig,
131159
): CompositeAnimation {
132160
const start = function (
133-
animatedValue: AnimatedValue | AnimatedValueXY,
161+
animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,
134162
configuration: SpringAnimationConfig,
135163
callback?: ?EndCallback,
136164
): void {
@@ -179,11 +207,11 @@ const spring = function (
179207
};
180208

181209
const timing = function (
182-
value: AnimatedValue | AnimatedValueXY,
210+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
183211
config: TimingAnimationConfig,
184212
): CompositeAnimation {
185213
const start = function (
186-
animatedValue: AnimatedValue | AnimatedValueXY,
214+
animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,
187215
configuration: TimingAnimationConfig,
188216
callback?: ?EndCallback,
189217
): void {
@@ -233,11 +261,11 @@ const timing = function (
233261
};
234262

235263
const decay = function (
236-
value: AnimatedValue | AnimatedValueXY,
264+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
237265
config: DecayAnimationConfig,
238266
): CompositeAnimation {
239267
const start = function (
240-
animatedValue: AnimatedValue | AnimatedValueXY,
268+
animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,
241269
configuration: DecayAnimationConfig,
242270
callback?: ?EndCallback,
243271
): void {
@@ -547,6 +575,10 @@ module.exports = {
547575
* See https://reactnative.dev/docs/animatedvaluexy
548576
*/
549577
ValueXY: AnimatedValueXY,
578+
/**
579+
* Value class for driving color animations.
580+
*/
581+
Color: AnimatedColor,
550582
/**
551583
* Exported to use the Interpolation type in flow.
552584
*

Libraries/Animated/AnimatedMock.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import type {TimingAnimationConfig} from './animations/TimingAnimation';
2424
import type {DecayAnimationConfig} from './animations/DecayAnimation';
2525
import type {SpringAnimationConfig} from './animations/SpringAnimation';
2626

27+
import AnimatedColor from './nodes/AnimatedColor';
28+
2729
/**
2830
* Animations are a source of flakiness in snapshot testing. This mock replaces
2931
* animation functions from AnimatedImplementation with empty animations for
@@ -89,7 +91,7 @@ const mockCompositeAnimation = (
8991
});
9092

9193
const spring = function (
92-
value: AnimatedValue | AnimatedValueXY,
94+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
9395
config: SpringAnimationConfig,
9496
): CompositeAnimation {
9597
const anyValue: any = value;
@@ -103,7 +105,7 @@ const spring = function (
103105
};
104106

105107
const timing = function (
106-
value: AnimatedValue | AnimatedValueXY,
108+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
107109
config: TimingAnimationConfig,
108110
): CompositeAnimation {
109111
const anyValue: any = value;
@@ -117,7 +119,7 @@ const timing = function (
117119
};
118120

119121
const decay = function (
120-
value: AnimatedValue | AnimatedValueXY,
122+
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
121123
config: DecayAnimationConfig,
122124
): CompositeAnimation {
123125
return emptyAnimation;
@@ -164,6 +166,7 @@ const loop = function (
164166
module.exports = {
165167
Value: AnimatedValue,
166168
ValueXY: AnimatedValueXY,
169+
Color: AnimatedColor,
167170
Interpolation: AnimatedInterpolation,
168171
Node: AnimatedNode,
169172
decay,

0 commit comments

Comments
 (0)